slides/slides03.tex
author cu
Mon, 09 Oct 2017 10:07:35 +0100
changeset 547 eae9a2e6ff28
parent 546 3d1f65e43065
permissions -rw-r--r--
updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
28
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     1
\documentclass[dvipsnames,14pt,t]{beamer}
196
22f027da67ec updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 152
diff changeset
     2
\usepackage{../slides}
22f027da67ec updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 152
diff changeset
     3
\usepackage{../graphics}
22f027da67ec updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 152
diff changeset
     4
\usepackage{../langs}
467
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
     5
\usepackage{../data}
196
22f027da67ec updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 152
diff changeset
     6
22f027da67ec updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 152
diff changeset
     7
\setmonofont[Scale=.88]{Consolas}
152
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 115
diff changeset
     8
\newfontfamily{\consolas}{Consolas}
28
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     9
196
22f027da67ec updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 152
diff changeset
    10
\hfuzz=220pt 
111
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 105
diff changeset
    11
28
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    12
% beamer stuff 
381
036a762b02cf updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 239
diff changeset
    13
\renewcommand{\slidecaption}{SEN 03, King's College London}
28
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    14
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    15
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    16
\begin{document}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    17
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    18
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
196
22f027da67ec updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 152
diff changeset
    19
\begin{frame}[t]
28
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    20
\frametitle{%
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    21
  \begin{tabular}{@ {}c@ {}}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    22
  \\
381
036a762b02cf updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 239
diff changeset
    23
  \LARGE Security Engineering (3)\\[-3mm] 
28
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    24
  \end{tabular}}\bigskip\bigskip\bigskip
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    25
196
22f027da67ec updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 152
diff changeset
    26
  \normalsize
28
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    27
  \begin{center}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    28
  \begin{tabular}{ll}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    29
  Email:  & christian.urban at kcl.ac.uk\\
518
e1fcfba63a31 updated
Christian Urban <urbanc@in.tum.de>
parents: 479
diff changeset
    30
  Office: & N7.07 (North Wing, Bush House)\\
105
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
    31
  Slides: & KEATS (also home work is there)
28
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    32
  \end{tabular}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    33
  \end{center}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    34
547
eae9a2e6ff28 updated
cu
parents: 546
diff changeset
    35
\begin{textblock}{7}(2.4,10.8)
eae9a2e6ff28 updated
cu
parents: 546
diff changeset
    36
\begin{bubble}[9cm]
eae9a2e6ff28 updated
cu
parents: 546
diff changeset
    37
\rm ``We took a network that was designed to be resilient to nuclear war and
eae9a2e6ff28 updated
cu
parents: 546
diff changeset
    38
we made it vulnerable to toasters.''\\\mbox{}\hfill\small --- Eben Upton, 2017, RPi co-founder
eae9a2e6ff28 updated
cu
parents: 546
diff changeset
    39
\end{bubble}
eae9a2e6ff28 updated
cu
parents: 546
diff changeset
    40
\end{textblock}
eae9a2e6ff28 updated
cu
parents: 546
diff changeset
    41
  
196
22f027da67ec updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 152
diff changeset
    42
\end{frame}
22f027da67ec updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 152
diff changeset
    43
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
28
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    44
211
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
    45
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
    46
\begin{frame}[c]
479
f76074ed6c9e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 471
diff changeset
    47
  \frametitle{\Large Homework, Slides etc}
f76074ed6c9e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 471
diff changeset
    48
f76074ed6c9e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 471
diff changeset
    49
  \begin{itemize}
547
eae9a2e6ff28 updated
cu
parents: 546
diff changeset
    50
  \item homework, slides, programs, handouts are on KEATS
479
f76074ed6c9e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 471
diff changeset
    51
  \item include the question text  
546
3d1f65e43065 updated
cu
parents: 518
diff changeset
    52
  \item please send the homework as PDF (or txt)\bigskip
547
eae9a2e6ff28 updated
cu
parents: 546
diff changeset
    53
  \item exam 90\%, questions will be from homeworks (work in pairs for hws)
546
3d1f65e43065 updated
cu
parents: 518
diff changeset
    54
  \item coursework 10\% \bigskip  
547
eae9a2e6ff28 updated
cu
parents: 546
diff changeset
    55
  \item short survey at KEATS; to be answered until Sunday  
479
f76074ed6c9e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 471
diff changeset
    56
  \end{itemize}
f76074ed6c9e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 471
diff changeset
    57
\end{frame}
f76074ed6c9e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 471
diff changeset
    58
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
f76074ed6c9e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 471
diff changeset
    59
f76074ed6c9e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 471
diff changeset
    60
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
f76074ed6c9e updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 471
diff changeset
    61
\begin{frame}[c]
211
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
    62
\frametitle{\Large Buffer Overflow Attacks}
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
    63
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
    64
\begin{center}
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
    65
\begin{columns}[b]
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
    66
\begin{column}{.4\textwidth}
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
    67
\centering
391
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
    68
\includegraphics[scale=0.3]{../pics/barrier.jpg}\\
211
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
    69
lectures so far
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
    70
\end{column}
391
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
    71
\begin{column}{.4\textwidth}
211
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
    72
\centering
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
    73
\includegraphics[scale=0.32]{../pics/trainwreck.jpg}\\
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
    74
today
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
    75
\end{column}
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
    76
\end{columns}
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
    77
\end{center}
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
    78
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
    79
\end{frame}
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
    80
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
    81
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
    82
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
    83
\begin{frame}[c]
467
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
    84
\frametitle{\begin{tabular}{@{}c@{}}According to\\ US Vulnerability DB\end{tabular}}
547
eae9a2e6ff28 updated
cu
parents: 546
diff changeset
    85
 
467
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
    86
\begin{center}
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
    87
\mbox{}\hspace{-8mm}\begin{tikzpicture}
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
    88
\begin{axis}[
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
    89
    xlabel={year},
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
    90
    xlabel style={yshift=-1em},
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
    91
    ylabel={\% of total attacks},
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
    92
    ylabel style={yshift=-0em},
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
    93
    enlargelimits=false,
547
eae9a2e6ff28 updated
cu
parents: 546
diff changeset
    94
    xtick={1997,1999,2001,...,2017},
467
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
    95
    xmin=1996.5,
547
eae9a2e6ff28 updated
cu
parents: 546
diff changeset
    96
    xmax=2018,
467
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
    97
    ymax=23,
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
    98
    ytick={0,5,...,20},
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
    99
    scaled ticks=false,
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
   100
    axis lines=left,
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
   101
    width=11.5cm,
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
   102
    height=5cm, 
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
   103
    ybar,
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
   104
    x tick label style={text height=1ex,font=\footnotesize,/pgf/number format/1000 sep={}},
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
   105
    nodes near coords=
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
   106
     {\footnotesize
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
   107
      $\pgfmathprintnumber[fixed,fixed zerofill,precision=1,use comma]{\pgfkeysvalueof{/data point/y}}$}
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
   108
    ]
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
   109
\addplot
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
   110
  table [x=Year,y=Percentage] {bufferoverflows.data};
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
   111
\end{axis}
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
   112
\end{tikzpicture}
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
   113
\end{center}
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
   114
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
   115
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
   116
from the US National Vulnerability Database\\
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
   117
\small\url{http://web.nvd.nist.gov/view/vuln/statistics}
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
   118
\end{frame}
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
   119
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
   120
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
   121
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
   122
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
   123
\begin{frame}[c]
211
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   124
\frametitle{Smash the Stack for Fun\ldots}
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   125
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   126
\begin{itemize}
392
4dff36e2bbc6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 391
diff changeset
   127
\item \alert{\bf Buffer Overflow Attacks (BOAs)} or\\ 
391
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   128
{\bf Smashing the Stack Attacks}\medskip
211
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   129
392
4dff36e2bbc6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 391
diff changeset
   130
\item unfortunately one of the most popular attacks\\ 
211
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   131
($>$ 50\% of security incidents reported at CERT are related 
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   132
to buffer overflows)
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   133
\begin{flushright}
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   134
\small\url{http://www.kb.cert.org/vuls}
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   135
\end{flushright}
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   136
\medskip
547
eae9a2e6ff28 updated
cu
parents: 546
diff changeset
   137
\item made popular by an article from 1996 by Elias Levy
211
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   138
(also known as Aleph One):\\
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   139
\begin{center}
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   140
{\bf ``Smashing The Stack For Fun and Profit''}
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   141
\end{center}\medskip
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   142
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   143
\begin{flushright}
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   144
\small\url{http://phrack.org/issues/49/14.html}
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   145
\end{flushright} 
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   146
 
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   147
\end{itemize}
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   148
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   149
\end{frame}
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   150
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   151
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   152
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   153
\begin{frame}[c]
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   154
\frametitle{A Long Printed ``Twice''}
467
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
   155
\mbox{}\\[-6mm]
211
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   156
467
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
   157
\footnotesize 
211
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   158
\lstinputlisting[language=C,xleftmargin=4mm]{../progs/C0.c}
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   159
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   160
\end{frame}
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   161
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   162
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   163
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   164
\begin{frame}[c]
391
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   165
\frametitle{Printing Out ``Zombies''}
467
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
   166
\mbox{}\\[-6mm]
220
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   167
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   168
\footnotesize
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   169
\lstinputlisting[language=C,xleftmargin=4mm]{../progs/C1.c}
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   170
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   171
\end{frame}
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   172
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   173
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   174
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   175
\begin{frame}[c]
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   176
\frametitle{A ``Login'' Function (1)}
467
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
   177
\mbox{}\\[-6mm]
211
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   178
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   179
\footnotesize
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   180
\lstinputlisting[language=C,xleftmargin=4mm]{../progs/C2a.c}
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   181
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   182
\end{frame}
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   183
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   184
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   185
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   186
\begin{frame}[c]
220
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   187
\frametitle{A ``Login'' Function (2)}
467
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
   188
\mbox{}\\[-6mm]
211
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   189
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   190
\footnotesize
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   191
\lstinputlisting[language=C,xleftmargin=-3mm]{../progs/C2b.c}
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   192
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   193
\end{frame}
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   194
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   195
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   196
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   197
\begin{frame}[c]
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   198
\frametitle{What the Hell Is Going On?}
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   199
216
38718062709a updated C2
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 211
diff changeset
   200
\begin{itemize}
38718062709a updated C2
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 211
diff changeset
   201
\item Let's start with a very simple program:
38718062709a updated C2
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 211
diff changeset
   202
\end{itemize}
38718062709a updated C2
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 211
diff changeset
   203
211
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   204
\lstinputlisting[language=C,xleftmargin=4mm]{../progs/example1.c}
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   205
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   206
\end{frame}
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   207
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   208
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   209
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   210
\begin{frame}[c]
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   211
\frametitle{Memory}
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   212
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   213
\begin{itemize}
391
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   214
\item each process will get a chunk of memory that is
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   215
      organised as follows: 
211
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   216
\end{itemize}
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   217
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   218
\begin{center}
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   219
  \begin{tikzpicture}[scale=0.8]
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   220
  %\draw[step=1cm] (-3,-3) grid (3,3);
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   221
  \draw[line width=1mm] (-2, -3) rectangle (2,3);
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   222
  \draw[line width=1mm] (-2,1) -- (2,1);
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   223
  \draw[line width=1mm] (-2,-1) -- (2,-1);
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   224
  \draw (0,2) node {\large\tt text};
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   225
  \draw (0,0) node {\large\tt heap};
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   226
  \draw (0,-2) node {\large\tt stack};
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   227
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   228
  \draw (-2.7,3) node[anchor=north east] {\tt\begin{tabular}{@{}l@{}}lower\\ address\end{tabular}};
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   229
  \draw (-2.7,-3) node[anchor=south east] {\tt\begin{tabular}{@{}l@{}}higher\\ address\end{tabular}};
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   230
  \draw[->, line width=1mm] (-2.5,3) -- (-2.5,-3);
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   231
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   232
  \draw (2.7,-2) node[anchor=west] {\tt grows};
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   233
  \draw (2.7,-3) node[anchor=south west] {\tt\footnotesize older};
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   234
  \draw (2.7,-1) node[anchor=north west] {\tt\footnotesize newer};
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   235
  \draw[|->, line width=1mm] (2.5,-3) -- (2.5,-1);
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   236
  \end{tikzpicture}
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   237
\end{center}
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   238
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   239
\end{frame}
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   240
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   241
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   242
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   243
\begin{frame}[c]
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   244
\frametitle{The Stack}
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   245
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   246
\begin{textblock}{7}(1,1)
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   247
  \begin{tikzpicture}[scale=0.8]
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   248
  %\draw[step=1cm] (-3,-1) grid (3,8);
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   249
  \draw[gray!20,fill=gray!20] (-1, 0) rectangle (1,-1);
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   250
  \draw[line width=1mm] (-1,-1.2) -- (-1,7.4);
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   251
  \draw[line width=1mm] ( 1,-1.2) -- ( 1,7.4);
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   252
  \draw (0,-1) node[anchor=south] {\tt main};
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   253
  \draw[line width=1mm] (-1,0) -- (1,0);
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   254
  \draw (0,0) node[anchor=south] {\tt arg$_3$=3};
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   255
  \draw[line width=1mm] (-1,1) -- (1,1);
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   256
  \draw (0,1) node[anchor=south] {\tt arg$_2$=2};
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   257
  \draw[line width=1mm] (-1,2) -- (1,2);
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   258
  \draw (0,2) node[anchor=south] {\tt arg$_1$=1};
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   259
  \draw[line width=1mm] (-1,3) -- (1,3);
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   260
  \draw (0,3.1) node[anchor=south] {\tt ret};
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   261
  \draw[line width=1mm] (-1,4) -- (1,4);
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   262
  \draw (0,4) node[anchor=south] {\small\tt last sp};
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   263
  \draw[line width=1mm] (-1,5) -- (1,5);
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   264
  \draw (0,5) node[anchor=south] {\tt buf$_1$};
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   265
  \draw[line width=1mm] (-1,6) -- (1,6);
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   266
  \draw (0,6) node[anchor=south] {\tt buf$_2$};
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   267
  \draw[line width=1mm] (-1,7) -- (1,7);
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   268
  \draw (2,6.1) node[anchor=south] {\code{$esp}};
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   269
  \draw[<-,line width=0.5mm] (1.1,7) -- (2.5,7);
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   270
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   271
  \draw[->,line width=0.5mm] (1,4.5) -- (1.8,4.5) -- (1.8, 0) -- (1.1,0); 
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   272
  \draw[->,line width=0.5mm] (1,3.5) -- (2.5,3.5);
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   273
  \draw (2.6,3.1) node[anchor=south west] {\tt back to main()};
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   274
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   275
  \draw[->,red,line width=2mm] (2.5,0.1) -- (4.2,0.1);
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   276
\end{tikzpicture}
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   277
\end{textblock}
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   278
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   279
\begin{textblock}{7}(6.4,8)
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   280
\begin{bubble}[6.8cm]
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   281
\footnotesize
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   282
\lstinputlisting[language=C,xleftmargin=5mm]{../progs/example1.c} 
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   283
\end{bubble}
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   284
\end{textblock}
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   285
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   286
\end{frame}
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   287
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   288
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   289
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   290
\begin{frame}[c]
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   291
\frametitle{Behind the Scenes}
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   292
546
3d1f65e43065 updated
cu
parents: 518
diff changeset
   293
\only<1>{
3d1f65e43065 updated
cu
parents: 518
diff changeset
   294
\begin{textblock}{7}(3,3)
3d1f65e43065 updated
cu
parents: 518
diff changeset
   295
\begin{bubble}[6.8cm]
3d1f65e43065 updated
cu
parents: 518
diff changeset
   296
\footnotesize
3d1f65e43065 updated
cu
parents: 518
diff changeset
   297
\lstinputlisting[language=C,
3d1f65e43065 updated
cu
parents: 518
diff changeset
   298
                 xleftmargin=5mm,
3d1f65e43065 updated
cu
parents: 518
diff changeset
   299
                 belowskip=-1mm,
3d1f65e43065 updated
cu
parents: 518
diff changeset
   300
                 aboveskip=-1mm]{../progs/example1.c} 
3d1f65e43065 updated
cu
parents: 518
diff changeset
   301
\end{bubble}
3d1f65e43065 updated
cu
parents: 518
diff changeset
   302
\end{textblock}}
3d1f65e43065 updated
cu
parents: 518
diff changeset
   303
223
2bc8309203c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 222
diff changeset
   304
\only<2->{
396
2f4296a0ab21 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 392
diff changeset
   305
\begin{textblock}{7}(1,0.6)
223
2bc8309203c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 222
diff changeset
   306
\begin{bubble}[6.8cm]
2bc8309203c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 222
diff changeset
   307
\footnotesize
396
2f4296a0ab21 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 392
diff changeset
   308
\lstinputlisting[language=C,
2f4296a0ab21 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 392
diff changeset
   309
                 xleftmargin=5mm,
2f4296a0ab21 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 392
diff changeset
   310
                 belowskip=-1mm,
2f4296a0ab21 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 392
diff changeset
   311
                 aboveskip=-1mm]{../progs/example1.c} 
223
2bc8309203c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 222
diff changeset
   312
\end{bubble}
2bc8309203c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 222
diff changeset
   313
\end{textblock}}
2bc8309203c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 222
diff changeset
   314
2bc8309203c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 222
diff changeset
   315
\only<2>{
396
2f4296a0ab21 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 392
diff changeset
   316
\begin{textblock}{7}(0.5,6.6)
223
2bc8309203c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 222
diff changeset
   317
\footnotesize
226
01fe5aba8781 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 223
diff changeset
   318
\lstinputlisting[language={[x86masm]Assembler},morekeywords={movl},xleftmargin=5mm,numbers=none]{../progs/example1a.s} 
223
2bc8309203c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 222
diff changeset
   319
\end{textblock}}
2bc8309203c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 222
diff changeset
   320
2bc8309203c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 222
diff changeset
   321
\only<3>{
396
2f4296a0ab21 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 392
diff changeset
   322
\begin{textblock}{7}(0.5,6.6)
223
2bc8309203c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 222
diff changeset
   323
\footnotesize
226
01fe5aba8781 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 223
diff changeset
   324
\lstinputlisting[language={[x86masm]Assembler},morekeywords={movl,movw},xleftmargin=5mm,numbers=none]{../progs/example1b.s} 
223
2bc8309203c8 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 222
diff changeset
   325
\end{textblock}}
211
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   326
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   327
\end{frame}
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   328
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
e6e160c7ea33 added files
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 206
diff changeset
   329
196
22f027da67ec updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 152
diff changeset
   330
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
22f027da67ec updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 152
diff changeset
   331
\begin{frame}[c]
220
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   332
\frametitle{Overwriting the Stack}
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   333
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   334
\begin{textblock}{7}(1,2)
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   335
  \begin{tikzpicture}[scale=0.8]
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   336
  %\draw[step=1cm] (-3,-1) grid (3,8);
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   337
  \draw[gray!20,fill=gray!20] (-1, 0) rectangle (1,-1);
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   338
  \draw[line width=1mm] (-1,-1.2) -- (-1,6.4);
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   339
  \draw[line width=1mm] ( 1,-1.2) -- ( 1,6.4);
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   340
  \draw (0,-1) node[anchor=south] {\tt main};
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   341
  \draw[line width=1mm] (-1,0) -- (1,0);
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   342
  \draw (0,0) node[anchor=south] {\tt arg$_3$=3};
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   343
  \draw[line width=1mm] (-1,1) -- (1,1);
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   344
  \draw (0,1) node[anchor=south] {\tt arg$_2$=2};
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   345
  \draw[line width=1mm] (-1,2) -- (1,2);
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   346
  \draw (0,2) node[anchor=south] {\tt arg$_1$=1};
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   347
  \draw[line width=1mm] (-1,3) -- (1,3);
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   348
  \draw (0,3.1) node[anchor=south] {\tt ret};
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   349
  \draw[line width=1mm] (-1,4) -- (1,4);
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   350
  \draw (0,4) node[anchor=south] {\small\tt last sp};
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   351
  \draw[line width=1mm] (-1,5) -- (1,5);
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   352
  \draw (0,5) node[anchor=south] {\tt buf};
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   353
  \draw[line width=1mm] (-1,6) -- (1,6);
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   354
  \draw (2,5.1) node[anchor=south] {\code{$esp}};
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   355
  \draw[<-,line width=0.5mm] (1.1,6) -- (2.5,6);
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   356
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   357
  \draw[->,line width=0.5mm] (1,4.5) -- (1.8,4.5);
396
2f4296a0ab21 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 392
diff changeset
   358
  \draw (2.5,4.1) node[anchor=south] {\code{BBBB}};
220
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   359
  
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   360
  \draw[->,line width=0.5mm] (1,3.5) -- (2.5,3.5);
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   361
  \draw (2.6,3.1) node[anchor=south west] {\tt jump to \code{\\x080483f4}};
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   362
\end{tikzpicture}
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   363
\end{textblock}
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   364
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   365
\begin{textblock}{7}(1,13.5)
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   366
\code{char buf[8] = "AAAAAAAABBBB\\xf4\\x83\\x04\\x08\\x00"}
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   367
\end{textblock}
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   368
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   369
\end{frame}
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   370
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   371
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   372
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
471
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   373
\tikzset{alt/.code args={<#1>#2#3#4}{%
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   374
  \alt<#1>{\pgfkeysalso{#2}}{\pgfkeysalso{#3}} % \pgfkeysalso doesn't change the path
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   375
}}
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   376
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   377
\begin{frame}[t]
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   378
\frametitle{Buffer Overflow Attacks}
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   379
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   380
\begin{itemize}
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   381
\item the problem arises from the way C/C++ organises its function calls\\[-8mm]\mbox{}
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   382
\end{itemize}
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   383
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   384
\begin{center}
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   385
\begin{tikzpicture}[scale=1]
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   386
%\draw[black!10,step=2mm] (0,0) grid (9,4);
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   387
%\draw[black!10,thick,step=10mm] (0,0) grid (9,4);
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   388
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   389
\node at (0.5,4.5) {\small\begin{tabular}{l}main\\[-2mm] prog.\end{tabular}};
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   390
\draw[line width=0mm, white, alt=<2->{fill=red}{fill=blue}] (0,2.5) rectangle (1,3.8);
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   391
\draw[line width=0mm, white, alt=<9->{fill=red}{fill=blue}] (0,0.2) rectangle (1,0.5);
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   392
\draw[line width=1mm, alt=<3->{fill=yellow}{fill=blue}] (0,2.0) rectangle (1,2.5);
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   393
\draw[line width=1mm, alt=<6->{fill=red}{fill=blue}] (0,1.0) rectangle (1,2.0);
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   394
\draw[line width=1mm, alt=<7->{fill=yellow}{fill=blue}] (0,0.5) rectangle (1,1.0);
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   395
\draw[line width=1mm] (0,0) -- (0,4);
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   396
\draw[line width=1mm] (1,0) -- (1,4);
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   397
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   398
\node at (3.5,3.5) {\small\begin{tabular}{l}fact(n)\end{tabular}};
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   399
\draw[line width=1mm, alt=<{4-5,8}>{fill=red}{fill=blue}] (3,1.0) rectangle (4,3.0);
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   400
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   401
\onslide<3-4>{\draw[->, line width=1mm,red] (1,2.3) to node [above,sloped,midway] {n=4} (3,3);}
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   402
\onslide<5>{\draw[<-, line width=1mm,red] (1,2.3) to node [above,sloped,midway] {res=24} (3,1);}
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   403
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   404
\onslide<7-8>{\draw[->, line width=1mm,red] (1,0.8) to node [above,sloped,midway] {n=3} (3,3);}
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   405
\onslide<9>{\draw[<-, line width=1mm,red] (1,0.8) to node [above,sloped,midway] {res=6} (3,1);}
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   406
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   407
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   408
\node at (7.75,3.9) {\small\begin{tabular}{l}stack\end{tabular}};
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   409
\draw[line width=1mm] (7,3.5) -- (7,0.5) -- (8.5,0.5) -- (8.5,3.5);
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   410
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   411
\onslide<3,4,7,8>{
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   412
\node at (7.75, 1.4) {ret};
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   413
\draw[line width=1mm] (7,1.1) -- (8.5,1.1);
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   414
\node at (7.75, 2.0) {sp};
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   415
\draw[line width=1mm] (7,2.3) -- (8.5,2.3);
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   416
}
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   417
\onslide<3,4>{
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   418
\node at (7.75, 0.8) {4};
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   419
\draw[line width=1mm] (7,1.7) -- (8.5,1.7);
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   420
}
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   421
\onslide<7,8>{
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   422
\node at (7.75, 0.8) {3};
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   423
\draw[line width=1mm] (7,1.7) -- (8.5,1.7);
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   424
}
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   425
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   426
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   427
\end{tikzpicture}
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   428
\end{center}
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   429
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   430
\end{frame}
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   431
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   432
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   433
\begin{frame}[t]
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   434
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   435
\begin{center}
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   436
\begin{tikzpicture}[scale=1]
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   437
%\draw[black!10,step=2mm] (0,0) grid (9,4);
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   438
%\draw[black!10,thick,step=10mm] (0,0) grid (9,4);
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   439
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   440
\node at (0.5,4.5) {\small\begin{tabular}{l}main\\[-2mm] prog.\end{tabular}};
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   441
\draw[line width=0mm, white, alt=<2->{fill=red}{fill=blue}] (0,2.5) rectangle (1,3.8);
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   442
\draw[line width=1mm, white, fill=blue] (0,1.0) rectangle (1,2.0);
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   443
\draw[line width=1mm, alt=<3->{fill=yellow}{fill=blue}] (0,2.0) rectangle (1,2.5);
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   444
\draw[line width=1mm] (0,0) -- (0,4);
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   445
\draw[line width=1mm] (1,0) -- (1,4);
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   446
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   447
\node at (3.5,3.5) {\small\begin{tabular}{l}fact(n)\end{tabular}};
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   448
\draw[line width=0mm, alt=<{4-}>{red, fill=red}{blue, fill=blue}] (3,2.8) rectangle (4,3.0);
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   449
\draw[line width=0mm, alt=<{5-}>{red, fill=red}{blue, fill=blue}] (3,2.8) rectangle (4,2.0);
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   450
\draw[line width=0mm, alt=<{7-}>{red, fill=red}{blue, fill=blue}] (3,2.0) rectangle (4,1.0);
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   451
\draw[line width=1mm] (3,1.0) rectangle (4,3.0);
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   452
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   453
\onslide<3->{\draw[->, line width=1mm,red] (1,2.3) to node [above,sloped,midway] {n=4} (3,3);}
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   454
\onslide<5->{\draw[<-, line width=2mm,red] (4,2) to node [above,sloped,midway] 
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   455
{\begin{tabular}{l}user\\[-1mm] input\end{tabular}} (6,2);}
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   456
\onslide<8->{\draw[<-, line width=1mm,red] (1,-2) to (3,1);}
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   457
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   458
\node at (7.75,3.9) {\small\begin{tabular}{l}stack\end{tabular}};
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   459
\draw[line width=1mm] (7,3.5) -- (7,-0.1) -- (8.5,-0.1) -- (8.5,3.5);
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   460
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   461
\onslide<3->{
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   462
\node at (7.75, 0.2) {4};
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   463
\draw[line width=1mm,alt=<6->{fill=red}{fill=white}] (7,0.5) rectangle (8.5,1.1);
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   464
\node at (7.75, 0.8) {\alt<6->{@a\#}{ret}};
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   465
\draw[line width=1mm,alt=<6->{fill=red}{fill=white}] (7,1.1) rectangle (8.5,1.7);
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   466
\node at (7.75, 1.4) {\alt<6->{!?w;}sp};
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   467
}
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   468
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   469
\onslide<4->{
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   470
\draw[line width=1mm,fill=red] (7,1.7) rectangle (8.5,3.0);
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   471
\node[white] at (7.75, 2.4) {buffer};
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   472
}
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   473
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   474
\end{tikzpicture}
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   475
\end{center}
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   476
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   477
\end{frame}
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   478
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   479
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   480
97ab057cbd2e updated
Christian Urban <urbanc@in.tum.de>
parents: 467
diff changeset
   481
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
220
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   482
\begin{frame}[c]
398
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   483
\frametitle{C-Library Functions}
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   484
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   485
\begin{itemize}
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   486
\item copy everything up to the zero byte
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   487
\end{itemize}\medskip
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   488
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   489
{\small
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   490
\lstinputlisting[language=C,numbers=none]{../progs/app5.c}}
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   491
  
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   492
  
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   493
\end{frame}
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   494
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   495
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   496
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   497
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   498
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   499
\begin{frame}[c]
220
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   500
\frametitle{Payloads}
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   501
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   502
\begin{itemize}
546
3d1f65e43065 updated
cu
parents: 518
diff changeset
   503
\item the idea is that you store some code in the buffer (the ``payload'')
220
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   504
\item you then override the return address to execute this payload\medskip
398
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   505
\item normally you want to start a shell\pause
220
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   506
\item difficulty is to guess the right place where to ``jump''
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   507
\end{itemize}
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   508
  
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   509
\end{frame}
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   510
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   511
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   512
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
221
ae6074cc446a updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 220
diff changeset
   513
\begin{frame}[t]
239
0db764174afb updated home works
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 226
diff changeset
   514
\frametitle{Starting a Shell}
221
ae6074cc446a updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 220
diff changeset
   515
ae6074cc446a updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 220
diff changeset
   516
\small
400
f05368d007dd updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 398
diff changeset
   517
\lstinputlisting[language=C,numbers=none,xleftmargin=-6mm]{../progs/o2.c}
221
ae6074cc446a updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 220
diff changeset
   518
ae6074cc446a updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 220
diff changeset
   519
\begin{textblock}{7}(5,7.5)
ae6074cc446a updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 220
diff changeset
   520
\begin{bubble}[7cm]
ae6074cc446a updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 220
diff changeset
   521
\lstinputlisting[language=C,numbers=none,xleftmargin=-0mm]{../progs/shell.c}
ae6074cc446a updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 220
diff changeset
   522
\end{bubble}
ae6074cc446a updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 220
diff changeset
   523
\end{textblock}
ae6074cc446a updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 220
diff changeset
   524
  
ae6074cc446a updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 220
diff changeset
   525
\end{frame}
ae6074cc446a updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 220
diff changeset
   526
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ae6074cc446a updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 220
diff changeset
   527
ae6074cc446a updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 220
diff changeset
   528
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
220
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   529
\begin{frame}[c]
221
ae6074cc446a updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 220
diff changeset
   530
\frametitle{Avoiding \texttt{$\backslash$x00}}
220
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   531
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   532
\begin{itemize}
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   533
\item another difficulty is that the code is not allowed to contain \texttt{$\backslash$x00}:
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   534
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   535
\begin{center}
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   536
\texttt{xorl   \%eax, \%eax}
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   537
\end{center}
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   538
\end{itemize}\bigskip\bigskip
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   539
  
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   540
{\small
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   541
\lstinputlisting[language=C,numbers=none]{../progs/app5.c}}
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   542
  
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   543
\end{frame}
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   544
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   545
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   546
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
400
f05368d007dd updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 398
diff changeset
   547
\begin{frame}[t]
f05368d007dd updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 398
diff changeset
   548
\frametitle{String from the Web}
f05368d007dd updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 398
diff changeset
   549
f05368d007dd updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 398
diff changeset
   550
{\small
f05368d007dd updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 398
diff changeset
   551
\lstinputlisting[language=C,numbers=none,xleftmargin=-6mm]{../progs/o1.c}}
f05368d007dd updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 398
diff changeset
   552
\bigskip\bigskip
f05368d007dd updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 398
diff changeset
   553
f05368d007dd updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 398
diff changeset
   554
\noindent 
f05368d007dd updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 398
diff changeset
   555
More ``interesting'' shell programs can be found at 
f05368d007dd updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 398
diff changeset
   556
f05368d007dd updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 398
diff changeset
   557
\begin{center}
f05368d007dd updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 398
diff changeset
   558
\url{http://shellblade.net/shellcode.html}
f05368d007dd updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 398
diff changeset
   559
\end{center}
f05368d007dd updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 398
diff changeset
   560
  
f05368d007dd updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 398
diff changeset
   561
\end{frame}
f05368d007dd updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 398
diff changeset
   562
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
f05368d007dd updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 398
diff changeset
   563
f05368d007dd updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 398
diff changeset
   564
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
220
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   565
\begin{frame}[c]
221
ae6074cc446a updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 220
diff changeset
   566
\frametitle{Overflow.c}
467
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
   567
\mbox{}\\[-6mm]
221
ae6074cc446a updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 220
diff changeset
   568
222
81f9f0eb1180 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 221
diff changeset
   569
\small
81f9f0eb1180 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 221
diff changeset
   570
\lstinputlisting[language=C,xleftmargin=-4mm,numbers=none]{../progs/overflow.c}
221
ae6074cc446a updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 220
diff changeset
   571
ae6074cc446a updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 220
diff changeset
   572
  
ae6074cc446a updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 220
diff changeset
   573
\end{frame}
ae6074cc446a updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 220
diff changeset
   574
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ae6074cc446a updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 220
diff changeset
   575
391
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   576
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   577
\begin{frame}[c]
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   578
\frametitle{Optimising Success}
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   579
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   580
\begin{center}
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   581
\begin{tabular}{l@{\hspace{2cm}}l}
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   582
  \begin{tikzpicture}[scale=0.6]
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   583
  \draw[line width=1mm] (-2, -1) rectangle (2,3);
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   584
  \draw[line width=1mm,fill=blue!30] (-2, 1.9) rectangle (2,3);
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   585
  \draw (0,2.5) node {\small\tt shell code};
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   586
  \draw[line width=1mm,fill=black] (0.3, -1) rectangle (2,-0.7);
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   587
  \draw[->,line width=0.3mm] (1.05, -1) -- (1.05,-1.7) --
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   588
  (-3,-1.7) -- (-3, 3.7) -- (-1.9, 3.7) -- (-1.9, 3.1);
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   589
   \end{tikzpicture}
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   590
&
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   591
 \onslide<2>{
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   592
 \begin{tikzpicture}[scale=0.6]
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   593
  \draw[gray!50,fill=red!30] (-2,0.3) rectangle (2,3);
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   594
  \draw[line width=1mm] (-2, -1) rectangle (2,3);
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   595
  \draw[line width=1mm,fill=blue!30] (-2, 0.3) rectangle (2, -0.7);
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   596
  \draw (0,-0.2) node {\small\tt shell code};
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   597
  \draw[line width=1mm,fill=black] (0.3, -1) rectangle (2,-0.7);
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   598
  \draw [line width=0.5,decoration={brace,amplitude=2mm},decorate] 
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   599
    (2.3,3) -- (2.3,0.3);
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   600
  \draw[line width=0.3mm] (1.05, -1) -- (1.05,-1.7) --
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   601
  (3,-1.7) -- (3,1.65) -- (2.6, 1.65);
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   602
  \end{tikzpicture}}
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   603
\end{tabular}
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   604
\end{center}\bigskip
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   605
  
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   606
\onslide<2>{  
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   607
fill up the red part of the string with \pcode{NOP} operations
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   608
(Intel \texttt{$\backslash$x90})}  
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   609
  
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   610
\end{frame}
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   611
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   612
398
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   613
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   614
\begin{frame}[c]
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   615
\frametitle{Why BOAs Work?}
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   616
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   617
\begin{itemize}
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   618
\item stack grows from higher addresses to lower addresses
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   619
\item library functions copy memory until a zero-byte is 
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   620
encountered
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   621
\end{itemize}
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   622
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   623
\begin{center}
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   624
\begin{tabular}{@{\hspace{-7mm}}c@{\hspace{2mm}}c@{}}
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   625
\small
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   626
\begin{tikzpicture}[scale=0.45]
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   627
  %\draw[step=1cm] (-3,-3) grid (3,3);
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   628
  \draw[line width=1mm] (-2, -3) rectangle (2,3);
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   629
  \draw[line width=1mm] (-2,1) -- (2,1);
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   630
  \draw[line width=1mm] (-2,-1) -- (2,-1);
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   631
  \draw (0,2) node {\tt text};
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   632
  \draw (0,0) node {\tt heap};
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   633
  \draw (0,-2) node {\tt stack};
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   634
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   635
  \draw (-2.7,3) node[anchor=north east] 
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   636
     {\tt\begin{tabular}{@{}l@{}}lower\\ address\end{tabular}};
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   637
  \draw (-2.7,-3) node[anchor=south east] 
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   638
     {\tt\begin{tabular}{@{}l@{}}higher\\ address\end{tabular}};
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   639
  \draw[->, line width=1mm] (-2.5,3) -- (-2.5,-3);
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   640
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   641
  \draw (2.7,-3) node[anchor=south west] {\tt\footnotesize older};
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   642
  \draw (2.7,-1) node[anchor=north west] {\tt\footnotesize newer};
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   643
  \draw[|->, line width=1mm] (2.5,-3.09) -- (2.5,-1);
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   644
  \end{tikzpicture}
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   645
&  
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   646
\raisebox{1.3cm}{\footnotesize
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   647
\lstinputlisting[language=C,numbers=none]{../progs/app5.c}}
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   648
\end{tabular}  
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   649
\end{center}  
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   650
  
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   651
\end{frame}
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   652
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
221
ae6074cc446a updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 220
diff changeset
   653
ae6074cc446a updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 220
diff changeset
   654
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ae6074cc446a updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 220
diff changeset
   655
\begin{frame}[c]
220
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   656
\frametitle{Variants}
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   657
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   658
There are many variants:
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   659
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   660
\begin{itemize}
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   661
\item return-to-lib-C attacks
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   662
\item heap-smashing attacks\\
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   663
\textcolor{gray}{\small(Slammer Worm in 2003 infected 90\% of vulnerable systems within 10 minutes)}\bigskip
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   664
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   665
\item ``zero-days-attacks'' (new unknown vulnerability)
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   666
\end{itemize}
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   667
  
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   668
\end{frame}
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   669
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   670
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   671
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   672
\begin{frame}[c]
396
2f4296a0ab21 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 392
diff changeset
   673
\frametitle{\begin{tabular}{c}
2f4296a0ab21 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 392
diff changeset
   674
            Protections against\\
2f4296a0ab21 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 392
diff changeset
   675
            Buffer Overflow Attacks
2f4296a0ab21 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 392
diff changeset
   676
            \end{tabular}}
220
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   677
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   678
\begin{itemize}
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   679
\item use safe library functions
226
01fe5aba8781 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 223
diff changeset
   680
\item stack canaries
220
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   681
\item ensure stack data is not executable (can be defeated)
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   682
\item address space randomisation (makes one-size-fits-all more difficult)
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   683
\item choice of programming language (one of the selling points of Java)
226
01fe5aba8781 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 223
diff changeset
   684
\end{itemize}
220
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   685
226
01fe5aba8781 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 223
diff changeset
   686
\only<2>{  
01fe5aba8781 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 223
diff changeset
   687
\begin{textblock}{7}(6,1)
396
2f4296a0ab21 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 392
diff changeset
   688
  \begin{bubble}[5.5cm]
2f4296a0ab21 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 392
diff changeset
   689
  \begin{tabular}{cp{2.9cm}}
226
01fe5aba8781 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 223
diff changeset
   690
  \begin{tikzpicture}[baseline=40mm,scale=0.8]
01fe5aba8781 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 223
diff changeset
   691
  %\draw[step=1cm] (-3,-1) grid (3,8);
01fe5aba8781 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 223
diff changeset
   692
  \draw[gray!20,fill=gray!20] (-1, 0) rectangle (1,-1);
01fe5aba8781 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 223
diff changeset
   693
  \draw[line width=1mm] (-1,-1.2) -- (-1,7.4);
01fe5aba8781 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 223
diff changeset
   694
  \draw[line width=1mm] ( 1,-1.2) -- ( 1,7.4);
01fe5aba8781 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 223
diff changeset
   695
  \draw (0,-1) node[anchor=south] {\tt main};
01fe5aba8781 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 223
diff changeset
   696
  \draw[line width=1mm] (-1,0) -- (1,0);
01fe5aba8781 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 223
diff changeset
   697
  \draw (0,0) node[anchor=south] {\tt arg$_3$=3};
01fe5aba8781 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 223
diff changeset
   698
  \draw[line width=1mm] (-1,1) -- (1,1);
01fe5aba8781 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 223
diff changeset
   699
  \draw (0,1) node[anchor=south] {\tt arg$_2$=2};
01fe5aba8781 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 223
diff changeset
   700
  \draw[line width=1mm] (-1,2) -- (1,2);
01fe5aba8781 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 223
diff changeset
   701
  \draw (0,2) node[anchor=south] {\tt arg$_1$=1};
01fe5aba8781 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 223
diff changeset
   702
  \draw[line width=1mm] (-1,3) -- (1,3);
01fe5aba8781 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 223
diff changeset
   703
  \draw (0,3.1) node[anchor=south] {\tt ret};
01fe5aba8781 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 223
diff changeset
   704
  \draw[line width=1mm] (-1,4) -- (1,4);
01fe5aba8781 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 223
diff changeset
   705
  \draw (0,4) node[anchor=south] {\small\tt last sp};
01fe5aba8781 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 223
diff changeset
   706
  \draw[line width=1mm] (-1,5) -- (1,5);
01fe5aba8781 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 223
diff changeset
   707
  \draw (0,5) node[anchor=south] {\tt\small\alert{\textbf{random}}};
01fe5aba8781 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 223
diff changeset
   708
  \draw[line width=1mm] (-1,6) -- (1,6);
01fe5aba8781 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 223
diff changeset
   709
  \draw (0,6) node[anchor=south] {\tt buf};
01fe5aba8781 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 223
diff changeset
   710
  \draw[line width=1mm] (-1,7) -- (1,7);
01fe5aba8781 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 223
diff changeset
   711
  \end{tikzpicture} &
396
2f4296a0ab21 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 392
diff changeset
   712
  \raggedright stack canary: a random value after the local variables
226
01fe5aba8781 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 223
diff changeset
   713
  \end{tabular}
01fe5aba8781 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 223
diff changeset
   714
\end{bubble}
01fe5aba8781 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 223
diff changeset
   715
\end{textblock}}
01fe5aba8781 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 223
diff changeset
   716
01fe5aba8781 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 223
diff changeset
   717
220
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   718
\end{frame}
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   719
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   720
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   721
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
74772c30e0f4 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 216
diff changeset
   722
\begin{frame}[c]
398
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   723
\frametitle{In my Examples I Cheated}
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   724
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   725
I compiled the programs with
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   726
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   727
\begin{center}
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   728
\begin{tabular}{l@{\hspace{1mm}}l}
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   729
\pcode{/usr/bin/gcc} & \pcode{-ggdb -O0}\\
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   730
                     & \pcode{-fno-stack-protector}\\
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   731
                     & \pcode{-mpreferred-stack-boundary=2}\\
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   732
                     & \pcode{-z execstack} 
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   733
\end{tabular}
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   734
\end{center}
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   735
  
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   736
\end{frame}
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   737
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   738
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   739
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   740
b183036ba675 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 396
diff changeset
   741
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
467
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
   742
%% \begin{frame}[c]
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
   743
%% \frametitle{NIST Statistics about BOA}
204
8fe0dc898c73 added example1
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 199
diff changeset
   744
467
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
   745
%% \begin{center}
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
   746
%% \begin{tikzpicture}
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
   747
%% \begin{axis}[
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
   748
%%     xlabel={year},
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
   749
%%     ylabel={\% of total attacks},
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
   750
%%     ylabel style={yshift=0em},
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
   751
%%     enlargelimits=false,
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
   752
%%     xtick={1997,1999,2001,...,2015},
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
   753
%%     xmin=1996.5,
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
   754
%%     xmax=2016,
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
   755
%%     ymax=21,
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
   756
%%     ytick={0,5,...,20},
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
   757
%%     scaled ticks=false,
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
   758
%%     axis lines=left,
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
   759
%%     width=11cm,
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
   760
%%     height=5cm,
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
   761
%%     ybar,
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
   762
%%     nodes near coords=
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
   763
%%      {\footnotesize
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
   764
%%       $\pgfmathprintnumber[fixed,fixed zerofill,precision=1,use comma]{\pgfkeysvalueof{/data point/y}}$},
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
   765
%%     x tick label style={font=\footnotesize,/pgf/number format/1000 sep={}}]
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
   766
%% \addplot
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
   767
%%    table [x=Year,y=Percentage] {../handouts/bufferoverflows.data};
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
   768
%% \end{axis}
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
   769
%% \end{tikzpicture}
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
   770
%% \end{center}
204
8fe0dc898c73 added example1
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 199
diff changeset
   771
  
467
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
   772
%% from the US National Vulnerability Database\\
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
   773
%% \small\url{http://web.nvd.nist.gov/view/vuln/statistics}
391
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   774
  
467
da4896f201b5 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 400
diff changeset
   775
%% \end{frame}
391
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   776
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
204
8fe0dc898c73 added example1
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 199
diff changeset
   777
391
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   778
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   779
\begin{frame}[fragile]
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   780
\frametitle{D-Link Wifi Router, BOA}
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   781
\small
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   782
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   783
As a proof-of-concept, the following URL allows 
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   784
attackers to control the return value saved on 
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   785
the stack (the vulnerability is triggered when
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   786
executing \pcode{"/usr/sbin/widget"}):
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   787
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   788
\begin{center}\footnotesize 
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   789
\pcode{curl http://<target ip>/post_login.xml?hash=AAA...AAABBBB}
204
8fe0dc898c73 added example1
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 199
diff changeset
   790
\end{center}
8fe0dc898c73 added example1
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 199
diff changeset
   791
391
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   792
The value of the "hash" HTTP GET parameter consists of
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   793
292 occurrences of the \pcode{'A'} character, followed by four 
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   794
occurrences of character \pcode{'B'}. In our lab setup, characters 
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   795
\pcode{'B'} overwrite the saved program counter (\pcode{\%ra}).\bigskip
114
3822d91a4639 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 113
diff changeset
   796
3822d91a4639 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 113
diff changeset
   797
391
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   798
\begin{tabular}{@{}ll}
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   799
Discovery date: & 06/03/2013\\
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   800
Release date:   & 02/08/2013
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   801
\end{tabular}\bigskip
114
3822d91a4639 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 113
diff changeset
   802
3822d91a4639 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 113
diff changeset
   803
391
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   804
\footnotesize
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   805
\hfill\url{http://roberto.greyhats.it/advisories/20130801-dlink-dir645.txt} 
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   806
\end{frame}
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   807
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   808
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   809
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   810
\begin{frame}[fragile]
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   811
\frametitle{GHOST in Glibc}
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   812
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   813
\small The GHOST vulnerability is a buffer overflow condition
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   814
that can be easily exploited locally and remotely. This
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   815
vulnerability is named after the GetHOSTbyname function
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   816
involved in the exploit.\medskip 
114
3822d91a4639 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 113
diff changeset
   817
391
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   818
The attack allows the attacker to execute arbitrary code and
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   819
take control of the victim’s vulnerable machine.
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   820
Unfortunately, the vulnerability exists in the GNU C Library
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   821
(glibc), a code library originally released in 2000, meaning
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   822
it has been widely distributed. Although an update released by
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   823
Linux in 2013 mitigated this vulnerability, most systems and
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   824
products have not installed the patch.\medskip 
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   825
114
3822d91a4639 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 113
diff changeset
   826
391
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   827
\begin{tabular}{@{}ll} 
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   828
Release date: & 01/28/2015
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   829
\end{tabular}\smallskip
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   830
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   831
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   832
\footnotesize
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   833
\hfill\url{https://community.qualys.com/blogs/laws-of-vulnerabilities/2015/01/27/the-ghost-vulnerability} 
a612dd3ddc81 updated slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 381
diff changeset
   834
\end{frame}
114
3822d91a4639 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 113
diff changeset
   835
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
3822d91a4639 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 113
diff changeset
   836
392
4dff36e2bbc6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 391
diff changeset
   837
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4dff36e2bbc6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 391
diff changeset
   838
\begin{frame}[c]
4dff36e2bbc6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 391
diff changeset
   839
\frametitle{Format String Vulnerability}
4dff36e2bbc6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 391
diff changeset
   840
4dff36e2bbc6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 391
diff changeset
   841
\small
4dff36e2bbc6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 391
diff changeset
   842
\texttt{string} is nowhere used:\bigskip
4dff36e2bbc6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 391
diff changeset
   843
4dff36e2bbc6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 391
diff changeset
   844
{\footnotesize\lstinputlisting[language=C]{../progs/C4.c}}\bigskip
4dff36e2bbc6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 391
diff changeset
   845
4dff36e2bbc6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 391
diff changeset
   846
this vulnerability can be used to read out the stack
4dff36e2bbc6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 391
diff changeset
   847
  
4dff36e2bbc6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 391
diff changeset
   848
\end{frame}
4dff36e2bbc6 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 391
diff changeset
   849
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
114
3822d91a4639 added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 113
diff changeset
   850
113
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 112
diff changeset
   851
28
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   852
\end{document}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   853
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   854
%%% Local Variables:  
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   855
%%% mode: latex
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   856
%%% TeX-master: t
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   857
%%% End: 
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   858