slides/slides03.tex
changeset 467 da4896f201b5
parent 400 f05368d007dd
child 471 97ab057cbd2e
equal deleted inserted replaced
466:ddf7315450c9 467:da4896f201b5
     1 \documentclass[dvipsnames,14pt,t]{beamer}
     1 \documentclass[dvipsnames,14pt,t]{beamer}
     2 \usepackage{../slides}
     2 \usepackage{../slides}
     3 \usepackage{../graphics}
     3 \usepackage{../graphics}
     4 \usepackage{../langs}
     4 \usepackage{../langs}
       
     5 \usepackage{../data}
     5 
     6 
     6 \setmonofont[Scale=.88]{Consolas}
     7 \setmonofont[Scale=.88]{Consolas}
     7 \newfontfamily{\consolas}{Consolas}
     8 \newfontfamily{\consolas}{Consolas}
     8 
     9 
     9 \hfuzz=220pt 
    10 \hfuzz=220pt 
    56 \end{frame}
    57 \end{frame}
    57 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
    58 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
    58 
    59 
    59 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    60 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    60 \begin{frame}[c]
    61 \begin{frame}[c]
       
    62 \frametitle{\begin{tabular}{@{}c@{}}According to\\ US Vulnerability DB\end{tabular}}
       
    63 
       
    64 \begin{center}
       
    65 \mbox{}\hspace{-8mm}\begin{tikzpicture}
       
    66 \begin{axis}[
       
    67     xlabel={year},
       
    68     xlabel style={yshift=-1em},
       
    69     ylabel={\% of total attacks},
       
    70     ylabel style={yshift=-0em},
       
    71     enlargelimits=false,
       
    72     xtick={1997,2000,2002,...,2016},
       
    73     xmin=1996.5,
       
    74     xmax=2017,
       
    75     ymax=23,
       
    76     ytick={0,5,...,20},
       
    77     scaled ticks=false,
       
    78     axis lines=left,
       
    79     width=11.5cm,
       
    80     height=5cm, 
       
    81     ybar,
       
    82     x tick label style={text height=1ex,font=\footnotesize,/pgf/number format/1000 sep={}},
       
    83     nodes near coords=
       
    84      {\footnotesize
       
    85       $\pgfmathprintnumber[fixed,fixed zerofill,precision=1,use comma]{\pgfkeysvalueof{/data point/y}}$}
       
    86     ]
       
    87 \addplot
       
    88   table [x=Year,y=Percentage] {bufferoverflows.data};
       
    89 \end{axis}
       
    90 \end{tikzpicture}
       
    91 \end{center}
       
    92 
       
    93 
       
    94 from the US National Vulnerability Database\\
       
    95 \small\url{http://web.nvd.nist.gov/view/vuln/statistics}
       
    96 \end{frame}
       
    97 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
       
    98 
       
    99 
       
   100 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   101 \begin{frame}[c]
    61 \frametitle{Smash the Stack for Fun\ldots}
   102 \frametitle{Smash the Stack for Fun\ldots}
    62 
   103 
    63 \begin{itemize}
   104 \begin{itemize}
    64 \item \alert{\bf Buffer Overflow Attacks (BOAs)} or\\ 
   105 \item \alert{\bf Buffer Overflow Attacks (BOAs)} or\\ 
    65 {\bf Smashing the Stack Attacks}\medskip
   106 {\bf Smashing the Stack Attacks}\medskip
    87 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
   128 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
    88 
   129 
    89 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   130 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    90 \begin{frame}[c]
   131 \begin{frame}[c]
    91 \frametitle{A Long Printed ``Twice''}
   132 \frametitle{A Long Printed ``Twice''}
    92 \mbox{}\\[-10mm]
   133 \mbox{}\\[-6mm]
    93 
   134 
    94 \footnotesize
   135 \footnotesize 
    95 \lstinputlisting[language=C,xleftmargin=4mm]{../progs/C0.c}
   136 \lstinputlisting[language=C,xleftmargin=4mm]{../progs/C0.c}
    96 
   137 
    97 \end{frame}
   138 \end{frame}
    98 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
   139 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
    99 
   140 
   100 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   141 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   101 \begin{frame}[c]
   142 \begin{frame}[c]
   102 \frametitle{Printing Out ``Zombies''}
   143 \frametitle{Printing Out ``Zombies''}
   103 \mbox{}\\[-10mm]
   144 \mbox{}\\[-6mm]
   104 
   145 
   105 \footnotesize
   146 \footnotesize
   106 \lstinputlisting[language=C,xleftmargin=4mm]{../progs/C1.c}
   147 \lstinputlisting[language=C,xleftmargin=4mm]{../progs/C1.c}
   107 
   148 
   108 \end{frame}
   149 \end{frame}
   109 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
   150 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
   110 
   151 
   111 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   152 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   112 \begin{frame}[c]
   153 \begin{frame}[c]
   113 \frametitle{A ``Login'' Function (1)}
   154 \frametitle{A ``Login'' Function (1)}
   114 \mbox{}\\[-10mm]
   155 \mbox{}\\[-6mm]
   115 
   156 
   116 \footnotesize
   157 \footnotesize
   117 \lstinputlisting[language=C,xleftmargin=4mm]{../progs/C2a.c}
   158 \lstinputlisting[language=C,xleftmargin=4mm]{../progs/C2a.c}
   118 
   159 
   119 \end{frame}
   160 \end{frame}
   120 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
   161 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
   121 
   162 
   122 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   163 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   123 \begin{frame}[c]
   164 \begin{frame}[c]
   124 \frametitle{A ``Login'' Function (2)}
   165 \frametitle{A ``Login'' Function (2)}
   125 \mbox{}\\[-10mm]
   166 \mbox{}\\[-6mm]
   126 
   167 
   127 \footnotesize
   168 \footnotesize
   128 \lstinputlisting[language=C,xleftmargin=-3mm]{../progs/C2b.c}
   169 \lstinputlisting[language=C,xleftmargin=-3mm]{../progs/C2b.c}
   129 
   170 
   130 \end{frame}
   171 \end{frame}
   379 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   420 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   380 
   421 
   381 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   422 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   382 \begin{frame}[c]
   423 \begin{frame}[c]
   383 \frametitle{Overflow.c}
   424 \frametitle{Overflow.c}
   384 \mbox{}\\[-10mm]
   425 \mbox{}\\[-6mm]
   385 
   426 
   386 \small
   427 \small
   387 \lstinputlisting[language=C,xleftmargin=-4mm,numbers=none]{../progs/overflow.c}
   428 \lstinputlisting[language=C,xleftmargin=-4mm,numbers=none]{../progs/overflow.c}
   388 
   429 
   389   
   430   
   554 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
   595 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
   555 
   596 
   556 
   597 
   557 
   598 
   558 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   599 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   559 \begin{frame}[c]
   600 %% \begin{frame}[c]
   560 \frametitle{NIST Statistics about BOA}
   601 %% \frametitle{NIST Statistics about BOA}
   561 
   602 
   562 \begin{center}
   603 %% \begin{center}
   563 \begin{tikzpicture}
   604 %% \begin{tikzpicture}
   564 \begin{axis}[
   605 %% \begin{axis}[
   565     xlabel={year},
   606 %%     xlabel={year},
   566     ylabel={\% of total attacks},
   607 %%     ylabel={\% of total attacks},
   567     ylabel style={yshift=0em},
   608 %%     ylabel style={yshift=0em},
   568     enlargelimits=false,
   609 %%     enlargelimits=false,
   569     xtick={1997,1999,2001,...,2015},
   610 %%     xtick={1997,1999,2001,...,2015},
   570     xmin=1996.5,
   611 %%     xmin=1996.5,
   571     xmax=2016,
   612 %%     xmax=2016,
   572     ymax=21,
   613 %%     ymax=21,
   573     ytick={0,5,...,20},
   614 %%     ytick={0,5,...,20},
   574     scaled ticks=false,
   615 %%     scaled ticks=false,
   575     axis lines=left,
   616 %%     axis lines=left,
   576     width=11cm,
   617 %%     width=11cm,
   577     height=5cm,
   618 %%     height=5cm,
   578     ybar,
   619 %%     ybar,
   579     nodes near coords=
   620 %%     nodes near coords=
   580      {\footnotesize
   621 %%      {\footnotesize
   581       $\pgfmathprintnumber[fixed,fixed zerofill,precision=1,use comma]{\pgfkeysvalueof{/data point/y}}$},
   622 %%       $\pgfmathprintnumber[fixed,fixed zerofill,precision=1,use comma]{\pgfkeysvalueof{/data point/y}}$},
   582     x tick label style={font=\footnotesize,/pgf/number format/1000 sep={}}]
   623 %%     x tick label style={font=\footnotesize,/pgf/number format/1000 sep={}}]
   583 \addplot
   624 %% \addplot
   584    table [x=Year,y=Percentage] {../handouts/bufferoverflows.data};
   625 %%    table [x=Year,y=Percentage] {../handouts/bufferoverflows.data};
   585 \end{axis}
   626 %% \end{axis}
   586 \end{tikzpicture}
   627 %% \end{tikzpicture}
   587 \end{center}
   628 %% \end{center}
   588   
   629   
   589 from the US National Vulnerability Database\\
   630 %% from the US National Vulnerability Database\\
   590 \small\url{http://web.nvd.nist.gov/view/vuln/statistics}
   631 %% \small\url{http://web.nvd.nist.gov/view/vuln/statistics}
   591   
   632   
   592 \end{frame}
   633 %% \end{frame}
   593 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
   634 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
   594 
   635 
   595 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   636 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   596 \begin{frame}[fragile]
   637 \begin{frame}[fragile]
   597 \frametitle{D-Link Wifi Router, BOA}
   638 \frametitle{D-Link Wifi Router, BOA}