1 \documentclass[dvipsnames,14pt,t]{beamer} |
1 \documentclass[dvipsnames,14pt,t]{beamer} |
2 \usepackage{beamerthemeplaincu} |
2 \usepackage{../slides} |
3 %\usepackage[T1]{fontenc} |
3 \usepackage{../graphics} |
4 \usepackage[latin1]{inputenc} |
4 \usepackage{../langs} |
5 \usepackage{mathpartir} |
|
6 \usepackage[absolute,overlay]{textpos} |
|
7 \usepackage{ifthen} |
|
8 \usepackage{tikz} |
|
9 \usepackage{pgf} |
|
10 \usepackage{calc} |
|
11 \usepackage{ulem} |
|
12 \usepackage{courier} |
|
13 \usepackage{listings} |
|
14 \renewcommand{\uline}[1]{#1} |
|
15 \usetikzlibrary{arrows} |
5 \usetikzlibrary{arrows} |
16 \usetikzlibrary{automata} |
|
17 \usetikzlibrary{shapes} |
6 \usetikzlibrary{shapes} |
18 \usetikzlibrary{shadows} |
7 |
19 \usetikzlibrary{positioning} |
8 \setmonofont[Scale=.88]{Consolas} |
20 \usetikzlibrary{calc} |
9 \newfontfamily{\consolas}{Consolas} |
21 \usepackage{graphicx} |
10 |
22 |
11 \hfuzz=220pt |
23 \definecolor{javared}{rgb}{0.6,0,0} % for strings |
|
24 \definecolor{javagreen}{rgb}{0.25,0.5,0.35} % comments |
|
25 \definecolor{javapurple}{rgb}{0.5,0,0.35} % keywords |
|
26 \definecolor{javadocblue}{rgb}{0.25,0.35,0.75} % javadoc |
|
27 |
|
28 \lstset{language=Java, |
|
29 basicstyle=\ttfamily, |
|
30 keywordstyle=\color{javapurple}\bfseries, |
|
31 stringstyle=\color{javagreen}, |
|
32 commentstyle=\color{javagreen}, |
|
33 morecomment=[s][\color{javadocblue}]{/**}{*/}, |
|
34 numbers=left, |
|
35 numberstyle=\tiny\color{black}, |
|
36 stepnumber=1, |
|
37 numbersep=10pt, |
|
38 tabsize=2, |
|
39 showspaces=false, |
|
40 showstringspaces=false} |
|
41 |
|
42 \lstdefinelanguage{scala}{ |
|
43 morekeywords={abstract,case,catch,class,def,% |
|
44 do,else,extends,false,final,finally,% |
|
45 for,if,implicit,import,match,mixin,% |
|
46 new,null,object,override,package,% |
|
47 private,protected,requires,return,sealed,% |
|
48 super,this,throw,trait,true,try,% |
|
49 type,val,var,while,with,yield}, |
|
50 otherkeywords={=>,<-,<\%,<:,>:,\#,@}, |
|
51 sensitive=true, |
|
52 morecomment=[l]{//}, |
|
53 morecomment=[n]{/*}{*/}, |
|
54 morestring=[b]", |
|
55 morestring=[b]', |
|
56 morestring=[b]""" |
|
57 } |
|
58 |
|
59 \lstset{language=Scala, |
|
60 basicstyle=\ttfamily, |
|
61 keywordstyle=\color{javapurple}\bfseries, |
|
62 stringstyle=\color{javagreen}, |
|
63 commentstyle=\color{javagreen}, |
|
64 morecomment=[s][\color{javadocblue}]{/**}{*/}, |
|
65 numbers=left, |
|
66 numberstyle=\tiny\color{black}, |
|
67 stepnumber=1, |
|
68 numbersep=10pt, |
|
69 tabsize=2, |
|
70 showspaces=false, |
|
71 showstringspaces=false} |
|
72 |
12 |
73 % beamer stuff |
13 % beamer stuff |
74 \renewcommand{\slidecaption}{APP 03, King's College London, 22 October 2014} |
14 \renewcommand{\slidecaption}{APP 04, King's College London} |
75 \makeatletter |
15 \newcommand{\bl}[1]{\textcolor{blue}{#1}} |
76 \def\verbatim@font{\consolas\footnotesize} |
|
77 \makeatother |
|
78 |
16 |
79 \begin{document} |
17 \begin{document} |
80 |
18 |
81 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
19 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
82 \mode<presentation>{ |
20 \begin{frame}[t] |
83 \begin{frame}<1>[t] |
|
84 \frametitle{% |
21 \frametitle{% |
85 \begin{tabular}{@ {}c@ {}} |
22 \begin{tabular}{@ {}c@ {}} |
86 \\ |
23 \\ |
87 \LARGE Access Control and \\[-3mm] |
24 \LARGE Access Control and \\[-3mm] |
88 \LARGE Privacy Policies (4)\\[-6mm] |
25 \LARGE Privacy Policies (4)\\[-6mm] |
95 Office: & S1.27 (1st floor Strand Building)\\ |
32 Office: & S1.27 (1st floor Strand Building)\\ |
96 Slides: & KEATS (also home work is there)\\ |
33 Slides: & KEATS (also home work is there)\\ |
97 \end{tabular} |
34 \end{tabular} |
98 \end{center} |
35 \end{center} |
99 |
36 |
100 |
37 \end{frame} |
101 \end{frame}} |
38 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
102 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
39 |
103 |
40 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
104 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
41 \begin{frame}[c] |
105 \mode<presentation>{ |
42 |
106 \begin{frame}[c] |
43 \begin{center} |
107 |
44 \includegraphics[scale=0.45]{../pics/trainwreck.jpg}\\ |
108 \begin{center} |
45 last week: buffer overflow attacks |
109 \includegraphics[scale=0.45]{pics/trainwreck.jpg}\\ |
46 \end{center} |
110 two weeks ago: buffer overflow attacks |
|
111 \end{center} |
|
112 |
|
113 |
47 |
114 \end{frame}} |
48 \end{frame} |
115 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
49 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
116 |
50 |
117 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
51 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
118 \begin{frame}[fragile] |
52 \begin{frame}[fragile] |
119 \frametitle{D-Link Router, Buffer Overflows} |
53 \frametitle{D-Link Wifi Router, BOA} |
120 |
54 \small |
121 \begin{verbatim} |
55 |
122 As a proof-of-concept, the following URL allows |
56 As a proof-of-concept, the following URL allows |
123 attackers to control the return value saved on |
57 attackers to control the return value saved on |
124 the stack (the vulnerability is triggered when |
58 the stack (the vulnerability is triggered when |
125 executing "/usr/sbin/widget"): |
59 executing "/usr/sbin/widget"): |
126 |
60 |
127 curl http://<target ip>/post_login.xml?hash=AAA...AAABBBB |
61 \begin{center}\footnotesize |
|
62 \pcode{curl http://<target ip>/post_login.xml?hash=AAA...AAABBBB} |
|
63 \end{center} |
128 |
64 |
129 The value of the "hash" HTTP GET parameter consists of |
65 The value of the "hash" HTTP GET parameter consists of |
130 292 occurrences of the 'A' character, followed by four |
66 292 occurrences of the \pcode{'A'} character, followed by four |
131 occurrences of character 'B'. In our lab setup, characters |
67 occurrences of character \pcode{'B'}. In our lab setup, characters |
132 'B' overwrite the saved program counter (%ra). |
68 \pcode{'B'} overwrite the saved program counter (\pcode{\%ra}).\bigskip |
133 |
69 |
134 Discovery date: 06/03/2013 |
70 |
135 Release date: 02/08/2013 |
71 \begin{tabular}{@{}ll} |
136 \end{verbatim} |
72 Discovery date: & 06/03/2013\\ |
137 |
73 Release date: & 02/08/2013 |
138 \mbox{}\footnotesize\hfill\url{http://pastebin.com/vbiG42VD} |
74 \end{tabular} |
139 \end{frame} |
75 |
140 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
76 |
141 |
77 |
142 |
78 \hfill\url{http://roberto.greyhats.it/advisories/20130801-dlink-dir645.txt} |
|
79 \end{frame} |
|
80 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
143 |
81 |
144 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
82 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
145 \begin{frame}[fragile] |
83 \begin{frame}[fragile] |
146 \frametitle{Backdoors} |
84 \frametitle{D-Link Backdoors} |
147 |
85 |
148 D-Link router flaw lets anyone login through "Joel's Backdoor":\medskip |
86 D-Link router flaw lets anyone login through "Joel's Backdoor":\medskip |
149 |
87 |
|
88 \begin{quote}\rm\small |
150 If you tell your browser to identify itself as Joel's backdoor, instead of (say) |
89 If you tell your browser to identify itself as Joel's backdoor, instead of (say) |
151 as Mozilla/5.0 AppleWebKit/536.30.1 Version/6.0.5, you're in without authentication.\medskip |
90 as Mozilla/5.0 AppleWebKit/536.30.1 Version/6.0.5, you're in without authentication.\medskip |
152 |
91 |
153 "What is this string," I hear you ask? |
92 "What is this string," I hear you ask? |
154 |
93 |
155 You will laugh: it is |
94 You will laugh: it is |
156 |
95 |
157 \begin{verbatim} |
96 \begin{center} |
158 xmlset_roodkcableoj28840ybtide |
97 \pcode{xmlset_roodkcableoj28840ybtide} |
159 \end{verbatim} |
98 \end{center} |
160 |
99 \end{quote}\bigskip\bigskip |
161 |
100 |
162 \hfill\footnotesize October 15, 2013\\ |
101 \hfill\footnotesize October 15, 2013\\ |
163 \hfill\tiny\url{http://www.devttys0.com/2013/10/reverse-engineering-a-d-link-backdoor/} |
102 \hfill\footnotesize\url{http://www.devttys0.com/2013/10/reverse-engineering-a-d-link-backdoor/} |
164 |
103 |
165 \end{frame} |
104 \end{frame} |
166 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
105 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
167 |
106 |
168 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
107 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
169 \mode<presentation>{ |
108 \begin{frame}[fragile] |
|
109 |
|
110 CVE-2014-0476 chkrootkit vulnerability 4 Jun'14\medskip |
|
111 |
|
112 \begin{quote}\rm\small |
|
113 Hi, |
|
114 |
|
115 we just found a serious vulnerability in the chkrootkit package, which |
|
116 may allow local attackers to gain root access to a box in certain |
|
117 configurations (\pcode{/tmp} not mounted noexec). Steps to reproduce: |
|
118 |
|
119 \begin{itemize} |
|
120 \item Put an executable file named \pcode{update} with non-root owner in /tmp (not |
|
121 mounted noexec, obviously) |
|
122 \item Run chkrootkit (as uid 0) |
|
123 \end{itemize} |
|
124 |
|
125 Result: The file \pcode{/tmp/update} will be executed as root, thus effectively |
|
126 rooting your box, if malicious content is placed inside the file. |
|
127 |
|
128 If an attacker knows you are periodically running chkrootkit (like in |
|
129 cron.daily) and has write access to \pcode{/tmp} (not mounted noexec), he may |
|
130 easily take advantage of this. |
|
131 \end{quote} |
|
132 \mbox{}\\[-10mm] |
|
133 |
|
134 \hfill\footnotesize\url{http://seclists.org/oss-sec/2014/q2/430} |
|
135 |
|
136 \end{frame} |
|
137 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
138 |
|
139 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
170 \begin{frame}[c] |
140 \begin{frame}[c] |
171 \frametitle{Access Control in Unix} |
141 \frametitle{Access Control in Unix} |
172 |
142 |
173 \begin{itemize} |
143 \begin{itemize} |
174 \item access control provided by the OS |
144 \item access control provided by the OS |
175 \item authenticate principals (login) |
145 \item authenticate principals (login) |
176 \item mediate access to files, ports, processes according to \alert{roles} (user ids)\\ |
146 \item mediate access to files, ports, processes according to \alert{roles} (user ids)\\ |
177 \item roles get attached with privileges\bigskip\\% |
147 \item roles get attached with privileges\bigskip\\% |
178 \hspace{8mm} |
148 \hspace{8mm} |
179 \begin{tikzpicture} |
149 \begin{bubble}[8cm] |
180 \draw (0,0) node[inner sep=2mm,fill=cream, ultra thick, draw=red, rounded corners=2mm] |
|
181 {\begin{minipage}{8cm} |
|
182 \alert{principle of least privilege:}\\ |
150 \alert{principle of least privilege:}\\ |
183 programs should only have as much privilege as they need |
151 users and programs should only have as much privilege as they need |
184 \end{minipage}}; |
152 \end{bubble} |
185 \end{tikzpicture} |
153 \end{itemize} |
186 \end{itemize} |
154 |
187 |
155 \end{frame} |
188 \end{frame}} |
|
189 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
156 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
190 |
157 |
191 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
158 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
192 \mode<presentation>{ |
159 \mode<presentation>{ |
193 \begin{frame}[c] |
160 \begin{frame}[c] |
194 \frametitle{Access Control in Unix (2)} |
161 \frametitle{Access Control in Unix (2)} |
195 |
162 |
196 \begin{itemize} |
163 |
197 \item the idea is to restrict access to files and therefore lower the consequences of an attack\\[1cm]\mbox{} |
164 \begin{itemize} |
198 \end{itemize} |
165 \item privileges are specified by file access permissions (``everything is a file'')\medskip |
199 |
166 \item there are 9 (plus 2) bits that specify the permissions of a file |
200 \begin{textblock}{1}(2.5,9.5) |
167 |
201 \begin{tikzpicture}[scale=1] |
168 \begin{center} |
202 |
169 \begin{tabular}{l} |
203 \draw[line width=1mm] (-.3, 0) rectangle (1.5,2); |
170 \texttt{\$ ls -la}\\ |
204 \draw (4.7,1) node {Internet}; |
171 \texttt{-rwxrw-r-{}- \hspace{3mm} foo\_file.txt} |
205 \draw (0.6,1.7) node {\footnotesize Interface}; |
172 \end{tabular} |
206 \draw (0.6,-0.4) node {\footnotesize \begin{tabular}{c}unprivileged\\[-1mm] process\end{tabular}}; |
173 \end{center} |
207 \draw (-2.7,-0.4) node {\footnotesize \begin{tabular}{c}privileged\\[-1mm] process\end{tabular}}; |
174 \end{itemize} |
208 |
175 |
209 \draw[line width=1mm] (-1.8, 0) rectangle (-3.6,2); |
176 \end{frame}} |
210 |
177 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
211 \draw[white] (1.7,1) node (X) {}; |
178 |
212 \draw[white] (3.7,1) node (Y) {}; |
179 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
213 \draw[red, <->, line width = 2mm] (X) -- (Y); |
180 \begin{frame}[c] |
214 |
181 \frametitle{Login Process} |
215 \draw[red, <->, line width = 1mm] (-0.6,1) -- (-1.6,1); |
182 |
216 \end{tikzpicture} |
183 |
217 \end{textblock} |
184 \begin{itemize} |
218 |
185 \item login processes run under UID $=$ \pcode{0}\medskip |
219 \end{frame}} |
186 \begin{center} |
220 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
187 \texttt{ps -axl | grep login} |
221 \newcommand{\bl}[1]{\textcolor{blue}{#1}} |
188 \end{center}\medskip |
|
189 |
|
190 \item after login, shells run under UID $=$ user (e.g.~501)\medskip |
|
191 \begin{center} |
|
192 \texttt{id cu} |
|
193 \end{center}\medskip\pause |
|
194 |
|
195 \item non-root users are not allowed to change the UID --- would break |
|
196 access control |
|
197 \item but needed for example for \texttt{passwd} |
|
198 \end{itemize} |
|
199 |
|
200 \end{frame} |
|
201 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
202 |
|
203 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
204 \begin{frame}[c] |
|
205 \frametitle{Setuid and Setgid} |
|
206 |
|
207 The solution is that Unix file permissions are 9 + \underline{2 Bits}: |
|
208 \alert{Setuid} and \alert{Setgid} Bits |
|
209 |
|
210 \begin{itemize} |
|
211 \item When a file with setuid is executed, the resulting process will |
|
212 assume the UID given to the owner of the file. |
|
213 \item This enables users to create processes as root (or another |
|
214 user).\bigskip |
|
215 |
|
216 \item Essential for changing passwords, for example. |
|
217 \end{itemize} |
|
218 |
|
219 \begin{center} |
|
220 \texttt{chmod 4755 fobar\_file} |
|
221 \end{center} |
|
222 |
|
223 \end{frame} |
|
224 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
222 |
225 |
223 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
226 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
224 \begin{frame}[c] |
227 \begin{frame}[c] |
225 \frametitle{Access Control} |
228 \frametitle{Access Control} |
226 |
229 |
227 \begin{itemize} |
230 \begin{itemize} |
228 \item \bl{Discretionary Access Control:}\mbox{}\medskip\\ |
231 \item \bl{Discretionary Access Control:}\mbox{}\medskip\\ |
|
232 |
229 \small Access to objects (files, directories, devices, etc.) is permitted |
233 \small Access to objects (files, directories, devices, etc.) is permitted |
230 based on user identity. Each object is owned by a user. Owners can |
234 based on user identity. Each object is owned by a user. Owners can |
231 specify freely (at their discretion) how they want to share their objects |
235 specify freely (at their discretion) how they want to share their objects |
232 with other users, by specifying which other users can have which |
236 with other users, by specifying which other users can have which |
233 form of access to their objects.\medskip |
237 form of access to their objects.\medskip |
277 john & $\varnothing$ & r, w, x& r, x\\\hline |
278 john & $\varnothing$ & r, w, x& r, x\\\hline |
278 sendmail & a & $\varnothing$ & r, x\\ |
279 sendmail & a & $\varnothing$ & r, x\\ |
279 \end{tabular} |
280 \end{tabular} |
280 \end{center} |
281 \end{center} |
281 |
282 |
282 |
|
283 access privileges: {\bf r}ead, {\bf w}rite, e{\bf x}ecute, {\bf a}ppend |
283 access privileges: {\bf r}ead, {\bf w}rite, e{\bf x}ecute, {\bf a}ppend |
284 \end{frame}} |
284 \end{frame} |
|
285 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
286 |
|
287 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
288 \begin{frame}[c] |
|
289 \small |
|
290 |
|
291 \lstinputlisting[numbers=none,xleftmargin=-6mm]{lst} |
|
292 |
|
293 |
|
294 \begin{center} |
|
295 \begin{tabular}{ll} |
|
296 Members of group staff: & ping, bob, emma\\ |
|
297 Members of group students: & emma\\ |
|
298 \end{tabular} |
|
299 \end{center} |
|
300 |
|
301 \begin{center} |
|
302 \begin{tabular}{@{\hspace{-7mm}}r|c|c|c|c|c@{}} |
|
303 & manual.txt & report.txt & microedit & src/code.c & src/code.h \\\hline |
|
304 ping & & & & &\\\hline |
|
305 bob & & & & &\\\hline |
|
306 emma & & & & &\\ |
|
307 \end{tabular} |
|
308 \end{center} |
|
309 |
|
310 \end{frame} |
285 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
311 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
286 |
312 |
287 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
313 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
288 \begin{frame}[c] |
314 \begin{frame}[c] |
289 \frametitle{Mandatory Access Control} |
315 \frametitle{Mandatory Access Control} |
290 |
316 \small |
291 \begin{itemize} |
317 |
292 \item Restrictions to allowed information flows are not decided at the user’s |
318 \begin{itemize} |
293 discretion (as with Unix chmod), but instead enforced by system policies. |
319 \item Restrictions to allowed information flows are not decided at the |
294 |
320 user's discretion (as with Unix \pcode{chmod}), but instead enforced |
295 \item Mandatory access control mechanisms are aimed in particular at |
321 by system policies. |
296 preventing policy violations by untrusted application software, which |
322 |
297 typically have at least the same access privileges as the invoking user.\medskip |
323 \item Mandatory access control mechanisms are aimed in particular at |
298 |
324 preventing policy violations by untrusted application software, |
299 Simple example: Air Gap Security. |
325 which typically have at least the same access privileges as the |
300 Uses completely separate network and computer hardware for different application classes. |
326 invoking user.\medskip |
|
327 |
|
328 Simple example: Air Gap Security. Uses completely separate network |
|
329 and computer hardware for different application classes. |
301 \end{itemize} |
330 \end{itemize} |
302 |
331 |
303 \end{frame} |
332 \end{frame} |
304 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
333 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
305 |
334 |
472 \item<2-> indicates one ``protocol run'', or session, which specifies some |
502 \item<2-> indicates one ``protocol run'', or session, which specifies some |
473 order in the communication |
503 order in the communication |
474 \item<2-> there can be several sessions in parallel (think of wifi routers) |
504 \item<2-> there can be several sessions in parallel (think of wifi routers) |
475 \end{itemize} |
505 \end{itemize} |
476 |
506 |
477 \end{frame}} |
507 \end{frame} |
478 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
508 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
479 |
509 |
480 |
510 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
481 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
511 \begin{frame}[c] |
482 \mode<presentation>{ |
512 \frametitle{\Large Cryptographic Protocol Failures} |
483 \begin{frame}[c] |
513 |
484 \frametitle{A mutual authentication protocol} |
514 Ross Anderson and Roger Needham wrote:\bigskip |
|
515 |
|
516 \begin{quote}\rm |
|
517 \alert{A lot of the recorded frauds were the result of this kind of |
|
518 blunder, or from management negligence pure and simple.} However, |
|
519 there have been a significant number of cases where the designers |
|
520 protected the right things, used cryptographic algorithms which were |
|
521 not broken, and yet found that their systems were still successfully |
|
522 attacked. |
|
523 \end{quote} |
|
524 |
|
525 \end{frame} |
|
526 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
527 |
|
528 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
529 \begin{frame}<1-3>[c] |
|
530 \frametitle{Oyster Cards} |
|
531 |
|
532 \includegraphics[scale=0.4]{../pics/oysterc.jpg} |
|
533 |
|
534 \begin{itemize} |
|
535 \item good example of a bad protocol\\ (security by obscurity)\bigskip |
|
536 \item<3-> ``Breaching security on Oyster cards should not |
|
537 allow unauthorised use for more than a day, as TfL promises to turn |
|
538 off any cloned cards within 24 hours\ldots'' |
|
539 \end{itemize} |
|
540 |
|
541 \only<2>{ |
|
542 \begin{textblock}{12}(0.5,0.5) |
|
543 \begin{bubble}[11cm]\footnotesize |
|
544 {\bf Wirelessly Pickpocketing a Mifare Classic Card}\medskip |
|
545 |
|
546 The Mifare Classic is the most widely used contactless smartcard on the |
|
547 market. The stream cipher CRYPTO1 used by the Classic has recently been |
|
548 reverse engineered and serious attacks have been proposed. The most serious |
|
549 of them retrieves a secret key in under a second. In order to clone a card, |
|
550 previously proposed attacks require that the adversary either has access to |
|
551 an eavesdropped communication session or executes a message-by-message |
|
552 man-in-the-middle attack between the victim and a legitimate |
|
553 reader. Although this is already disastrous from a cryptographic point of |
|
554 view, system integrators maintain that these attacks cannot be performed |
|
555 undetected.\smallskip |
|
556 |
|
557 This paper proposes four attacks that can be executed by an adversary having |
|
558 only wireless access to just a card (and not to a legitimate reader). The |
|
559 most serious of them recovers a secret key in less than a second on ordinary |
|
560 hardware. Besides the cryptographic weaknesses, we exploit other weaknesses |
|
561 in the protocol stack. A vulnerability in the computation of parity bits |
|
562 allows an adversary to establish a side channel. Another vulnerability |
|
563 regarding nested authentications provides enough plaintext for a speedy |
|
564 known-plaintext attack.\hfill{}(a paper from 2009) |
|
565 \end{bubble} |
|
566 \end{textblock}} |
|
567 |
|
568 \end{frame} |
|
569 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
570 |
|
571 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
572 \begin{frame}<1->[t] |
|
573 \frametitle{Another Example} |
|
574 |
|
575 In an email from Ross Anderson\bigskip\small |
|
576 |
|
577 \begin{tabular}{l} |
|
578 From: Ross Anderson <Ross.Anderson@cl.cam.ac.uk>\\ |
|
579 Sender: cl-security-research-bounces@lists.cam.ac.uk\\ |
|
580 To: cl-security-research@lists.cam.ac.uk\\ |
|
581 Subject: Birmingham case\\ |
|
582 Date: Tue, 13 Aug 2013 15:13:17 +0100\\ |
|
583 \end{tabular} |
|
584 |
|
585 |
|
586 \only<2>{ |
|
587 \begin{textblock}{12}(0.5,0.8) |
|
588 \begin{bubble}[11cm] |
|
589 \footnotesize |
|
590 As you may know, Volkswagen got an injunction against the University of |
|
591 Birmingham suppressing the publication of the design of a weak cipher |
|
592 used in the remote key entry systems in its recent-model cars. The paper |
|
593 is being given today at Usenix, minus the cipher design.\medskip |
|
594 |
|
595 I've been contacted by Birmingham University's lawyers who seek to prove |
|
596 that the cipher can be easily obtained anyway. They are looking for a |
|
597 student who will download the firmware from any newish VW, disassemble |
|
598 it and look for the cipher. They'd prefer this to be done by a student |
|
599 rather than by a professor to emphasise how easy it is.\medskip |
|
600 |
|
601 Volkswagen's argument was that the Birmingham people had reversed a |
|
602 locksmithing tool produced by a company in Vietnam, and since their key |
|
603 fob chip is claimed to be tamper-resistant, this must have involved a |
|
604 corrupt insider at VW or at its supplier Thales. Birmingham's argument |
|
605 is that this is nonsense as the cipher is easy to get hold of. Their |
|
606 lawyers feel this argument would come better from an independent |
|
607 outsider.\medskip |
|
608 |
|
609 Let me know if you're interested in having a go, and I'll put you in |
|
610 touch |
|
611 |
|
612 Ross |
|
613 \end{bubble} |
|
614 \end{textblock}} |
|
615 |
|
616 \end{frame} |
|
617 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
618 |
|
619 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
620 \mode<presentation>{ |
|
621 \begin{frame}[c] |
|
622 \frametitle{Authentication Protocols} |
|
623 |
|
624 |
|
625 Alice (\bl{$A$}) and Bob (\bl{$B$}) share a secret key \bl{$K_{AB}$}\bigskip |
|
626 |
|
627 Passwords: |
|
628 |
|
629 \begin{center} |
|
630 \bl{$B \rightarrow A: K_{AB}$} |
|
631 \end{center}\pause\bigskip |
|
632 |
|
633 Problem: Eavesdropper can capture the secret and replay it; \bl{$A$} cannot confirm the |
|
634 identity of \bl{$B$} |
|
635 |
|
636 \end{frame}} |
|
637 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
638 |
|
639 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
640 \mode<presentation>{ |
|
641 \begin{frame}[c] |
|
642 \frametitle{Authentication Protocols} |
|
643 |
|
644 Alice (\bl{$A$}) and Bob (\bl{$B$}) share a secret key \bl{$K_{AB}$}\bigskip |
|
645 |
|
646 Simple Challenge Response: |
485 |
647 |
486 \begin{center} |
648 \begin{center} |
487 \begin{tabular}{ll} |
649 \begin{tabular}{ll} |
488 \bl{$A \rightarrow B$:} & \bl{$N_a$}\\ |
650 \bl{$A \rightarrow B:$} & \bl{$N$}\\ |
489 \bl{$B \rightarrow A$:} & \bl{$\{N_a, N_b\}_{K_{ab}}$}\\ |
651 \bl{$B \rightarrow A:$} & \bl{$\{N\}_{K_{AB}}$}\\ |
490 \bl{$A \rightarrow B$:} & \bl{$N_b$}\\ |
652 \end{tabular} |
491 \end{tabular} |
653 \end{center} |
492 \end{center}\pause |
654 |
493 |
655 |
494 An attacker \bl{$E$} can launch an impersonation attack by |
656 \end{frame}} |
495 intercepting all messages for \bl{$B$} and make \bl{$A$} decrypt her own challenges. |
657 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
496 |
658 |
497 \end{frame}} |
659 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
498 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
660 \mode<presentation>{ |
499 |
661 \begin{frame}[c] |
500 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
662 \frametitle{Authentication Protocols} |
501 \mode<presentation>{ |
663 |
|
664 Alice (\bl{$A$}) and Bob (\bl{$B$}) share a secret key \bl{$K_{AB}$}\bigskip |
|
665 |
|
666 Mutual Challenge Response: |
|
667 |
|
668 \begin{center} |
|
669 \begin{tabular}{ll} |
|
670 \bl{$A \rightarrow B:$} & \bl{$N_A$}\\ |
|
671 \bl{$B \rightarrow A:$} & \bl{$\{N_A, N_B\}_{K_{AB}}$}\\ |
|
672 \bl{$A \rightarrow B:$} & \bl{$N_B$}\\ |
|
673 \end{tabular} |
|
674 \end{center} |
|
675 |
|
676 %\pause |
|
677 %An attacker \bl{$E$} can launch an impersonation attack by |
|
678 %intercepting all messages for \bl{$B$} and make \bl{$A$} decrypt her |
|
679 %own challenges. |
|
680 |
|
681 \end{frame}} |
|
682 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
683 |
|
684 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
502 \begin{frame}[c] |
685 \begin{frame}[c] |
503 \frametitle{Nonces} |
686 \frametitle{Nonces} |
504 |
687 |
505 \begin{enumerate} |
688 \begin{enumerate} |
506 \item I generate a nonce (random number) and send it to you encrypted with a key we share |
689 \item I generate a nonce (random number) and send it to you encrypted with a key we share |
874 \item try to make everything explicit (you need to authenticate all data you might rely on)\medskip |
1030 \item try to make everything explicit (you need to authenticate all data you might rely on)\medskip |
875 \item the one who can fix a system should also be liable for the losses\medskip |
1031 \item the one who can fix a system should also be liable for the losses\medskip |
876 \item cryptography is often not {\bf the} answer\bigskip\bigskip |
1032 \item cryptography is often not {\bf the} answer\bigskip\bigskip |
877 \end{itemize} |
1033 \end{itemize} |
878 |
1034 |
879 logic is one way protocols are studied in academia |
1035 \end{frame}} |
880 (you can use computers to search for attacks) |
1036 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
881 |
1037 |
882 \end{frame}} |
1038 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
883 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
1039 \mode<presentation>{ |
884 |
1040 \begin{frame}[c] |
885 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
1041 \frametitle{Best Practices} |
886 \mode<presentation>{ |
1042 |
887 \begin{frame}[c] |
1043 {\bf Principle 1:} Every message should say what it means: the interpretation of |
888 \frametitle{\begin{tabular}{@ {}c@ {}}Schneier: Step 1\end{tabular}} |
1044 a message should not depend on the context.\bigskip\pause |
889 |
1045 |
890 {\bf What assets are you trying to protect?}\bigskip |
1046 {\bf Principle 2:} If the identity of a principal is essential to the meaning of a message, it is prudent |
891 |
1047 to mention the principal’s name explicitly in the message (though difficult).\bigskip |
892 This question might seem basic, but a surprising number of people never ask it. The question involves understanding the scope of the problem. For example, securing an airplane, an airport, commercial aviation, the transportation system, and a nation against terrorism are all different security problems, and require different solutions. |
1048 |
893 |
1049 |
894 \only<2>{ |
1050 \end{frame}} |
895 \begin{tikzpicture} |
1051 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
896 \draw (0,0) node[inner sep=2mm,fill=cream, ultra thick, draw=red, rounded corners=2mm] |
1052 |
897 {\begin{minipage}{10cm} |
1053 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
898 \small You like to prevent: ``It would be terrible if this sort of attack ever happens; we need to do everything in our power to prevent it.'' |
1054 \mode<presentation>{ |
899 \end{minipage}}; |
1055 \begin{frame}[c] |
900 \end{tikzpicture}} |
1056 |
901 \end{frame}} |
1057 {\bf Principle 3:} Be clear about why encryption is being |
902 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
1058 done. Encryption is not cheap, and not asking precisely why it is |
903 |
1059 being done can lead to redundancy. Encryption is not synonymous with |
904 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
1060 security. |
905 \mode<presentation>{ |
1061 |
906 \begin{frame}[c] |
1062 \begin{center} |
907 \frametitle{\begin{tabular}{@ {}c@ {}}Schneier: Step 2\end{tabular}} |
1063 Possible Uses of Encryption |
908 |
1064 |
909 {\bf What are the risks to these assets?}\bigskip |
1065 \begin{itemize} |
910 |
1066 \item Preservation of confidentiality: \bl{$\{X\}_K$} only those that have \bl{$K$} may recover \bl{$X$}. |
911 Here we consider the need for security. Answering it involves understanding what is being defended, what the consequences are if it is successfully attacked, who wants to attack it, how they might attack it, and why. |
1067 \item Guarantee authenticity: The partner is indeed some particular principal. |
912 |
1068 \item Guarantee confidentiality and authenticity: binds two parts of a message --- |
913 \end{frame}} |
1069 \bl{$\{X,Y\}_K$} is not the same as \bl{$\{X\}_K$} and \bl{$\{Y\}_K$}. |
914 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
1070 \end{itemize} |
915 |
1071 \end{center} |
916 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
1072 |
917 \mode<presentation>{ |
1073 |
918 \begin{frame}[c] |
1074 |
919 \frametitle{\begin{tabular}{@ {}c@ {}}Schneier: Step 3\end{tabular}} |
1075 \end{frame}} |
920 |
1076 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
921 {\bf How well does the security solution mitigate those risks?}\bigskip |
1077 |
922 |
1078 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
923 Another seemingly obvious question, but one that is frequently ignored. If the security solution doesn't solve the problem, it's no good. This is not as simple as looking at the security solution and seeing how well it works. It involves looking at how the security solution interacts with everything around it, evaluating both its operation and its failures. |
1079 \mode<presentation>{ |
924 |
1080 \begin{frame}[c] |
925 \end{frame}} |
1081 \frametitle{Best Practices} |
926 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
1082 |
927 |
1083 {\bf Principle 4:} The protocol designer should know which trust relations his protocol depends on, and why the dependence is necessary. The reasons for particular trust relations being acceptable should be explicit though they will be founded on judgment and policy rather than on logic.\bigskip |
928 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
1084 |
929 \mode<presentation>{ |
1085 |
930 \begin{frame}[c] |
1086 Example Certification Authorities: CAs are trusted to certify a key only after proper steps |
931 \frametitle{\begin{tabular}{@ {}c@ {}}Schneier: Step 4\end{tabular}} |
1087 have been taken to identify the principal that owns it. |
932 |
1088 |
933 {\bf What other risks does the security solution cause?}\bigskip |
1089 \end{frame}} |
934 |
1090 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
935 This question addresses what might be called the problem of unintended consequences. Security solutions have ripple effects, and most cause new security problems. The trick is to understand the new problems and make sure they are smaller than the old ones. |
|
936 |
|
937 \end{frame}} |
|
938 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
939 |
|
940 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
941 \mode<presentation>{ |
|
942 \begin{frame}[c] |
|
943 \frametitle{\begin{tabular}{@ {}c@ {}}Schneier: Step 5\end{tabular}} |
|
944 |
|
945 {\bf What costs and trade-offs does the security solution impose?}\bigskip |
|
946 |
|
947 Every security system has costs and requires trade-offs. Most security costs money, sometimes substantial amounts; but other trade-offs may be more important, ranging from matters of convenience and comfort to issues involving basic freedoms like privacy. Understanding these trade-offs is essential. |
|
948 |
|
949 \end{frame}} |
|
950 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
951 |
|
952 |
1091 |
953 \end{document} |
1092 \end{document} |
954 |
1093 |
955 %%% Local Variables: |
1094 %%% Local Variables: |
956 %%% mode: latex |
1095 %%% mode: latex |