slides/slides03.tex
author Christian Urban <christian dot urban at kcl dot ac dot uk>
Tue, 08 Oct 2013 02:22:53 +0100
changeset 111 677179c76e35
parent 105 40c51038c9e4
child 112 0711775cb6b0
permissions -rw-r--r--
added
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}
105
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
     2
\usepackage{beamerthemeplaincu}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
     3
%%\usepackage[T1]{fontenc}
28
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     4
\usepackage[latin1]{inputenc}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     5
\usepackage{mathpartir}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     6
\usepackage[absolute,overlay]{textpos}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     7
\usepackage{ifthen}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     8
\usepackage{tikz}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     9
\usepackage{pgf}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    10
\usepackage{calc} 
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    11
\usepackage{ulem}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    12
\usepackage{courier}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    13
\usepackage{listings}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    14
\renewcommand{\uline}[1]{#1}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    15
\usetikzlibrary{arrows}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    16
\usetikzlibrary{automata}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    17
\usetikzlibrary{shapes}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    18
\usetikzlibrary{shadows}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    19
\usetikzlibrary{positioning}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    20
\usetikzlibrary{calc}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    21
\usepackage{graphicx} 
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    22
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    23
\definecolor{javared}{rgb}{0.6,0,0} % for strings
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    24
\definecolor{javagreen}{rgb}{0.25,0.5,0.35} % comments
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    25
\definecolor{javapurple}{rgb}{0.5,0,0.35} % keywords
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    26
\definecolor{javadocblue}{rgb}{0.25,0.35,0.75} % javadoc
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    27
111
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 105
diff changeset
    28
\makeatletter
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 105
diff changeset
    29
\lst@CCPutMacro\lst@ProcessOther {"2D}{\lst@ttfamily{-{}}{-{}}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 105
diff changeset
    30
\@empty\z@\@empty
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 105
diff changeset
    31
\makeatother
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 105
diff changeset
    32
28
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    33
\lstset{language=Java,
111
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 105
diff changeset
    34
	basicstyle=\consolas,
28
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    35
	keywordstyle=\color{javapurple}\bfseries,
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    36
	stringstyle=\color{javagreen},
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    37
	commentstyle=\color{javagreen},
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    38
	morecomment=[s][\color{javadocblue}]{/**}{*/},
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    39
	numbers=left,
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    40
	numberstyle=\tiny\color{black},
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    41
	stepnumber=1,
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    42
	numbersep=10pt,
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    43
	tabsize=2,
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    44
	showspaces=false,
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    45
	showstringspaces=false}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    46
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    47
\lstdefinelanguage{scala}{
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    48
  morekeywords={abstract,case,catch,class,def,%
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    49
    do,else,extends,false,final,finally,%
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    50
    for,if,implicit,import,match,mixin,%
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    51
    new,null,object,override,package,%
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    52
    private,protected,requires,return,sealed,%
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    53
    super,this,throw,trait,true,try,%
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    54
    type,val,var,while,with,yield},
111
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 105
diff changeset
    55
  otherkeywords={=>,<-,<\%,<:,>:,\#,@,->},
28
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    56
  sensitive=true,
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    57
  morecomment=[l]{//},
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    58
  morecomment=[n]{/*}{*/},
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    59
  morestring=[b]",
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    60
  morestring=[b]',
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    61
  morestring=[b]"""
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    62
}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    63
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    64
\lstset{language=Scala,
111
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 105
diff changeset
    65
	basicstyle=\consolas,
28
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    66
	keywordstyle=\color{javapurple}\bfseries,
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    67
	stringstyle=\color{javagreen},
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    68
	commentstyle=\color{javagreen},
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    69
	morecomment=[s][\color{javadocblue}]{/**}{*/},
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    70
	numbers=left,
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    71
	numberstyle=\tiny\color{black},
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    72
	stepnumber=1,
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    73
	numbersep=10pt,
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    74
	tabsize=2,
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    75
	showspaces=false,
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    76
	showstringspaces=false}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    77
111
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 105
diff changeset
    78
28
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    79
% beamer stuff 
111
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 105
diff changeset
    80
\renewcommand{\slidecaption}{APP 03, King's College London, 8 October 2013}
28
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    81
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    82
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    83
\begin{document}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    84
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    85
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    86
\mode<presentation>{
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    87
\begin{frame}<1>[t]
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    88
\frametitle{%
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    89
  \begin{tabular}{@ {}c@ {}}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    90
  \\
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    91
  \LARGE Access Control and \\[-3mm] 
111
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 105
diff changeset
    92
  \LARGE Privacy Policies (3)\\[-6mm] 
28
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    93
  \end{tabular}}\bigskip\bigskip\bigskip
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    94
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    95
  %\begin{center}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    96
  %\includegraphics[scale=1.3]{pics/barrier.jpg}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    97
  %\end{center}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    98
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    99
\normalsize
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   100
  \begin{center}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   101
  \begin{tabular}{ll}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   102
  Email:  & christian.urban at kcl.ac.uk\\
111
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 105
diff changeset
   103
  Office: & S1.27 (1st floor Strand Building)\\
105
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   104
  Slides: & KEATS (also home work is there)
28
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   105
  \end{tabular}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   106
  \end{center}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   107
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   108
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   109
\end{frame}}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   110
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   111
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   112
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   113
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   114
\mode<presentation>{
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   115
\begin{frame}[c]
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   116
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   117
\begin{center}
105
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   118
\begin{tabular}[t]{c}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   119
\includegraphics[scale=1.2]{pics/barrier.jpg}\\
111
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 105
diff changeset
   120
first lecture
105
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   121
\end{tabular}\;\;\;
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   122
\onslide<2>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   123
\begin{tabular}[t]{c}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   124
\includegraphics[scale=0.32]{pics/trainwreck.jpg}\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   125
today
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   126
\end{tabular}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   127
}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   128
\end{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   129
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   130
  
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   131
\end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   132
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   133
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   134
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   135
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   136
\mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   137
\begin{frame}[c]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   138
\frametitle{\begin{tabular}{@ {}c@ {}}Smash the Stack for Fun \ldots\end{tabular}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   139
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   140
\begin{itemize}
111
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 105
diff changeset
   141
\item ``smashing the stack attacks'' or\\ ``buffer overflow attacks''\medskip
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 105
diff changeset
   142
\item one of the most popular attacks\\ ($>$ 50\% of security incidents reported at CERT are related to buffer overflows)
105
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   143
\begin{flushright}\small
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   144
\textcolor{gray}{\url{http://www.kb.cert.org/vuls}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   145
\end{flushright}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   146
\medskip
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   147
\item made popular in an article by Elias Levy\\ (also known as Aleph One):\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   148
\begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   149
{\bf ``Smashing The Stack For Fun and Profit''}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   150
\end{center}\medskip
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   151
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   152
\begin{flushright}
111
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 105
diff changeset
   153
\small\textcolor{gray}{Issue 49, Article 14}
105
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   154
\end{flushright} 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   155
 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   156
\end{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   157
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   158
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   159
\end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   160
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   161
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   162
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   163
\mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   164
\begin{frame}[c]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   165
\frametitle{\begin{tabular}{c}The Problem\end{tabular}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   166
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   167
\begin{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   168
\item The basic problem is that library routines in C look as follows:
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   169
\begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   170
{\lstset{language=Java}\fontsize{8}{10}\selectfont%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   171
\texttt{\lstinputlisting{../progs/app5.c}}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   172
\end{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   173
\item the resulting problems are often remotely exploitable 
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   174
\item can be used to circumvents all access control
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   175
(botnets for further attacks)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   176
\end{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   177
  
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   178
\end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   179
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   180
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   181
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   182
\mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   183
\begin{frame}[c]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   184
\frametitle{\begin{tabular}{c}Variants\end{tabular}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   185
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   186
There are many variants:
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   187
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   188
\begin{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   189
\item return-to-lib-C attacks
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   190
\item heap-smashing attacks\\
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   191
\textcolor{gray}{\small(Slammer Worm in 2003 infected 90\% of vulnerable systems within 10 minutes)}\bigskip
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   192
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   193
\item ``zero-days-attacks'' (new unknown vulnerability)
28
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   194
\end{itemize}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   195
  
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   196
\end{frame}}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   197
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   198
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   199
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   200
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   201
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   202
\mode<presentation>{
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   203
\begin{frame}[c]
105
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   204
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   205
\small
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   206
\texttt{my\_float} is printed twice:\bigskip
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   207
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   208
{\lstset{language=Java}\fontsize{8}{10}\selectfont%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   209
\texttt{\lstinputlisting{../progs/C1.c}}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   210
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   211
  
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   212
\end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   213
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   214
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   215
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   216
\mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   217
\begin{frame}[c]
28
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   218
105
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   219
\begin{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   220
\only<1>{\includegraphics[scale=0.9]{pics/stack1}\;\;}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   221
\only<2>{\includegraphics[scale=0.9]{pics/stack2}\;\;}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   222
\only<3>{\includegraphics[scale=0.9]{pics/stack3}\;\;}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   223
\end{center}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   224
  
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   225
  
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   226
\end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   227
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
28
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   228
105
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   229
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   230
\mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   231
\begin{frame}[c]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   232
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   233
{\lstset{language=Java}\fontsize{8}{10}\selectfont%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   234
\texttt{\lstinputlisting{../progs/C2.c}}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   235
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   236
  
28
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   237
\end{frame}}
105
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   238
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
28
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   239
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   240
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   241
\mode<presentation>{
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   242
\begin{frame}[c]
105
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   243
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   244
\small
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   245
A programmer might be careful, but still introduce vulnerabilities:\bigskip
29
Christian Urban <urbanc@in.tum.de>
parents: 28
diff changeset
   246
105
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   247
{\lstset{language=Java}\fontsize{8}{10}\selectfont%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   248
\texttt{\lstinputlisting{../progs/C2a.c}}}
29
Christian Urban <urbanc@in.tum.de>
parents: 28
diff changeset
   249
Christian Urban <urbanc@in.tum.de>
parents: 28
diff changeset
   250
  
Christian Urban <urbanc@in.tum.de>
parents: 28
diff changeset
   251
\end{frame}}
105
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   252
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
29
Christian Urban <urbanc@in.tum.de>
parents: 28
diff changeset
   253
Christian Urban <urbanc@in.tum.de>
parents: 28
diff changeset
   254
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <urbanc@in.tum.de>
parents: 28
diff changeset
   255
\mode<presentation>{
Christian Urban <urbanc@in.tum.de>
parents: 28
diff changeset
   256
\begin{frame}[c]
105
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   257
\frametitle{\begin{tabular}{c}Payloads\end{tabular}}
28
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   258
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   259
\begin{itemize}
105
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   260
\item the idea is you store some code as part to the buffer
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   261
\item you then override the return address to execute this payload\medskip
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   262
\item normally you start a root-shell\pause
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   263
\item difficulty is to guess the right place where to ``jump''
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   264
\end{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   265
  
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   266
\end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   267
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   268
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   269
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   270
\mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   271
\begin{frame}[c]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   272
\frametitle{\begin{tabular}{c}Payloads (2)\end{tabular}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   273
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   274
\begin{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   275
\item another difficulty is that the code is not allowed to contain \texttt{$\backslash$x00}:
28
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   276
29
Christian Urban <urbanc@in.tum.de>
parents: 28
diff changeset
   277
\begin{center}
105
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   278
\texttt{xorl   \%eax, \%eax}
29
Christian Urban <urbanc@in.tum.de>
parents: 28
diff changeset
   279
\end{center}
105
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   280
\end{itemize}\bigskip\bigskip
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   281
  
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   282
{\lstset{language=Java}\fontsize{8}{10}\selectfont%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   283
\texttt{\lstinputlisting{../progs/app5.c}}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   284
  
28
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   285
\end{frame}}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   286
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   287
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   288
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   289
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   290
\mode<presentation>{
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   291
\begin{frame}[c]
105
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   292
\frametitle{\begin{tabular}{c}Format String Vulnerability\end{tabular}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   293
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   294
\small
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   295
\texttt{string} is nowhere used:\bigskip
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   296
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   297
{\lstset{language=Java}\fontsize{8}{10}\selectfont%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   298
\texttt{\lstinputlisting{../progs/C4.c}}}\bigskip
28
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   299
105
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   300
this vulnerability can be used to read out the stack
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   301
  
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   302
\end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   303
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   304
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   305
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   306
\mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   307
\begin{frame}[c]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   308
\frametitle{\begin{tabular}{c}Protections against BO Attacks\end{tabular}}
28
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   309
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   310
\begin{itemize}
105
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   311
\item use safe library functions
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   312
\item ensure stack data is not executable (can be defeated)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   313
\item address space randomisation (makes one-size-fits-all more difficult)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   314
\item choice of programming language (one of the selling points of Java)
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   315
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   316
\end{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   317
  
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   318
\end{frame}}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   319
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
28
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   320
105
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   321
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   322
\mode<presentation>{
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   323
\begin{frame}[c]
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   324
\frametitle{\begin{tabular}{c}Security Goals\end{tabular}}
29
Christian Urban <urbanc@in.tum.de>
parents: 28
diff changeset
   325
105
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   326
\begin{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   327
\item Prevent common vulnerabilities from occurring (e.g. buffer overflows)\pause
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   328
\item Recover from attacks (traceability and auditing of security-relevant actions)\pause
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   329
\item Monitoring (detect attacks)\pause
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   330
\item Privacy, confidentiality, anonymity (to protect secrets)\pause
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   331
\item Authenticity (needed for access control)\pause
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   332
\item Integrity (prevent unwanted modification or tampering)\pause
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   333
\item Availability and reliability (reduce the risk of DoS attacks)
28
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   334
\end{itemize}
105
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   335
  
28
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   336
\end{frame}}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   337
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   338
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   339
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   340
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   341
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   342
\mode<presentation>{
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   343
\begin{frame}[c]
105
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   344
\frametitle{\begin{tabular}{c}Homework\end{tabular}}
28
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   345
29
Christian Urban <urbanc@in.tum.de>
parents: 28
diff changeset
   346
\begin{itemize}
105
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   347
\item Assume format string attacks allow you to read out the stack. What can you do
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   348
	with this information?\bigskip
31
Christian Urban <urbanc@in.tum.de>
parents: 30
diff changeset
   349
105
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   350
\item Assume you can crash a program remotely. Why is this a problem?
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   351
\end{itemize}
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 90
diff changeset
   352
  
30
Christian Urban <urbanc@in.tum.de>
parents: 29
diff changeset
   353
\end{frame}}
Christian Urban <urbanc@in.tum.de>
parents: 29
diff changeset
   354
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
29
Christian Urban <urbanc@in.tum.de>
parents: 28
diff changeset
   355
28
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   356
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   357
\end{document}
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   358
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   359
%%% Local Variables:  
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   360
%%% mode: latex
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   361
%%% TeX-master: t
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   362
%%% End: 
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
   363