-
CSE543 - Introduction to Computer and Network Security Page
CSE543 - Computer and Network Security Module: Web Security
Professor Trent Jaeger Fall 2010
1
CSE543 - Computer and Network Security Module: Web Security - - PowerPoint PPT Presentation
CSE543 - Introduction to Computer and Network Security Page
1
CMPSC443 - Introduction to Computer and Network Security Page
2
CMPSC443 - Introduction to Computer and Network Security Page
3
CMPSC443 - Introduction to Computer and Network Security Page
4
CMPSC443 - Introduction to Computer and Network Security Page
5
http://a.com/<img> http://c.com/ <img> http:// b.com/ <img>
Webpage
http:// d.com/ <IMG> http:// e.com/ <IMG> <body>
CMPSC443 - Introduction to Computer and Network Security Page
6
CMPSC443 - Introduction to Computer and Network Security Page
7
CMPSC443 - Introduction to Computer and Network Security Page
8
CMPSC443 - Introduction to Computer and Network Security Page
9
CMPSC443 - Introduction to Computer and Network Security Page
10
CMPSC443 - Introduction to Computer and Network Security Page
11
CMPSC443 - Introduction to Computer and Network Security Page
12
CMPSC443 - Introduction to Computer and Network Security Page
Participants: Alice/A (client) and Bob/B (server) Crypto Elements : Random R, Certificate C, k+
i Public Key (of i)
Crypto Functions : Hash function H(x), Encryption E(k, d), Decryption D(k, d), Keyed MAC HMAC(k, d) 1. Alice → Bob RA 2. Bob → Alice RB, CB Alice pick pre-master secret S Alice calculate master secret K = H(S, RA, RB) 3. Alice → Bob E(k+
B, S), HMAC(K,′ CLNT ′ + [#1, #2])
Bob recover pre-master secret S = D(k−
B, E(k+ B, S))
Bob calculate master secret K = H(S, RA, RB) 4. Bob → Alice HMAC(K,′ SRV R′ + [#1, #2]) Note: Alice and Bob : IV Keys, Encryption Keys, and Integrity Keys 6 keys,where each key ki = gi(K, RA, RB), and gi is key generator function.
13
CMPSC443 - Introduction to Computer and Network Security Page
14
CMPSC443 - Introduction to Computer and Network Security Page
Web Server Client Shell
Script (e.g., PHP, ASP, Perl, Python )
15
CMPSC443 - Introduction to Computer and Network Security Page
16
CMPSC443 - Introduction to Computer and Network Security Page
17
CMPSC443 - Introduction to Computer and Network Security Page
friends, …
blocker, etc ….
18
CMPSC443 - Introduction to Computer and Network Security Page
19
CMPSC443 - Introduction to Computer and Network Security Page
20
CMPSC443 - Introduction to Computer and Network Security Page
21
CMPSC443 - Introduction to Computer and Network Security Page
22
<iframe src=http://[REMOVED].info/counter style=display:none></iframe>
CMPSC443 - Introduction to Computer and Network Security Page
23
CMPSC443 - Introduction to Computer and Network Security Page
24
CMPSC443 - Introduction to Computer and Network Security Page
25
CMPSC443 - Introduction to Computer and Network Security Page
26
CMPSC443 - Introduction to Computer and Network Security Page
27
CMPSC443 - Introduction to Computer and Network Security Page
28
CMPSC443 - Introduction to Computer and Network Security Page
29
http://a.com/<Script> http://c.com/ <Script> http:// b.com/ <Script>
Webpage
http:// d.com/ <IMG> http:// e.com/ <IMG> <body> CCS-stylized
CMPSC443 - Introduction to Computer and Network Security Page
30
Web Server Domain App 1 Domain App 2 Domain App 3 Domain App 4 Domain App 5 Domain App 6 Domain App 7 Domain App 8
CMPSC443 - Introduction to Computer and Network Security Page
programming
dealing the the nasty details of HTTP/HTML
and renders them via internal API
scripts such as JavaScript
31
CMPSC443 - Introduction to Computer and Network Security Page
32 Webpage Banner Script Onclick Script Periodic Refresh Script Web-server 1 Web-server 2 Web-server 3
CMPSC443 - Introduction to Computer and Network Security Page
33
CMPSC443 - Introduction to Computer and Network Security Page
34
CMPSC443 - Introduction to Computer and Network Security Page
35
$INPUT = “Alice\;mail($to, $subject, $body);” <FORM METHOD=POST ACTION="../cgi-bin/mycgi.pl"> <INPUT TYPE="hidden" VALUE="~/.profile" NAME="LOGFILE"> </FORM>
CMPSC443 - Introduction to Computer and Network Security Page
36
SELECT email, login, last_name FROM user_table WHERE email = 'x'; DROP TABLE members; --';
CMPSC443 - Introduction to Computer and Network Security Page
37
$sql = "select * from some_table where some_col = ?"; $sth = $dbh->prepare( $sql ); $sth->execute( $input ); $sql = "select * from some_table where some_col = $input"; $sth = $dbh->prepare( $sql ); $sth->execute;
CMPSC443 - Introduction to Computer and Network Security Page
38
http://www.mybank.com/loggedin?sessionid=11
CMPSC443 - Introduction to Computer and Network Security Page
39
CMPSC443 - Introduction to Computer and Network Security Page
40
CMPSC443 - Introduction to Computer and Network Security Page
41
Process 1
http://a.com/<img> http://c.com/ <img> http:// b.com/ <img>
TAB 1
http:// d.com/ <IMG> http:// e.com/ <IMG> <body>
Process 2
http://a.com/<img> http://c.com/ <img> http:// b.com/ <img>
TAB 2
http:// d.com/ <IMG> http:// e.com/ <IMG> <body>
Process 3
http://a.com/<img> http://c.com/ <img> http:// b.com/ <img>
TAB 3
http:// d.com/ <IMG> http:// e.com/ <IMG> <body>
Main Browser Process