slides/slides03.tex
changeset 467 da4896f201b5
parent 400 f05368d007dd
child 471 97ab057cbd2e
--- a/slides/slides03.tex	Tue Oct 04 17:10:01 2016 +0100
+++ b/slides/slides03.tex	Tue Oct 04 22:43:00 2016 +0100
@@ -2,6 +2,7 @@
 \usepackage{../slides}
 \usepackage{../graphics}
 \usepackage{../langs}
+\usepackage{../data}
 
 \setmonofont[Scale=.88]{Consolas}
 \newfontfamily{\consolas}{Consolas}
@@ -58,6 +59,46 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \begin{frame}[c]
+\frametitle{\begin{tabular}{@{}c@{}}According to\\ US Vulnerability DB\end{tabular}}
+
+\begin{center}
+\mbox{}\hspace{-8mm}\begin{tikzpicture}
+\begin{axis}[
+    xlabel={year},
+    xlabel style={yshift=-1em},
+    ylabel={\% of total attacks},
+    ylabel style={yshift=-0em},
+    enlargelimits=false,
+    xtick={1997,2000,2002,...,2016},
+    xmin=1996.5,
+    xmax=2017,
+    ymax=23,
+    ytick={0,5,...,20},
+    scaled ticks=false,
+    axis lines=left,
+    width=11.5cm,
+    height=5cm, 
+    ybar,
+    x tick label style={text height=1ex,font=\footnotesize,/pgf/number format/1000 sep={}},
+    nodes near coords=
+     {\footnotesize
+      $\pgfmathprintnumber[fixed,fixed zerofill,precision=1,use comma]{\pgfkeysvalueof{/data point/y}}$}
+    ]
+\addplot
+  table [x=Year,y=Percentage] {bufferoverflows.data};
+\end{axis}
+\end{tikzpicture}
+\end{center}
+
+
+from the US National Vulnerability Database\\
+\small\url{http://web.nvd.nist.gov/view/vuln/statistics}
+\end{frame}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\begin{frame}[c]
 \frametitle{Smash the Stack for Fun\ldots}
 
 \begin{itemize}
@@ -89,9 +130,9 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \begin{frame}[c]
 \frametitle{A Long Printed ``Twice''}
-\mbox{}\\[-10mm]
+\mbox{}\\[-6mm]
 
-\footnotesize
+\footnotesize 
 \lstinputlisting[language=C,xleftmargin=4mm]{../progs/C0.c}
 
 \end{frame}
@@ -100,7 +141,7 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \begin{frame}[c]
 \frametitle{Printing Out ``Zombies''}
-\mbox{}\\[-10mm]
+\mbox{}\\[-6mm]
 
 \footnotesize
 \lstinputlisting[language=C,xleftmargin=4mm]{../progs/C1.c}
@@ -111,7 +152,7 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \begin{frame}[c]
 \frametitle{A ``Login'' Function (1)}
-\mbox{}\\[-10mm]
+\mbox{}\\[-6mm]
 
 \footnotesize
 \lstinputlisting[language=C,xleftmargin=4mm]{../progs/C2a.c}
@@ -122,7 +163,7 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \begin{frame}[c]
 \frametitle{A ``Login'' Function (2)}
-\mbox{}\\[-10mm]
+\mbox{}\\[-6mm]
 
 \footnotesize
 \lstinputlisting[language=C,xleftmargin=-3mm]{../progs/C2b.c}
@@ -381,7 +422,7 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \begin{frame}[c]
 \frametitle{Overflow.c}
-\mbox{}\\[-10mm]
+\mbox{}\\[-6mm]
 
 \small
 \lstinputlisting[language=C,xleftmargin=-4mm,numbers=none]{../progs/overflow.c}
@@ -556,40 +597,40 @@
 
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\begin{frame}[c]
-\frametitle{NIST Statistics about BOA}
+%% \begin{frame}[c]
+%% \frametitle{NIST Statistics about BOA}
 
-\begin{center}
-\begin{tikzpicture}
-\begin{axis}[
-    xlabel={year},
-    ylabel={\% of total attacks},
-    ylabel style={yshift=0em},
-    enlargelimits=false,
-    xtick={1997,1999,2001,...,2015},
-    xmin=1996.5,
-    xmax=2016,
-    ymax=21,
-    ytick={0,5,...,20},
-    scaled ticks=false,
-    axis lines=left,
-    width=11cm,
-    height=5cm,
-    ybar,
-    nodes near coords=
-     {\footnotesize
-      $\pgfmathprintnumber[fixed,fixed zerofill,precision=1,use comma]{\pgfkeysvalueof{/data point/y}}$},
-    x tick label style={font=\footnotesize,/pgf/number format/1000 sep={}}]
-\addplot
-   table [x=Year,y=Percentage] {../handouts/bufferoverflows.data};
-\end{axis}
-\end{tikzpicture}
-\end{center}
+%% \begin{center}
+%% \begin{tikzpicture}
+%% \begin{axis}[
+%%     xlabel={year},
+%%     ylabel={\% of total attacks},
+%%     ylabel style={yshift=0em},
+%%     enlargelimits=false,
+%%     xtick={1997,1999,2001,...,2015},
+%%     xmin=1996.5,
+%%     xmax=2016,
+%%     ymax=21,
+%%     ytick={0,5,...,20},
+%%     scaled ticks=false,
+%%     axis lines=left,
+%%     width=11cm,
+%%     height=5cm,
+%%     ybar,
+%%     nodes near coords=
+%%      {\footnotesize
+%%       $\pgfmathprintnumber[fixed,fixed zerofill,precision=1,use comma]{\pgfkeysvalueof{/data point/y}}$},
+%%     x tick label style={font=\footnotesize,/pgf/number format/1000 sep={}}]
+%% \addplot
+%%    table [x=Year,y=Percentage] {../handouts/bufferoverflows.data};
+%% \end{axis}
+%% \end{tikzpicture}
+%% \end{center}
   
-from the US National Vulnerability Database\\
-\small\url{http://web.nvd.nist.gov/view/vuln/statistics}
+%% from the US National Vulnerability Database\\
+%% \small\url{http://web.nvd.nist.gov/view/vuln/statistics}
   
-\end{frame}
+%% \end{frame}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%