--- a/beamerthemeplainculight.sty Mon Oct 05 20:42:11 2015 +0100
+++ b/beamerthemeplainculight.sty Tue Oct 06 09:42:58 2015 +0100
@@ -44,7 +44,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Frametitles
-\setbeamerfont{frametitle}{size={\LARGE}}
+\setbeamerfont{frametitle}{size=\linespread{0.85}{\LARGE}}
\setbeamerfont{frametitle}{family={\usefont{T1}{ptm}{b}{n}}}
\setbeamercolor{frametitle}{fg=ProcessBlue,bg=white}
@@ -52,10 +52,9 @@
\vskip 2mm % distance from the top margin
\hskip -3mm % distance from left margin
\vbox{%
-\begin{minipage}{1.05\textwidth}%
+\parbox{1.05\textwidth}{%
\centering%
-\insertframetitle%
-\end{minipage}}%
+\insertframetitle*}}%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Binary file handouts/ho03.pdf has changed
--- a/handouts/ho03.tex Mon Oct 05 20:42:11 2015 +0100
+++ b/handouts/ho03.tex Tue Oct 06 09:42:58 2015 +0100
@@ -186,17 +186,17 @@
make \pcode{gcc} generate assembly instructions if you call it
with the \pcode{-S} option, for example \pcode{gcc -S out
in.c}\;. Or you can look at this code by using the debugger.
-How to do this will be explained later.}
+How to do this will be explained in the last section.}
\begin{center}\small
-\begin{tabular}[t]{p{10cm}}
+\begin{tabular}[t]{p{11cm}}
{\lstinputlisting[language={[x86masm]Assembler},
morekeywords={movl},xleftmargin=5mm]
{../progs/example1a.s}}
\end{tabular}
\end{center}
\begin{center}\small
-\begin{tabular}[t]{p{10cm}}
+\begin{tabular}[t]{p{11cm}}
{\lstinputlisting[language={[x86masm]Assembler},
morekeywords={movl,movw},xleftmargin=5mm]
{../progs/example1b.s}}
--- a/progs/example1a.s Mon Oct 05 20:42:11 2015 +0100
+++ b/progs/example1a.s Tue Oct 06 09:42:58 2015 +0100
@@ -1,10 +1,11 @@
_main:
- push %ebp
- mov %esp,%ebp
- sub %0xc,%esp
- movl $0x3,0x8(%esp)
- movl $0x2,0x4(%esp)
- movl $0x1,(%esp)
- call 0x8048394 <foo>
- leave
- ret
\ No newline at end of file
+ push %ebp
+ mov %esp,%ebp ; current sp into esp
+ sub %0xc,%esp ; subtract 12 from esp
+ movl $0x3,0x8(%esp) ; store 3 at esp + 8
+ movl $0x2,0x4(%esp) ; store 2 at esp + 4
+ movl $0x1,(%esp) ; store 1 at esp
+ call 0x8048394 <foo> ; push return address to stack
+ ; and call foo-function
+ leave ; clean up stack
+ ret ; exit program
\ No newline at end of file
--- a/progs/example1b.s Mon Oct 05 20:42:11 2015 +0100
+++ b/progs/example1b.s Tue Oct 06 09:42:58 2015 +0100
@@ -1,11 +1,12 @@
_foo:
- push %ebp
- mov %esp,%ebp
- sub $0x10,%esp
- movl $0x64636261,-0x6(%ebp)
- movw $0x65,-0x2(%ebp)
- movl $0x34333231,-0x10(%ebp)
- movl $0x38373635,-0xc(%ebp)
- movw $0x39,-0x8(%ebp)
- leave
- ret
\ No newline at end of file
+ push %ebp ; push current sp onto stack
+ mov %esp,%ebp ; current sp into esp
+ sub $0x10,%esp ; subtract 16 from esp
+ movl $0x64636261,-0x6(%ebp) ; store abcd in ebp - 6
+ movw $0x65,-0x2(%ebp) ; store e in ebp - 2
+ movl $0x34333231,-0x10(%ebp) ; store 1234 in ebp - 16
+ movl $0x38373635,-0xc(%ebp) ; store 5678 in ebp - 12
+ movw $0x39,-0x8(%ebp) ; store 9 in ebp - 8
+ leave ; pop last sp into ebp
+ ret ; pop return address and
+ ; go back to main
\ No newline at end of file
Binary file slides/slides03.pdf has changed
--- a/slides/slides03.tex Mon Oct 05 20:42:11 2015 +0100
+++ b/slides/slides03.tex Tue Oct 06 09:42:58 2015 +0100
@@ -228,21 +228,24 @@
\frametitle{Behind the Scenes}
\only<2->{
-\begin{textblock}{7}(1,1)
+\begin{textblock}{7}(1,0.6)
\begin{bubble}[6.8cm]
\footnotesize
-\lstinputlisting[language=C,xleftmargin=5mm]{../progs/example1.c}
+\lstinputlisting[language=C,
+ xleftmargin=5mm,
+ belowskip=-1mm,
+ aboveskip=-1mm]{../progs/example1.c}
\end{bubble}
\end{textblock}}
\only<2>{
-\begin{textblock}{7}(5,8)
+\begin{textblock}{7}(0.5,6.6)
\footnotesize
\lstinputlisting[language={[x86masm]Assembler},morekeywords={movl},xleftmargin=5mm,numbers=none]{../progs/example1a.s}
\end{textblock}}
\only<3>{
-\begin{textblock}{7}(5,8)
+\begin{textblock}{7}(0.5,6.6)
\footnotesize
\lstinputlisting[language={[x86masm]Assembler},morekeywords={movl,movw},xleftmargin=5mm,numbers=none]{../progs/example1b.s}
\end{textblock}}
@@ -278,7 +281,7 @@
\draw[<-,line width=0.5mm] (1.1,6) -- (2.5,6);
\draw[->,line width=0.5mm] (1,4.5) -- (1.8,4.5);
- \draw (2.5,4.1) node[anchor=south] {\code{??}};
+ \draw (2.5,4.1) node[anchor=south] {\code{BBBB}};
\draw[->,line width=0.5mm] (1,3.5) -- (2.5,3.5);
\draw (2.6,3.1) node[anchor=south west] {\tt jump to \code{\\x080483f4}};
@@ -409,7 +412,10 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[c]
-\frametitle{\begin{tabular}{c}Protections against\\ Buffer Overflow Attacks\end{tabular}}
+\frametitle{\begin{tabular}{c}
+ Protections against\\
+ Buffer Overflow Attacks
+ \end{tabular}}
\begin{itemize}
\item use safe library functions
@@ -421,8 +427,8 @@
\only<2>{
\begin{textblock}{7}(6,1)
- \begin{bubble}[5cm]
- \begin{tabular}{cp{2cm}}
+ \begin{bubble}[5.5cm]
+ \begin{tabular}{cp{2.9cm}}
\begin{tikzpicture}[baseline=40mm,scale=0.8]
%\draw[step=1cm] (-3,-1) grid (3,8);
\draw[gray!20,fill=gray!20] (-1, 0) rectangle (1,-1);
@@ -445,7 +451,7 @@
\draw (0,6) node[anchor=south] {\tt buf};
\draw[line width=1mm] (-1,7) -- (1,7);
\end{tikzpicture} &
- canary: a random value after the local variables
+ \raggedright stack canary: a random value after the local variables
\end{tabular}
\end{bubble}
\end{textblock}}