slides/slides05.tex
changeset 417 ca9295851eb6
parent 416 708b80c825af
child 418 ac2d2cb7dd82
equal deleted inserted replaced
416:708b80c825af 417:ca9295851eb6
     1 \PassOptionsToPackage{bookmarks=false}{hyperref}
     1 \PassOptionsToPackage{bookmarks=false}{hyperref}
     2 \documentclass[dvipsnames,14pt,t,hyperref={bookmarks=false}]{beamer}
     2 \documentclass[dvipsnames,14pt,t,hyperref={bookmarks=false}]{beamer}
       
     3 \usepackage{../style}
     3 \usepackage{../slides}
     4 \usepackage{../slides}
     4 \usepackage{../graphics}
     5 \usepackage{../graphics}
     5 \usepackage{../langs}
     6 \usepackage{../langs}
     6 \usepackage{../style}
     7 \usepackage{../data}
     7 \usetikzlibrary{arrows}
     8 \usetikzlibrary{arrows}
     8 \usetikzlibrary{shapes}
     9 \usetikzlibrary{shapes}
     9 
    10 
    10 \setmonofont[Scale=.88]{Consolas}
    11 \setmonofont[Scale=.88]{Consolas}
    11 \newfontfamily{\consolas}{Consolas}
    12 \newfontfamily{\consolas}{Consolas}
   292 \item the idea is to have a certificate authority (CA)
   293 \item the idea is to have a certificate authority (CA)
   293 \item you go to the CA to identify yourself
   294 \item you go to the CA to identify yourself
   294 \item CA: ``I, the CA, have verified that public key 
   295 \item CA: ``I, the CA, have verified that public key 
   295   \bl{$P^{pub}_{Bob}$} belongs to Bob''\bigskip
   296   \bl{$P^{pub}_{Bob}$} belongs to Bob''\bigskip
   296 \item CA must be trusted by everybody\medskip
   297 \item CA must be trusted by everybody\medskip
       
   298 \item certificates are time limited, and can be revoked
   297 
   299 
   298 \item What happens if CA issues a false certificate? Who pays in case of loss? (VeriSign 
   300 \item What happens if CA issues a false certificate? Who pays in case of loss? (VeriSign 
   299 explicitly limits liability to \$100.)
   301 explicitly limits liability to \$100.)
   300 \end{itemize}
   302 \end{itemize}
   301 
   303 
   302 \end{frame}
   304 \end{frame}
   303 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
   305 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
   304 
   306 
   305 
   307 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   306 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   308 \begin{frame}[c]
   307 \begin{frame}[c]
   309 \frametitle{PKI: Chains of Trust}
   308 \frametitle{Best Practices}
   310 
   309 
   311 \begin{center}
   310 {\bf Principle 1:} Every message should say what it means: the
   312   \begin{tikzpicture}[scale=1,
   311 interpretation of a message should not depend on the
   313                       node/.style={
   312 context.\bigskip\pause
   314                       rectangle,rounded corners=3mm,
   313 
   315                       very thick,draw=black!50,minimum height=18mm, minimum width=23mm,
   314 {\bf Principle 2:} If the identity of a principal is essential
   316                       top color=white,bottom color=black!20}]
   315 to the meaning of a message, it is prudent to mention the
   317 
   316 principal’s name explicitly in the message (though
   318   \node (A) at (0,0)  [node] {};
   317 difficult).\bigskip
   319   \node [below right] at (A.north west) 
   318 
   320   {\small\begin{tabular}{@{}l}CA\\Root Cert.\end{tabular}};
   319 \end{frame}
   321 
   320 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
   322   \node (B) at (4,0)  [node] {};
   321 
   323   \node [below right=1mm] at (B.north west) 
   322 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   324  {\mbox{}\hspace{-1mm}\small
   323 \begin{frame}[c]
   325   \begin{tabular}{@{}l}Subordinate\\ CA\end{tabular}};
   324 \frametitle{Best Practices}
   326 
   325 
   327   \node (C) at (8,0)  [node] {};
   326 {\bf Principle 3:} Be clear about why encryption is being
   328   \node [below right] at (C.north west) 
   327 done. Encryption is not wholly cheap, and not asking precisely
   329   {\small\begin{tabular}{@{}l}Server\\ Bank.com\end{tabular}};
   328 why it is being done can lead to redundancy. Encryption is not
   330 
   329 synonymous with security.
   331   \draw [->,line width=4mm] (A) -- (B); 
   330 
   332   \draw [->,line width=4mm] (B) -- (C); 
   331 \small
   333   
   332 \begin{center}
   334   \node (D) at (6,-3)  [node] {};
   333 Possible Uses of Encryption
   335   \node [below right] at (D.north west) 
   334 
   336   {\small\begin{tabular}{@{}l}Browser\\ Root Store\end{tabular}};
   335 \begin{itemize}
   337 
   336 \item Preservation of confidentiality: \bl{$\{X\}_K$} only those that have \bl{$K$} may recover \bl{$X$}.
   338   \node (E) at (2,-3)  [node] {};
   337 \item Guarantee authenticity: The partner is indeed some particular principal.
   339   \node [below right] at (E.north west) 
   338 \item Guarantee confidentiality and authenticity: binds two parts of a message --- 
   340   {\small\begin{tabular}{@{}l}Browser\\ Company\end{tabular}};
   339 \bl{$\{X,Y\}_K$} is not the same as \bl{$\{X\}_K$} and \bl{$\{Y\}_K$}.
   341 
   340 \end{itemize}
   342   \draw [->,line width=4mm] (E) -- (D); 
   341 \end{center}
   343   \end{tikzpicture}
   342 
   344 \end{center}
   343 \end{frame}
   345 
   344 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
   346 \begin{itemize}
   345 
   347 \item CAs make almost no money anymore, because of competition
   346 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   348 \item browser companies are not really interested in security, 
   347 \begin{frame}[c]
   349 rather than market share
   348 \frametitle{Best Practices}
   350 \end{itemize}
   349 
   351   
   350 {\bf Principle 4:} The protocol designers should know which
   352 \end{frame}
   351 trust relations their protocol depends on, and why the
   353 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
   352 dependence is necessary. The reasons for particular trust
   354 
   353 relations being acceptable should be explicit though they will
   355 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   354 be founded on judgment and policy rather than on
   356 \begin{frame}[c]
   355 logic.\bigskip
   357 \frametitle{PKI: Weaknesses}
   356 
   358 
   357 
   359 CAs just cannot win (make any profit):\medskip
   358 Example Certification Authorities: CAs are trusted to certify
   360 
   359 a key only after proper steps have been taken to identify the
   361 \begin{itemize}
   360 principal that owns it.
   362 \item there are hundreds of CAs, which issue million of
   361 
   363       certificates and the error rate is small
   362 \end{frame}
   364 
   363 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
   365 \item users (servers) do not want to pay or pay as little as
   364 
   366       possible\bigskip
   365 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   367 
   366 \begin{frame}[c]
   368 \item a CA can issue a certificate for any domain not needing
   367 \frametitle{Formal Methods}
   369       any permission (CAs are meant to be undergo audits,
   368 
   370       but\ldots DigiNotar); if they have issued many 
   369 Ross Anderson about the use of Logic:\bigskip
   371       certificates, they ``become too big to fail'' 
   370 
   372   
   371 \begin{quote}
   373 \item Can we be sure CAs are not just front-ends of some 
   372 Formal methods can be an excellent way of finding 
   374       government organisation?  
   373 bugs in security protocol designs as they force the designer 
   375        
   374 to make everything explicit and thus confront difficult design 
   376 \end{itemize}
   375 choices that might otherwise be fudged. 
   377 
   376 \end{quote}
   378 \end{frame}
   377 
   379 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
   378 \end{frame}
   380 
   379 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
   381 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   380 
   382 \begin{frame}[c]
       
   383 \frametitle{PKI: Weaknesses}
       
   384 
       
   385 \begin{itemize}
       
   386 
       
   387 \item many certificates are issued via whois\ldots if you
       
   388       hijacked a domain, it is easy to obtain
       
   389       certificates\medskip
       
   390 
       
   391 \item revocation does not work (Chrome has given up on
       
   392       revocation lists)\medskip
       
   393 
       
   394 \item lax approach to validation of certificates 
       
   395   (Have you bypassed certification warnings?)\medskip
       
   396 
       
   397 \item sometimes you want to install invalid certificates 
       
   398   (self-signed)
       
   399    
       
   400 \end{itemize}
       
   401 
       
   402 \end{frame}
       
   403 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
       
   404 
       
   405 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   406 \begin{frame}[c]
       
   407 \frametitle{PKI: Attacks}
       
   408 
       
   409 \begin{itemize}
       
   410 
       
   411 \item Go directly after root certificates 
       
   412   \begin{itemize}
       
   413   \item governments can demand private keys\smallskip
       
   414   \item 10 years ago it was estimated to break a 1024 bit key
       
   415    in one year using 10 -30 Mio \$; this is now reduced to 1 Mio \$
       
   416   \end{itemize} 
       
   417 
       
   418 \item Go after buggy implementations of certificate
       
   419       validation\smallskip
       
   420 
       
   421 \item Social Engineering 
       
   422   \begin{itemize}
       
   423     \item in 2001 somebody pretended to be 
       
   424     from Microsoft and asked for two code-signing 
       
   425     certificates
       
   426     \end{itemize}\bigskip
       
   427 \end{itemize}
       
   428 
       
   429 \small The eco-system is completely broken (it relies on
       
   430 thousands of entities doing the right thing). Maybe DNSSEC
       
   431 where keys can be attached to domain names is a way out.
       
   432 
       
   433 \end{frame}
       
   434 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
       
   435 
       
   436 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   437 \begin{frame}[c]
       
   438 \frametitle{Real Attacks}
       
   439 
       
   440 \begin{itemize}
       
   441 
       
   442 \item In 2011, DigiNotar (Dutch) was the first CA which got
       
   443       compromised completely, and where many fraudulent
       
   444       certificates were issued. It included approximately
       
   445       300,000 IP addresses, mostly located in Iran. The
       
   446       attackers (in Iran?) were likely interested only in
       
   447       collecting gmail passwords.\medskip
       
   448 
       
   449 \item The Flame malware piggy-bagged on this attack by
       
   450       advertising malicious Windows updates to some targeted
       
   451       systems (mostly in Iran, Israel, Sudan).
       
   452 
       
   453 \end{itemize}
       
   454 
       
   455 \end{frame}
       
   456 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
       
   457 
       
   458 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   459 \begin{frame}[c]
       
   460 \frametitle{PKI is Broken}
       
   461 
       
   462 \begin{itemize}
       
   463 
       
   464 \item PKI and certificates are meant to protect you against
       
   465       MITM attacks, but if the attack occurs your are 
       
   466       presented with a warning and you need to decide whether
       
   467       you are under attack.\medskip
       
   468 
       
   469 \item Webcontent gets often loaded from 3rd-party servers,
       
   470       which might not be secured\medskip
       
   471      
       
   472 \item Misaligned incentives: browser vendors are not
       
   473       interested in breaking webpages with invalid
       
   474       certificates     
       
   475 
       
   476 \end{itemize}
       
   477 
       
   478 \end{frame}
       
   479 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
       
   480 
       
   481 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   482 \begin{frame}[c]
       
   483 
       
   484 Why are there so many invalid certificates?\bigskip
       
   485 
       
   486 \begin{itemize}
       
   487 
       
   488 \item insufficient name coverage (www.example.com should
       
   489 include example.com)
       
   490 
       
   491 \item IoT: manny appliances have web-based admin interfaces; 
       
   492   the manufacturer cannot know under which IP and domain name
       
   493   the appliances are run (so cannot install a valid certificate)
       
   494 
       
   495 \item expired certificates, or incomplete chains of trust
       
   496       (servers are supposed to supply them)
       
   497 
       
   498 \end{itemize}
       
   499 
       
   500 \end{frame}
       
   501 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
       
   502 
       
   503 %
       
   504 %
       
   505 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   506 %\begin{frame}[c]
       
   507 %\frametitle{Best Practices}
       
   508 %
       
   509 %{\bf Principle 1:} Every message should say what it means: the
       
   510 %interpretation of a message should not depend on the
       
   511 %context.\bigskip\pause
       
   512 %
       
   513 %{\bf Principle 2:} If the identity of a principal is essential
       
   514 %to the meaning of a message, it is prudent to mention the
       
   515 %principal’s name explicitly in the message (though
       
   516 %difficult).\bigskip
       
   517 %
       
   518 %\end{frame}
       
   519 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
       
   520 %
       
   521 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   522 %\begin{frame}[c]
       
   523 %\frametitle{Best Practices}
       
   524 %
       
   525 %{\bf Principle 3:} Be clear about why encryption is being
       
   526 %done. Encryption is not wholly cheap, and not asking precisely
       
   527 %why it is being done can lead to redundancy. Encryption is not
       
   528 %synonymous with security.
       
   529 %
       
   530 %
       
   531 %\small
       
   532 %\begin{center}
       
   533 %Possible Uses of Encryption
       
   534 %
       
   535 %
       
   536 %\begin{itemize}
       
   537 %\item Preservation of confidentiality: \bl{$\{X\}_K$} only those that have \bl{$K$} may recover \bl{$X$}.
       
   538 %\item Guarantee authenticity: The partner is indeed some particular principal.
       
   539 %\item Guarantee confidentiality and authenticity: binds two parts of a message --- 
       
   540 %\bl{$\{X,Y\}_K$} is not the same as \bl{$\{X\}_K$} and \bl{$\{Y\}_K$}.
       
   541 %\end{itemize}
       
   542 %\end{center}
       
   543 %
       
   544 %\end{frame}
       
   545 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
       
   546 %
       
   547 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   548 %\begin{frame}[c]
       
   549 %\frametitle{Best Practices}
       
   550 %
       
   551 %{\bf Principle 4:} The protocol designers should know which
       
   552 %trust relations their protocol depends on, and why the
       
   553 %dependence is necessary. The reasons for particular trust
       
   554 %relations being acceptable should be explicit though they will
       
   555 %be founded on judgment and policy rather than on
       
   556 %logic.\bigskip
       
   557 %
       
   558 %
       
   559 %Example Certification Authorities: CAs are trusted to certify
       
   560 %a key only after proper steps have been taken to identify the
       
   561 %principal that owns it.
       
   562 %
       
   563 %\end{frame}
       
   564 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
       
   565 %
       
   566 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   567 %\begin{frame}[c]
       
   568 %\frametitle{Formal Methods}
       
   569 %
       
   570 %Ross Anderson about the use of Logic:\bigskip
       
   571 %
       
   572 %\begin{quote}
       
   573 %Formal methods can be an excellent way of finding 
       
   574 %bugs in security protocol designs as they force the designer 
       
   575 %to make everything explicit and thus confront difficult design 
       
   576 %choices that might otherwise be fudged. 
       
   577 %\end{quote}
       
   578 %
       
   579 %\end{frame}
       
   580 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
       
   581 %
   381 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   582 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   382 \begin{frame}[c]
   583 \begin{frame}[c]
   383 \frametitle{Mid-Term}
   584 \frametitle{Mid-Term}
   384 
   585 
   385 \begin{itemize}
   586 \begin{itemize}
   390 {\huge\bf\alert{Any Questions?}}
   591 {\huge\bf\alert{Any Questions?}}
   391 \end{center}
   592 \end{center}
   392 
   593 
   393 \end{frame}
   594 \end{frame}
   394 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
   595 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
       
   596 
       
   597 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   598 \begin{frame}[c]
       
   599 \frametitle{Security Engineering}
       
   600   
       
   601   \begin{center}
       
   602   \begin{tabular}{cc}
       
   603   \raisebox{-0.8mm}{\includegraphics[scale=0.28]{../pics/flight.jpg}} &
       
   604   \includegraphics[scale=0.31]{../pics/airbus.jpg}\\
       
   605   \small Wright brothers, 1901 & \small Airbus, 2005 \\ 
       
   606   \end{tabular}
       
   607   \end{center}
       
   608 
       
   609   \end{frame}
       
   610 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   611 
       
   612 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   613 \begin{frame}[c]
       
   614 \frametitle{1st Lecture}
       
   615 
       
   616 \begin{itemize}
       
   617 \item chip-and-pin, banks vs.~customers
       
   618 \begin{quote}\small\rm
       
   619  the one who can improve security should also be 
       
   620  liable for the losses 
       
   621 \end{quote}\pause\bigskip
       
   622 
       
   623 \item hashes and salts to guarantee data integrity\medskip
       
   624 \item storing passwords (you should know the difference between
       
   625 brute force attacks and dictionary attacks; how do salts help?)
       
   626 \end{itemize}
       
   627 
       
   628 \end{frame}
       
   629 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
       
   630 
       
   631 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   632 \begin{frame}[c]
       
   633 \frametitle{1st Lecture: Cookies}
       
   634 
       
   635 \begin{itemize}
       
   636 \item good uses of cookies?\medskip
       
   637 
       
   638 \item bad uses of cookies: snooping, tracking, profiling\ldots
       
   639       the ``disadvantage'' is that the user is in
       
   640       \alert{control}, because you can delete them 
       
   641           
       
   642           \begin{center} ``Please track me using cookies.''
       
   643           \end{center}\bigskip\pause
       
   644                  
       
   645 \item fingerprinting beyond browser cookies
       
   646   \begin{quote}\small\rm
       
   647   Pixel Perfect: Fingerprinting Canvas in HTML5\\ 
       
   648   (a research paper from 2012)\\
       
   649   \footnotesize
       
   650   \url{http://cseweb.ucsd.edu/~hovav/papers/ms12.html}      
       
   651   \end{quote}      
       
   652 \end{itemize}
       
   653 
       
   654 \end{frame}
       
   655 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
       
   656 
       
   657 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   658 \begin{frame}[c]
       
   659 \frametitle{1st Lecture: Cookies}
       
   660 
       
   661 \begin{itemize}
       
   662 \item a bit of JavaScript and HTML5 + canvas\medskip
       
   663 \begin{center}
       
   664 \begin{tabular}{cc}
       
   665 Firefox & Safari\\
       
   666 \includegraphics[scale=0.31]{../pics/firefox1.png} &
       
   667 \includegraphics[scale=0.31]{../pics/safari1.png} \\
       
   668 \tiny
       
   669 \pcode{55b2257ad0f20ecbf927fb66a15c61981f7ed8fc} &
       
   670 \tiny
       
   671 \pcode{17bc79f8111e345f572a4f87d6cd780b445625d3}
       
   672 \end{tabular}
       
   673 \end{center}\bigskip
       
   674 
       
   675 \item\small no actual drawing needed\pause
       
   676 \item\small in May 2014 a crawl of 100,000 popular 
       
   677 webpages revealed 5.5\% already use canvas 
       
   678 fingerprinting\smallskip
       
   679 \begin{center}\scriptsize
       
   680 \url{https://securehomes.esat.kuleuven.be/~gacar/persistent/the_web_never_forgets.pdf}
       
   681 \end{center}
       
   682 \end{itemize}
       
   683 
       
   684 \end{frame}
       
   685 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
       
   686 
       
   687 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   688 \begin{frame}[c]
       
   689 \frametitle{1st Lecture: Cookies}
       
   690 
       
   691 Remember the small web-app I showed where a cookie 
       
   692 protected a counter\bigskip 
       
   693 
       
   694 \begin{itemize}
       
   695 \item NYT, the cookie looks the ``resource'' - harm\medskip
       
   696 \item imaginary discount unlocked by cookie - no harm
       
   697 \end{itemize}
       
   698 
       
   699 \end{frame}
       
   700 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
       
   701 
       
   702 
       
   703 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   704 \begin{frame}[t]
       
   705 \frametitle{2nd Lecture: E-Voting}
       
   706 
       
   707 Where are paper ballots better than voice voting?\bigskip
       
   708 
       
   709 \begin{itemize}
       
   710 \item Integrity 
       
   711 \item \alert{Ballot Secrecy}
       
   712 \item Voter Authentication
       
   713 \item Enfranchisement
       
   714 \item Availability
       
   715 \end{itemize}
       
   716 
       
   717 \end{frame}
       
   718 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
       
   719 
       
   720 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   721 \begin{frame}[t]
       
   722 \frametitle{2nd Lecture: E-Voting}
       
   723 
       
   724 \begin{itemize}
       
   725 \item (two weeks ago) an Australian parliamentary committee 
       
   726 found: e-voting is highly vulnerable to hacking and Australia 
       
   727 will not use it any time soon\bigskip\pause
       
   728 \item Alex Halderman, Washington D.C.~hack
       
   729 \begin{center}
       
   730 \scriptsize
       
   731 \url{https://jhalderm.com/pub/papers/dcvoting-fc12.pdf}
       
   732 \end{center}\medskip
       
   733 
       
   734 \item PDF-ballot tampering at the wireless router (the modification 
       
   735 is nearly undetectable and leaves no traces; MITM attack with firmware 
       
   736 updating)
       
   737 \begin{center}
       
   738 \scriptsize
       
   739 \url{http://galois.com/wp-content/uploads/2014/11/technical-hack-a-pdf.pdf}
       
   740 \end{center}
       
   741 
       
   742 \end{itemize}
       
   743 
       
   744 \end{frame}
       
   745 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
       
   746 
       
   747 
       
   748 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   749 \tikzset{alt/.code args={<#1>#2#3#4}{%
       
   750   \alt<#1>{\pgfkeysalso{#2}}{\pgfkeysalso{#3}} % \pgfkeysalso doesn't change the path
       
   751 }}
       
   752 
       
   753 \begin{frame}[t]
       
   754 \frametitle{\begin{tabular}{c}3rd Lecture:\\ Buffer Overflow Attacks\end{tabular}}
       
   755 
       
   756 \begin{itemize}
       
   757 \item the problem arises from the way C/C++ organises its function calls\\[-8mm]\mbox{}
       
   758 \end{itemize}
       
   759 
       
   760 \begin{center}
       
   761 \begin{tikzpicture}[scale=1]
       
   762 %\draw[black!10,step=2mm] (0,0) grid (9,4);
       
   763 %\draw[black!10,thick,step=10mm] (0,0) grid (9,4);
       
   764 
       
   765 \node at (0.5,4.5) {\small\begin{tabular}{l}main\\[-2mm] prog.\end{tabular}};
       
   766 \draw[line width=0mm, white, alt=<2->{fill=red}{fill=blue}] (0,2.5) rectangle (1,3.8);
       
   767 \draw[line width=0mm, white, alt=<9->{fill=red}{fill=blue}] (0,0.2) rectangle (1,0.5);
       
   768 \draw[line width=1mm, alt=<3->{fill=yellow}{fill=blue}] (0,2.0) rectangle (1,2.5);
       
   769 \draw[line width=1mm, alt=<6->{fill=red}{fill=blue}] (0,1.0) rectangle (1,2.0);
       
   770 \draw[line width=1mm, alt=<7->{fill=yellow}{fill=blue}] (0,0.5) rectangle (1,1.0);
       
   771 \draw[line width=1mm] (0,0) -- (0,4);
       
   772 \draw[line width=1mm] (1,0) -- (1,4);
       
   773 
       
   774 \node at (3.5,3.5) {\small\begin{tabular}{l}fact(n)\end{tabular}};
       
   775 \draw[line width=1mm, alt=<{4-5,8}>{fill=red}{fill=blue}] (3,1.0) rectangle (4,3.0);
       
   776 
       
   777 \onslide<3-4>{\draw[->, line width=1mm,red] (1,2.3) to node [above,sloped,midway] {n=4} (3,3);}
       
   778 \onslide<5>{\draw[<-, line width=1mm,red] (1,2.3) to node [above,sloped,midway] {res=24} (3,1);}
       
   779 
       
   780 \onslide<7-8>{\draw[->, line width=1mm,red] (1,0.8) to node [above,sloped,midway] {n=3} (3,3);}
       
   781 \onslide<9>{\draw[<-, line width=1mm,red] (1,0.8) to node [above,sloped,midway] {res=6} (3,1);}
       
   782 
       
   783 
       
   784 \node at (7.75,3.9) {\small\begin{tabular}{l}stack\end{tabular}};
       
   785 \draw[line width=1mm] (7,3.5) -- (7,0.5) -- (8.5,0.5) -- (8.5,3.5);
       
   786 
       
   787 \onslide<3,4,7,8>{
       
   788 \node at (7.75, 1.4) {ret};
       
   789 \draw[line width=1mm] (7,1.1) -- (8.5,1.1);
       
   790 \node at (7.75, 2.0) {sp};
       
   791 \draw[line width=1mm] (7,2.3) -- (8.5,2.3);
       
   792 }
       
   793 \onslide<3,4>{
       
   794 \node at (7.75, 0.8) {4};
       
   795 \draw[line width=1mm] (7,1.7) -- (8.5,1.7);
       
   796 }
       
   797 \onslide<7,8>{
       
   798 \node at (7.75, 0.8) {3};
       
   799 \draw[line width=1mm] (7,1.7) -- (8.5,1.7);
       
   800 }
       
   801 
       
   802 
       
   803 \end{tikzpicture}
       
   804 \end{center}
       
   805 
       
   806 \end{frame}
       
   807 
       
   808 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   809 \begin{frame}[t]
       
   810 
       
   811 \begin{center}
       
   812 \begin{tikzpicture}[scale=1]
       
   813 %\draw[black!10,step=2mm] (0,0) grid (9,4);
       
   814 %\draw[black!10,thick,step=10mm] (0,0) grid (9,4);
       
   815 
       
   816 \node at (0.5,4.5) {\small\begin{tabular}{l}main\\[-2mm] prog.\end{tabular}};
       
   817 \draw[line width=0mm, white, alt=<2->{fill=red}{fill=blue}] (0,2.5) rectangle (1,3.8);
       
   818 \draw[line width=1mm, white, fill=blue] (0,1.0) rectangle (1,2.0);
       
   819 \draw[line width=1mm, alt=<3->{fill=yellow}{fill=blue}] (0,2.0) rectangle (1,2.5);
       
   820 \draw[line width=1mm] (0,0) -- (0,4);
       
   821 \draw[line width=1mm] (1,0) -- (1,4);
       
   822 
       
   823 \node at (3.5,3.5) {\small\begin{tabular}{l}fact(n)\end{tabular}};
       
   824 \draw[line width=0mm, alt=<{4-}>{red, fill=red}{blue, fill=blue}] (3,2.8) rectangle (4,3.0);
       
   825 \draw[line width=0mm, alt=<{5-}>{red, fill=red}{blue, fill=blue}] (3,2.8) rectangle (4,2.0);
       
   826 \draw[line width=0mm, alt=<{7-}>{red, fill=red}{blue, fill=blue}] (3,2.0) rectangle (4,1.0);
       
   827 \draw[line width=1mm] (3,1.0) rectangle (4,3.0);
       
   828 
       
   829 \onslide<3->{\draw[->, line width=1mm,red] (1,2.3) to node [above,sloped,midway] {n=4} (3,3);}
       
   830 \onslide<5->{\draw[<-, line width=2mm,red] (4,2) to node [above,sloped,midway] 
       
   831 {\begin{tabular}{l}user\\[-1mm] input\end{tabular}} (6,2);}
       
   832 \onslide<8->{\draw[<-, line width=1mm,red] (1,-2) to (3,1);}
       
   833 
       
   834 \node at (7.75,3.9) {\small\begin{tabular}{l}stack\end{tabular}};
       
   835 \draw[line width=1mm] (7,3.5) -- (7,-0.1) -- (8.5,-0.1) -- (8.5,3.5);
       
   836 
       
   837 \onslide<3->{
       
   838 \node at (7.75, 0.2) {4};
       
   839 \draw[line width=1mm,alt=<6->{fill=red}{fill=white}] (7,0.5) rectangle (8.5,1.1);
       
   840 \node at (7.75, 0.8) {\alt<6->{@a\#}{ret}};
       
   841 \draw[line width=1mm,alt=<6->{fill=red}{fill=white}] (7,1.1) rectangle (8.5,1.7);
       
   842 \node at (7.75, 1.4) {\alt<6->{!?w;}sp};
       
   843 }
       
   844 
       
   845 \onslide<4->{
       
   846 \draw[line width=1mm,fill=red] (7,1.7) rectangle (8.5,3.0);
       
   847 \node[white] at (7.75, 2.4) {buffer};
       
   848 }
       
   849 
       
   850 \end{tikzpicture}
       
   851 \end{center}
       
   852 
       
   853 \end{frame}
       
   854 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
       
   855 
       
   856 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   857 \begin{frame}[t]
       
   858 \frametitle{\begin{tabular}{c}3rd Lecture:\\[-3mm] 
       
   859 Buffer Overflow Attacks\end{tabular}}
       
   860 
       
   861 US National Vulnerability Database\\ 
       
   862 \small(636 out of 6675 in 2014)
       
   863 
       
   864 \begin{center}
       
   865 \begin{tikzpicture}
       
   866 \begin{axis}[
       
   867     xlabel={year},
       
   868     ylabel={\% of total attacks},
       
   869     ylabel style={yshift=0em},
       
   870     enlargelimits=false,
       
   871     xtick={1997,1998,2000,...,2014},
       
   872     xmin=1996.5,
       
   873     xmax=2015,
       
   874     ymax=21,
       
   875     ytick={0,5,...,20},
       
   876     scaled ticks=false,
       
   877     axis lines=left,
       
   878     width=11cm,
       
   879     height=5cm,
       
   880     ybar,
       
   881     nodes near coords=
       
   882      {\footnotesize
       
   883       $\pgfmathprintnumber[fixed,fixed zerofill,precision=1,use comma]{\pgfkeysvalueof{/data point/y}}$},
       
   884     x tick label style={font=\scriptsize,/pgf/number format/1000 sep={}}]
       
   885 \addplot
       
   886   table [x=Year,y=Percentage] {bufferoverflows.data};
       
   887 \end{axis}
       
   888 \end{tikzpicture}
       
   889 \end{center}
       
   890 
       
   891 \scriptsize
       
   892 \url{http://web.nvd.nist.gov/view/vuln/statistics}
       
   893 \end{frame}
       
   894 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
       
   895 
       
   896 
       
   897 
       
   898 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   899 \begin{frame}[t]
       
   900 \frametitle{\begin{tabular}{c}4th Lecture:\\ Unix Access Control\end{tabular}}
       
   901 
       
   902 \begin{itemize}
       
   903 \item privileges are specified by file access permissions (``everything is a file'') 
       
   904 \end{itemize}\medskip
       
   905 
       
   906 \begin{center}
       
   907   \begin{tikzpicture}[scale=1]
       
   908   
       
   909   \draw[line width=1mm] (-.3, 0) rectangle (1.5,2);
       
   910   \draw (4.7,1) node {Internet};
       
   911   \draw (-2.7,1.7) node {\footnotesize Application};
       
   912   \draw (0.6,1.7) node {\footnotesize Interface};
       
   913   \draw (0.6,-0.4) node {\footnotesize \begin{tabular}{c}unprivileged\\[-1mm] process\end{tabular}};
       
   914   \draw (-2.7,-0.4) node {\footnotesize \begin{tabular}{c}privileged\\[-1mm] process\end{tabular}};
       
   915   
       
   916   \draw[line width=1mm] (-1.8, 0) rectangle (-3.6,2);
       
   917 
       
   918   \draw[white] (1.7,1) node (X) {};
       
   919   \draw[white] (3.7,1) node (Y) {};
       
   920   \draw[red, <->, line width = 2mm] (X) -- (Y);
       
   921  
       
   922   \draw[red, <->, line width = 1mm] (-0.6,1) -- (-1.6,1);
       
   923   \end{tikzpicture}
       
   924 \end{center}
       
   925 
       
   926 \begin{itemize}
       
   927 \item the idea is to make the attack surface smaller and 
       
   928 mitigate the consequences of an attack
       
   929 \end{itemize}
       
   930 
       
   931 \end{frame}
       
   932 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
       
   933 
       
   934 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   935 \begin{frame}[fragile,t]
       
   936 \frametitle{\begin{tabular}{c}4th Lecture:\\ Unix Access Control\end{tabular}}
       
   937 
       
   938 \begin{itemize}
       
   939 \item when a file with setuid is executed, the resulting process will assume the 
       
   940 UID given to the owner of the file
       
   941 \end{itemize}
       
   942 
       
   943 \footnotesize\tt
       
   944 \begin{center}
       
   945 \begin{verbatim}
       
   946 $ ls -ld . * */*
       
   947 drwxr-xr-x 1 ping staff  32768 Apr  2 2010 .
       
   948 -rw----r-- 1 ping students  31359 Jul 24 2011 manual.txt
       
   949 -r--rw--w- 1 bob students    4359 Jul 24 2011 report.txt
       
   950 -rwsr--r-x 1 bob students  141359 Jun  1 2013 microedit
       
   951 dr--r-xr-x 1 bob staff      32768 Jul 23 2011 src
       
   952 -rw-r--r-- 1 bob staff      81359 Feb 28 2012 src/code.c
       
   953 -r--rw---- 1 emma students    959 Jan 23 2012 src/code.h
       
   954 \end{verbatim}
       
   955 \end{center}
       
   956 
       
   957 
       
   958 \end{frame}
       
   959 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
       
   960 
       
   961 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   962 \begin{frame}[t]
       
   963 \frametitle{\begin{tabular}{c}4th Lecture:\\ Unix Access Control\end{tabular}}
       
   964 
       
   965 \begin{itemize}
       
   966 \item Alice wants to have her files readable, 
       
   967 \alert{except} for her office mates.
       
   968 \end{itemize}
       
   969 
       
   970 
       
   971 \end{frame}
       
   972 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
       
   973 
   395 
   974 
   396 \end{document}
   975 \end{document}
   397 
   976 
   398 %%% Local Variables:  
   977 %%% Local Variables:  
   399 %%% mode: latex
   978 %%% mode: latex