577 with its private key |
577 with its private key |
578 \end{itemize} |
578 \end{itemize} |
579 |
579 |
580 \end{frame} |
580 \end{frame} |
581 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
581 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
582 |
|
583 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
584 \begin{frame}[c] |
|
585 \frametitle{Man-in-the-Middle} |
|
586 |
|
587 Attack: |
|
588 |
|
589 \begin{itemize} |
|
590 \item \bl{$A$} sends public key to \bl{$B$} --- \bl{$C$} intercepts this message and send his own public key |
|
591 \item \bl{$B$} sends public key to \bl{$A$} --- \bl{$C$} intercepts this message and send his own public key |
|
592 \item \bl{$A$} sends message encrypted with \bl{$C$}'s public key, \bl{$C$} decrypts it |
|
593 with its private key, re-encrypts with \bl{$B$}'s public key |
|
594 \item similar for other direction |
|
595 \end{itemize} |
|
596 |
|
597 \end{frame} |
|
598 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
599 |
|
600 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
601 \begin{frame}[c] |
|
602 \frametitle{Man-in-the-Middle} |
|
603 |
|
604 Potential Prevention? |
|
605 |
|
606 \begin{itemize} |
|
607 \item \bl{$A$} sends public key to \bl{$B$} |
|
608 \item \bl{$B$} sends public key to \bl{$A$} |
|
609 \item \bl{$A$} encrypts message with \bl{$B$}'s public key, send's {\bf half} of the message |
|
610 \item \bl{$B$} encrypts message with \bl{$A$}'s public key, send's {\bf half} of the message |
|
611 \item \bl{$A$} sends other half, \bl{$B$} can now decrypt entire message |
|
612 \item \bl{$B$} sends other half, \bl{$A$} can now decrypt entire message |
|
613 \end{itemize}\pause |
|
614 |
|
615 %\bl{$C$} would have to invent a totally new message |
|
616 \alert{Under which circumstances does this protocol prevent |
|
617 MiM-attacks, or does it?} |
|
618 |
|
619 \end{frame} |
|
620 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
621 |
|
622 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
623 \begin{frame}[c] |
|
624 \frametitle{Car Transponder (HiTag2)} |
|
625 |
|
626 \begin{enumerate} |
|
627 \item \bl{$C$} generates a random number \bl{$N$} |
|
628 \item \bl{$C$} calculates \bl{$(F,G) = \{N\}_K$} |
|
629 \item \bl{$C \to T$}: \bl{$N, F$} |
|
630 \item \bl{$T$} calculates \bl{$(F',G') = \{N\}_K$} |
|
631 \item \bl{$T$} checks that \bl{$F = F'$} |
|
632 \item \bl{$T \to C$}: \bl{$N, G'$} |
|
633 \item \bl{$C$} checks that \bl{$G = G'$} |
|
634 \end{enumerate}\pause |
|
635 |
|
636 \small |
|
637 This process means that the transponder believes the car knows |
|
638 the key \bl{$K$}, and the car believes the transponder knows |
|
639 the key \bl{$K$}. They have authenticated themselves |
|
640 to each other, or have they? |
|
641 |
|
642 \end{frame} |
|
643 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
644 |
|
645 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
646 \begin{frame}[c] |
|
647 |
|
648 A Man-in-the-middle attack in real life: |
|
649 |
|
650 \begin{itemize} |
|
651 \item the card only says yes to the terminal if the PIN is correct |
|
652 \item trick the card in thinking transaction is verified by signature |
|
653 \item trick the terminal in thinking the transaction was verified by PIN |
|
654 \end{itemize} |
|
655 |
|
656 \begin{minipage}{1.1\textwidth} |
|
657 \begin{center} |
|
658 \mbox{}\hspace{-6mm}\includegraphics[scale=0.5]{../pics/chip-attack.png} |
|
659 \includegraphics[scale=0.3]{../pics/chipnpinflaw.png} |
|
660 \end{center} |
|
661 \end{minipage} |
|
662 |
|
663 \end{frame} |
|
664 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
665 |
|
666 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
667 \begin{frame}[c] |
|
668 \frametitle{Problems with EMV} |
|
669 |
|
670 \begin{itemize} |
|
671 \item it is a wrapper for many protocols |
|
672 \item specification by consensus (resulted unmanageable complexity) |
|
673 \item its specification is 700 pages in English plus 2000+ pages for testing, additionally some |
|
674 further parts are secret |
|
675 \item other attacks have been found |
|
676 \end{itemize} |
|
677 |
|
678 \end{frame} |
|
679 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
680 |
|
681 |
|
682 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
683 \begin{frame}[c] |
|
684 \frametitle{Protocols are Difficult} |
|
685 |
|
686 \begin{itemize} |
|
687 \item even the systems designed by experts regularly fail\medskip |
|
688 \item the one who can fix a system should also be liable for the losses\medskip |
|
689 \item cryptography is often not the problem\bigskip\bigskip |
|
690 \end{itemize} |
|
691 |
|
692 \end{frame} |
|
693 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
694 |
|
695 |
|
696 |
582 |
697 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
583 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
698 \begin{frame}[c] |
584 \begin{frame}[c] |
699 \frametitle{A Simple PK Protocol} |
585 \frametitle{A Simple PK Protocol} |
700 |
586 |
1162 %\end{quote} |
1168 %\end{quote} |
1163 % |
1169 % |
1164 %\end{frame} |
1170 %\end{frame} |
1165 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
1171 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
1166 % |
1172 % |
1167 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
1168 \begin{frame}[c] |
|
1169 \frametitle{Mid-Term} |
|
1170 |
|
1171 \begin{itemize} |
|
1172 \item homework, handouts, programs\ldots |
|
1173 \end{itemize}\bigskip\bigskip\bigskip |
|
1174 |
|
1175 \begin{center} |
|
1176 {\huge\bf\alert{Any Questions?}} |
|
1177 \end{center} |
|
1178 |
|
1179 \end{frame} |
|
1180 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
1181 |
|
1182 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
1183 \begin{frame}[c] |
|
1184 \frametitle{Security Engineering} |
|
1185 |
|
1186 \begin{center} |
|
1187 \begin{tabular}{cc} |
|
1188 \raisebox{-0.8mm}{\includegraphics[scale=0.28]{../pics/flight.jpg}} & |
|
1189 \includegraphics[scale=0.31]{../pics/airbus.jpg}\\ |
|
1190 \small Wright brothers, 1901 & \small Airbus, 2005 \\ |
|
1191 \end{tabular} |
|
1192 \end{center} |
|
1193 |
|
1194 \end{frame} |
|
1195 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
1196 |
|
1197 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
1198 \begin{frame}[c] |
|
1199 \frametitle{1st Lecture} |
|
1200 |
|
1201 \begin{itemize} |
|
1202 \item chip-and-pin, banks vs.~customers |
|
1203 \begin{quote}\small\rm |
|
1204 the one who can improve security should also be |
|
1205 liable for the losses |
|
1206 \end{quote}\pause\bigskip |
|
1207 |
|
1208 \item hashes and salts to guarantee data integrity\medskip |
|
1209 \item storing passwords (you should know the difference between |
|
1210 brute force attacks and dictionary attacks; how do salts help?) |
|
1211 \end{itemize} |
|
1212 |
|
1213 \end{frame} |
|
1214 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
1215 |
|
1216 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
1217 \begin{frame}[c] |
|
1218 \frametitle{1st Lecture: Cookies} |
|
1219 |
|
1220 \begin{itemize} |
|
1221 \item good uses of cookies?\medskip |
|
1222 |
|
1223 \item bad uses of cookies: snooping, tracking, profiling\ldots |
|
1224 the ``disadvantage'' is that the user is in |
|
1225 \alert{control}, because you can delete them |
|
1226 |
|
1227 \begin{center} ``Please track me using cookies.'' |
|
1228 \end{center}\bigskip\pause |
|
1229 |
|
1230 \item fingerprinting beyond browser cookies |
|
1231 \begin{quote}\small\rm |
|
1232 Pixel Perfect: Fingerprinting Canvas in HTML5\\ |
|
1233 (a research paper from 2012)\\ |
|
1234 \footnotesize |
|
1235 \url{http://cseweb.ucsd.edu/~hovav/papers/ms12.html} |
|
1236 \end{quote} |
|
1237 \end{itemize} |
|
1238 |
|
1239 \end{frame} |
|
1240 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
1241 |
|
1242 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
1243 \begin{frame}[c] |
|
1244 \frametitle{1st Lecture: Cookies} |
|
1245 |
|
1246 \begin{itemize} |
|
1247 \item a bit of JavaScript and HTML5 + canvas\medskip |
|
1248 \begin{center} |
|
1249 \begin{tabular}{cc} |
|
1250 Firefox & Safari\\ |
|
1251 \includegraphics[scale=0.31]{../pics/firefox1.png} & |
|
1252 \includegraphics[scale=0.31]{../pics/safari1.png} \\ |
|
1253 \tiny |
|
1254 \pcode{55b2257ad0f20ecbf927fb66a15c61981f7ed8fc} & |
|
1255 \tiny |
|
1256 \pcode{17bc79f8111e345f572a4f87d6cd780b445625d3} |
|
1257 \end{tabular} |
|
1258 \end{center}\bigskip |
|
1259 |
|
1260 \item\small no actual drawing needed\pause |
|
1261 \item\small in May 2014 a crawl of 100,000 popular |
|
1262 webpages revealed 5.5\% already use canvas |
|
1263 fingerprinting\smallskip |
|
1264 \begin{center}\scriptsize |
|
1265 \url{https://securehomes.esat.kuleuven.be/~gacar/persistent/the_web_never_forgets.pdf} |
|
1266 \end{center} |
|
1267 \end{itemize} |
|
1268 |
|
1269 \end{frame} |
|
1270 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
1271 |
|
1272 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
1273 \begin{frame}[c] |
|
1274 \frametitle{1st Lecture: Cookies} |
|
1275 |
|
1276 Remember the small web-app I showed you where a cookie |
|
1277 protected a counter?\bigskip |
|
1278 |
|
1279 \begin{itemize} |
|
1280 \item NYT, the cookie looks the ``resource'' - harm\medskip |
|
1281 \item imaginary discount unlocked by cookie - no harm |
|
1282 \end{itemize} |
|
1283 |
|
1284 \end{frame} |
|
1285 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
1286 |
|
1287 |
|
1288 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
1289 \begin{frame}[t] |
|
1290 \frametitle{2nd Lecture: E-Voting} |
|
1291 |
|
1292 Where are paper ballots better than voice voting?\bigskip |
|
1293 |
|
1294 \begin{itemize} |
|
1295 \item Integrity |
|
1296 \item \alert{Ballot Secrecy} |
|
1297 \item Voter Authentication |
|
1298 \item Enfranchisement |
|
1299 \item Availability |
|
1300 \end{itemize} |
|
1301 |
|
1302 \end{frame} |
|
1303 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
1304 |
|
1305 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
1306 \begin{frame}[t] |
|
1307 \frametitle{2nd Lecture: E-Voting} |
|
1308 |
|
1309 \begin{itemize} |
|
1310 \item recently an Australian parliamentary committee |
|
1311 found: e-voting is highly vulnerable to hacking and Australia |
|
1312 will not use it any time soon\bigskip\pause |
|
1313 \item Alex Halderman, Washington D.C.~hack |
|
1314 \begin{center} |
|
1315 \scriptsize |
|
1316 \url{https://jhalderm.com/pub/papers/dcvoting-fc12.pdf} |
|
1317 \end{center}\medskip |
|
1318 |
|
1319 \item PDF-ballot tampering at the wireless router (the modification |
|
1320 is nearly undetectable and leaves no traces; MITM attack with firmware |
|
1321 updating) |
|
1322 \begin{center} |
|
1323 \scriptsize |
|
1324 \url{http://galois.com/wp-content/uploads/2014/11/technical-hack-a-pdf.pdf} |
|
1325 \end{center} |
|
1326 |
|
1327 \end{itemize} |
|
1328 |
|
1329 \end{frame} |
|
1330 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
1331 |
|
1332 |
|
1333 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
1334 \tikzset{alt/.code args={<#1>#2#3#4}{% |
|
1335 \alt<#1>{\pgfkeysalso{#2}}{\pgfkeysalso{#3}} % \pgfkeysalso doesn't change the path |
|
1336 }} |
|
1337 |
|
1338 \begin{frame}[t] |
|
1339 \frametitle{\begin{tabular}{c}3rd Lecture:\\ Buffer Overflow Attacks\end{tabular}} |
|
1340 |
|
1341 \begin{itemize} |
|
1342 \item the problem arises from the way C/C++ organises its function calls\\[-8mm]\mbox{} |
|
1343 \end{itemize} |
|
1344 |
|
1345 \begin{center} |
|
1346 \begin{tikzpicture}[scale=1] |
|
1347 %\draw[black!10,step=2mm] (0,0) grid (9,4); |
|
1348 %\draw[black!10,thick,step=10mm] (0,0) grid (9,4); |
|
1349 |
|
1350 \node at (0.5,4.5) {\small\begin{tabular}{l}main\\[-2mm] prog.\end{tabular}}; |
|
1351 \draw[line width=0mm, white, alt=<2->{fill=red}{fill=blue}] (0,2.5) rectangle (1,3.8); |
|
1352 \draw[line width=0mm, white, alt=<9->{fill=red}{fill=blue}] (0,0.2) rectangle (1,0.5); |
|
1353 \draw[line width=1mm, alt=<3->{fill=yellow}{fill=blue}] (0,2.0) rectangle (1,2.5); |
|
1354 \draw[line width=1mm, alt=<6->{fill=red}{fill=blue}] (0,1.0) rectangle (1,2.0); |
|
1355 \draw[line width=1mm, alt=<7->{fill=yellow}{fill=blue}] (0,0.5) rectangle (1,1.0); |
|
1356 \draw[line width=1mm] (0,0) -- (0,4); |
|
1357 \draw[line width=1mm] (1,0) -- (1,4); |
|
1358 |
|
1359 \node at (3.5,3.5) {\small\begin{tabular}{l}fact(n)\end{tabular}}; |
|
1360 \draw[line width=1mm, alt=<{4-5,8}>{fill=red}{fill=blue}] (3,1.0) rectangle (4,3.0); |
|
1361 |
|
1362 \onslide<3-4>{\draw[->, line width=1mm,red] (1,2.3) to node [above,sloped,midway] {n=4} (3,3);} |
|
1363 \onslide<5>{\draw[<-, line width=1mm,red] (1,2.3) to node [above,sloped,midway] {res=24} (3,1);} |
|
1364 |
|
1365 \onslide<7-8>{\draw[->, line width=1mm,red] (1,0.8) to node [above,sloped,midway] {n=3} (3,3);} |
|
1366 \onslide<9>{\draw[<-, line width=1mm,red] (1,0.8) to node [above,sloped,midway] {res=6} (3,1);} |
|
1367 |
|
1368 |
|
1369 \node at (7.75,3.9) {\small\begin{tabular}{l}stack\end{tabular}}; |
|
1370 \draw[line width=1mm] (7,3.5) -- (7,0.5) -- (8.5,0.5) -- (8.5,3.5); |
|
1371 |
|
1372 \onslide<3,4,7,8>{ |
|
1373 \node at (7.75, 1.4) {ret}; |
|
1374 \draw[line width=1mm] (7,1.1) -- (8.5,1.1); |
|
1375 \node at (7.75, 2.0) {sp}; |
|
1376 \draw[line width=1mm] (7,2.3) -- (8.5,2.3); |
|
1377 } |
|
1378 \onslide<3,4>{ |
|
1379 \node at (7.75, 0.8) {4}; |
|
1380 \draw[line width=1mm] (7,1.7) -- (8.5,1.7); |
|
1381 } |
|
1382 \onslide<7,8>{ |
|
1383 \node at (7.75, 0.8) {3}; |
|
1384 \draw[line width=1mm] (7,1.7) -- (8.5,1.7); |
|
1385 } |
|
1386 |
|
1387 |
|
1388 \end{tikzpicture} |
|
1389 \end{center} |
|
1390 |
|
1391 \end{frame} |
|
1392 |
|
1393 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
1394 \begin{frame}[t] |
|
1395 |
|
1396 \begin{center} |
|
1397 \begin{tikzpicture}[scale=1] |
|
1398 %\draw[black!10,step=2mm] (0,0) grid (9,4); |
|
1399 %\draw[black!10,thick,step=10mm] (0,0) grid (9,4); |
|
1400 |
|
1401 \node at (0.5,4.5) {\small\begin{tabular}{l}main\\[-2mm] prog.\end{tabular}}; |
|
1402 \draw[line width=0mm, white, alt=<2->{fill=red}{fill=blue}] (0,2.5) rectangle (1,3.8); |
|
1403 \draw[line width=1mm, white, fill=blue] (0,1.0) rectangle (1,2.0); |
|
1404 \draw[line width=1mm, alt=<3->{fill=yellow}{fill=blue}] (0,2.0) rectangle (1,2.5); |
|
1405 \draw[line width=1mm] (0,0) -- (0,4); |
|
1406 \draw[line width=1mm] (1,0) -- (1,4); |
|
1407 |
|
1408 \node at (3.5,3.5) {\small\begin{tabular}{l}fact(n)\end{tabular}}; |
|
1409 \draw[line width=0mm, alt=<{4-}>{red, fill=red}{blue, fill=blue}] (3,2.8) rectangle (4,3.0); |
|
1410 \draw[line width=0mm, alt=<{5-}>{red, fill=red}{blue, fill=blue}] (3,2.8) rectangle (4,2.0); |
|
1411 \draw[line width=0mm, alt=<{7-}>{red, fill=red}{blue, fill=blue}] (3,2.0) rectangle (4,1.0); |
|
1412 \draw[line width=1mm] (3,1.0) rectangle (4,3.0); |
|
1413 |
|
1414 \onslide<3->{\draw[->, line width=1mm,red] (1,2.3) to node [above,sloped,midway] {n=4} (3,3);} |
|
1415 \onslide<5->{\draw[<-, line width=2mm,red] (4,2) to node [above,sloped,midway] |
|
1416 {\begin{tabular}{l}user\\[-1mm] input\end{tabular}} (6,2);} |
|
1417 \onslide<8->{\draw[<-, line width=1mm,red] (1,-2) to (3,1);} |
|
1418 |
|
1419 \node at (7.75,3.9) {\small\begin{tabular}{l}stack\end{tabular}}; |
|
1420 \draw[line width=1mm] (7,3.5) -- (7,-0.1) -- (8.5,-0.1) -- (8.5,3.5); |
|
1421 |
|
1422 \onslide<3->{ |
|
1423 \node at (7.75, 0.2) {4}; |
|
1424 \draw[line width=1mm,alt=<6->{fill=red}{fill=white}] (7,0.5) rectangle (8.5,1.1); |
|
1425 \node at (7.75, 0.8) {\alt<6->{@a\#}{ret}}; |
|
1426 \draw[line width=1mm,alt=<6->{fill=red}{fill=white}] (7,1.1) rectangle (8.5,1.7); |
|
1427 \node at (7.75, 1.4) {\alt<6->{!?w;}sp}; |
|
1428 } |
|
1429 |
|
1430 \onslide<4->{ |
|
1431 \draw[line width=1mm,fill=red] (7,1.7) rectangle (8.5,3.0); |
|
1432 \node[white] at (7.75, 2.4) {buffer}; |
|
1433 } |
|
1434 |
|
1435 \end{tikzpicture} |
|
1436 \end{center} |
|
1437 |
|
1438 \end{frame} |
|
1439 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
1440 |
|
1441 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
1442 \begin{frame}[t] |
|
1443 \frametitle{\begin{tabular}{c}3rd Lecture:\\[-3mm] |
|
1444 Buffer Overflow Attacks\end{tabular}} |
|
1445 |
|
1446 US National Vulnerability Database\\ |
|
1447 \small(636 out of 6675 in 2014) |
|
1448 |
|
1449 \begin{center} |
|
1450 \begin{tikzpicture} |
|
1451 \begin{axis}[ |
|
1452 xlabel={year}, |
|
1453 ylabel={\% of total attacks}, |
|
1454 ylabel style={yshift=0em}, |
|
1455 enlargelimits=false, |
|
1456 xtick={1997,1999,...,2015}, |
|
1457 xmin=1996.5, |
|
1458 xmax=2016, |
|
1459 ymax=21, |
|
1460 ytick={0,5,...,20}, |
|
1461 scaled ticks=false, |
|
1462 axis lines=left, |
|
1463 width=11cm, |
|
1464 height=5cm, |
|
1465 ybar, |
|
1466 nodes near coords= |
|
1467 {\footnotesize |
|
1468 $\pgfmathprintnumber[fixed,fixed zerofill,precision=1,use comma]{\pgfkeysvalueof{/data point/y}}$}, |
|
1469 x tick label style={font=\scriptsize,/pgf/number format/1000 sep={}}] |
|
1470 \addplot |
|
1471 table [x=Year,y=Percentage] {../handouts/bufferoverflows.data}; |
|
1472 \end{axis} |
|
1473 \end{tikzpicture} |
|
1474 \end{center} |
|
1475 |
|
1476 \scriptsize |
|
1477 \url{http://web.nvd.nist.gov/view/vuln/statistics} |
|
1478 \end{frame} |
|
1479 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
1480 |
|
1481 |
|
1482 |
|
1483 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
1484 \begin{frame}[t] |
|
1485 \frametitle{\begin{tabular}{c}4th Lecture:\\ Unix Access Control\end{tabular}} |
|
1486 |
|
1487 \begin{itemize} |
|
1488 \item privileges are specified by file access permissions (``everything is a file'') |
|
1489 \end{itemize}\medskip |
|
1490 |
|
1491 \begin{center} |
|
1492 \begin{tikzpicture}[scale=1] |
|
1493 |
|
1494 \draw[line width=1mm] (-.3, 0) rectangle (1.5,2); |
|
1495 \draw (4.7,1) node {Internet}; |
|
1496 \draw (-2.7,1.7) node {\footnotesize Application}; |
|
1497 \draw (0.6,1.7) node {\footnotesize Interface}; |
|
1498 \draw (0.6,-0.4) node {\footnotesize \begin{tabular}{c}unprivileged\\[-1mm] process\end{tabular}}; |
|
1499 \draw (-2.7,-0.4) node {\footnotesize \begin{tabular}{c}privileged\\[-1mm] process\end{tabular}}; |
|
1500 |
|
1501 \draw[line width=1mm] (-1.8, 0) rectangle (-3.6,2); |
|
1502 |
|
1503 \draw[white] (1.7,1) node (X) {}; |
|
1504 \draw[white] (3.7,1) node (Y) {}; |
|
1505 \draw[red, <->, line width = 2mm] (X) -- (Y); |
|
1506 |
|
1507 \draw[red, <->, line width = 1mm] (-0.6,1) -- (-1.6,1); |
|
1508 \end{tikzpicture} |
|
1509 \end{center} |
|
1510 |
|
1511 \begin{itemize} |
|
1512 \item the idea is to make the attack surface smaller and |
|
1513 mitigate the consequences of an attack |
|
1514 \end{itemize} |
|
1515 |
|
1516 \end{frame} |
|
1517 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
1518 |
|
1519 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
1520 \begin{frame}[fragile,t] |
|
1521 \frametitle{\begin{tabular}{c}4th Lecture:\\ Unix Access Control\end{tabular}} |
|
1522 |
|
1523 \begin{itemize} |
|
1524 \item when a file with setuid is executed, the resulting process will assume the |
|
1525 UID given to the owner of the file |
|
1526 \end{itemize} |
|
1527 |
|
1528 \footnotesize\tt |
|
1529 \begin{center} |
|
1530 \begin{verbatim} |
|
1531 $ ls -ld . * */* |
|
1532 drwxr-xr-x 1 ping staff 32768 Apr 2 2010 . |
|
1533 -rw----r-- 1 ping students 31359 Jul 24 2011 manual.txt |
|
1534 -r--rw--w- 1 bob students 4359 Jul 24 2011 report.txt |
|
1535 -rwsr--r-x 1 bob students 141359 Jun 1 2013 microedit |
|
1536 dr--r-xr-x 1 bob staff 32768 Jul 23 2011 src |
|
1537 -rw-r--r-- 1 bob staff 81359 Feb 28 2012 src/code.c |
|
1538 -r--rw---- 1 emma students 959 Jan 23 2012 src/code.h |
|
1539 \end{verbatim} |
|
1540 \end{center} |
|
1541 |
|
1542 |
|
1543 \end{frame} |
|
1544 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
1545 |
|
1546 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
1547 \begin{frame}[t] |
|
1548 \frametitle{\begin{tabular}{c}4th Lecture:\\ Unix Access Control\end{tabular}} |
|
1549 |
|
1550 \begin{itemize} |
|
1551 \item Alice wants to have her files readable, |
|
1552 \alert{except} for her office mates.\bigskip |
|
1553 |
|
1554 \item make sure you understand the setuid and setgid bits; |
|
1555 why are they necessary for login and passwd |
|
1556 \end{itemize} |
|
1557 |
|
1558 |
|
1559 \end{frame} |
|
1560 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
1561 |
1173 |
1562 |
1174 |
1563 \end{document} |
1175 \end{document} |
1564 |
1176 |
1565 %%% Local Variables: |
1177 %%% Local Variables: |