web security sankar roy 1. acknowledgement while preparing the presentation slides and the demo, i...
TRANSCRIPT
![Page 1: Web Security Sankar Roy 1. Acknowledgement While preparing the presentation slides and the demo, I received help from Professor Eugene Vasserman Professor](https://reader035.vdocument.in/reader035/viewer/2022070323/56649e235503460f94b113a3/html5/thumbnails/1.jpg)
1
Web Security
Sankar Roy
![Page 2: Web Security Sankar Roy 1. Acknowledgement While preparing the presentation slides and the demo, I received help from Professor Eugene Vasserman Professor](https://reader035.vdocument.in/reader035/viewer/2022070323/56649e235503460f94b113a3/html5/thumbnails/2.jpg)
2
Acknowledgement
While preparing the presentation slides and the demo, I received help from• Professor Eugene Vasserman• Professor Simon Ou• Professor Gurdip Singh• Alex Bardas and Yuping Li
![Page 3: Web Security Sankar Roy 1. Acknowledgement While preparing the presentation slides and the demo, I received help from Professor Eugene Vasserman Professor](https://reader035.vdocument.in/reader035/viewer/2022070323/56649e235503460f94b113a3/html5/thumbnails/3.jpg)
3
Web Activities
• Why do we browse Internet?– email – searching on– social networking– e-commerce – driving directions– reading – watching
![Page 4: Web Security Sankar Roy 1. Acknowledgement While preparing the presentation slides and the demo, I received help from Professor Eugene Vasserman Professor](https://reader035.vdocument.in/reader035/viewer/2022070323/56649e235503460f94b113a3/html5/thumbnails/4.jpg)
4
Security-sensitive Web Activities
Online shopping
Managing confidential emails
![Page 5: Web Security Sankar Roy 1. Acknowledgement While preparing the presentation slides and the demo, I received help from Professor Eugene Vasserman Professor](https://reader035.vdocument.in/reader035/viewer/2022070323/56649e235503460f94b113a3/html5/thumbnails/5.jpg)
5
Common Risks
![Page 6: Web Security Sankar Roy 1. Acknowledgement While preparing the presentation slides and the demo, I received help from Professor Eugene Vasserman Professor](https://reader035.vdocument.in/reader035/viewer/2022070323/56649e235503460f94b113a3/html5/thumbnails/6.jpg)
6
Goals of this Class
• Understand the risks of Web communication
• Understand the security mechanisms for Web transactions
• Learn how to protect ourselves from the common problems in practice
![Page 7: Web Security Sankar Roy 1. Acknowledgement While preparing the presentation slides and the demo, I received help from Professor Eugene Vasserman Professor](https://reader035.vdocument.in/reader035/viewer/2022070323/56649e235503460f94b113a3/html5/thumbnails/7.jpg)
7
Understanding the Web Communication
An example: Let’s do a Google search:• 0-th step: type google.com on a browser• The next three major steps (s1, s2 and s3) as
shown above are elaborated later DNS = Domain name service
Your desktop Google server
DNS
s1
s2
s3
![Page 8: Web Security Sankar Roy 1. Acknowledgement While preparing the presentation slides and the demo, I received help from Professor Eugene Vasserman Professor](https://reader035.vdocument.in/reader035/viewer/2022070323/56649e235503460f94b113a3/html5/thumbnails/8.jpg)
8
Step 0: Opening a Browser
• Open a browser (e.g. Safari, Firefox, IE, Chrome, etc.) • Type google.com in the address bar (HTTP protocol
is used)
![Page 9: Web Security Sankar Roy 1. Acknowledgement While preparing the presentation slides and the demo, I received help from Professor Eugene Vasserman Professor](https://reader035.vdocument.in/reader035/viewer/2022070323/56649e235503460f94b113a3/html5/thumbnails/9.jpg)
9
Step 1: Get Address of Google.com
• The browser asks the DNS the IP address of Google.com• DNS responds with the IP (e.g. 64.233.160.2)
Your Browser
Domain Name Service (DNS)
What’s the IP address of Google?
64.233.160.2
Compare with the phone number search
Google.com = Contact name, IP = phone number
![Page 10: Web Security Sankar Roy 1. Acknowledgement While preparing the presentation slides and the demo, I received help from Professor Eugene Vasserman Professor](https://reader035.vdocument.in/reader035/viewer/2022070323/56649e235503460f94b113a3/html5/thumbnails/10.jpg)
10
Step 2: Send Query to Google
• The browser sends out a message – with the connection request
• The packet (message) is routed over the Internet – and finally reaches the destination (i.e. Google.com)
Your Browser
(Google.com)
message
64.233.160.2
![Page 11: Web Security Sankar Roy 1. Acknowledgement While preparing the presentation slides and the demo, I received help from Professor Eugene Vasserman Professor](https://reader035.vdocument.in/reader035/viewer/2022070323/56649e235503460f94b113a3/html5/thumbnails/11.jpg)
11
Step 3: Get Response from Google
• Google.com sends back the response message• The message finally reaches your computer• The browser displays Google’s home page• Then you type the “key words” in Google’s “search box”
– and hit “enter”; this sends a message to Google again (with “key words” now)– this type of back-and-forth communication may continue
Your Browser
(Google.com)
response message
64.233.160.2
![Page 12: Web Security Sankar Roy 1. Acknowledgement While preparing the presentation slides and the demo, I received help from Professor Eugene Vasserman Professor](https://reader035.vdocument.in/reader035/viewer/2022070323/56649e235503460f94b113a3/html5/thumbnails/12.jpg)
12
Physical vs. Web: Bank transaction example
• Physically visiting your bank: you are sure that building is your bank? The bank teller verifies your Driver’s license and thus authenticates you.
• On Web: It is a virtual world. Your browser and the bank server needs some special tool to authenticate each other. Also, the sensitive data traffic (including your password) has to remain confidential.
![Page 13: Web Security Sankar Roy 1. Acknowledgement While preparing the presentation slides and the demo, I received help from Professor Eugene Vasserman Professor](https://reader035.vdocument.in/reader035/viewer/2022070323/56649e235503460f94b113a3/html5/thumbnails/13.jpg)
13
Attacks: Connection Interception
• The browser sends out a message (with the query)
• The browser displays Mallory’s response page, which may look identical to Google
Your Browser
(NOT Google.com)
query message
Mallory intercepts it and sends back a response claiming that she is “google.com”
![Page 14: Web Security Sankar Roy 1. Acknowledgement While preparing the presentation slides and the demo, I received help from Professor Eugene Vasserman Professor](https://reader035.vdocument.in/reader035/viewer/2022070323/56649e235503460f94b113a3/html5/thumbnails/14.jpg)
14
Connection Interception: Another View The adversary (let’s call him Mallory) intercepts the communication between Alice and Bob.
Muahaha!
Alice
Bob
Bob
![Page 15: Web Security Sankar Roy 1. Acknowledgement While preparing the presentation slides and the demo, I received help from Professor Eugene Vasserman Professor](https://reader035.vdocument.in/reader035/viewer/2022070323/56649e235503460f94b113a3/html5/thumbnails/15.jpg)
15
Where does Web Browsing Lack?• HTTP is (more or less) OK for Google search because of no
confidential data being involved
Browser Serverauthenticate
authenticate
• But when we deal with sensitive data (e.g. e-banking)– then, we need:
– Also, we need confidentiality: the password or credit card info should not be transferred in clear text
– Default web browsing does NOT use authentication or confidentiality
![Page 16: Web Security Sankar Roy 1. Acknowledgement While preparing the presentation slides and the demo, I received help from Professor Eugene Vasserman Professor](https://reader035.vdocument.in/reader035/viewer/2022070323/56649e235503460f94b113a3/html5/thumbnails/16.jpg)
16
Viewing the Status of a Website
The browser can show the status of the connection, e.g. “no authentication or no encryption” (as shown above when we visit http://www.google.com).
NO authentication
NO confidentiality
![Page 17: Web Security Sankar Roy 1. Acknowledgement While preparing the presentation slides and the demo, I received help from Professor Eugene Vasserman Professor](https://reader035.vdocument.in/reader035/viewer/2022070323/56649e235503460f94b113a3/html5/thumbnails/17.jpg)
17
Securing Web Browsing• A feasible Solution: – Each party B (e.g. a bank server) generates a Public
and Private key pair. Mathematical theory ensures the correspondence b/w these key pair.
– PKI (Public Key Infrastructure): Party B (e.g. a bank server) can collect a certificate from a cert-authority (CA) which is a trusted third party.
mybank.com (B)
pub
pri
CA
has CA’s sig.CA says “pub is B’s public key”.
cert
B’s private cred.
B’s public cred.
![Page 18: Web Security Sankar Roy 1. Acknowledgement While preparing the presentation slides and the demo, I received help from Professor Eugene Vasserman Professor](https://reader035.vdocument.in/reader035/viewer/2022070323/56649e235503460f94b113a3/html5/thumbnails/18.jpg)
18
Securing Web Browsing
Alice
Bob
ConfidentialAuthenticated
Bob
CRAP!
![Page 19: Web Security Sankar Roy 1. Acknowledgement While preparing the presentation slides and the demo, I received help from Professor Eugene Vasserman Professor](https://reader035.vdocument.in/reader035/viewer/2022070323/56649e235503460f94b113a3/html5/thumbnails/19.jpg)
19
Basics of PKI: comparison with DMV• A party P’s certificate CP is like P’s Driver License where CA takes the
role of DMV• A policeman (or a liquor shop) uses your Driver License (DL) to verify
your identity (or age)• Likewise, server P’s certificate CP can be verified by another party Q
(e.g. your browser)• Actually, Q verifies P’s public key by investigating CA’s digital
signature which is present in CP
• Note that there are multiple DMVs in USA, each of whose DLs are trusted anywhere in USA
• Similarly, there are multiple CAs in PKI, each of whose certificates are accepted by every browser
![Page 20: Web Security Sankar Roy 1. Acknowledgement While preparing the presentation slides and the demo, I received help from Professor Eugene Vasserman Professor](https://reader035.vdocument.in/reader035/viewer/2022070323/56649e235503460f94b113a3/html5/thumbnails/20.jpg)
20
How to Do Secure Web Browsing?
Ensure that you see the lock symbol in the address bar. The drop down panel above shows the https encryption and the certificate of this web server.
![Page 21: Web Security Sankar Roy 1. Acknowledgement While preparing the presentation slides and the demo, I received help from Professor Eugene Vasserman Professor](https://reader035.vdocument.in/reader035/viewer/2022070323/56649e235503460f94b113a3/html5/thumbnails/21.jpg)
21
How to Check if We are Secure?
• It depends on the browser.• Ensure you see the lock symbol or https in the address bar
![Page 22: Web Security Sankar Roy 1. Acknowledgement While preparing the presentation slides and the demo, I received help from Professor Eugene Vasserman Professor](https://reader035.vdocument.in/reader035/viewer/2022070323/56649e235503460f94b113a3/html5/thumbnails/22.jpg)
22
Viewing the Certificate of a Server
The browser can show us the certificate of the server website. Here we view the certificate of mail.google.com while using Firefox. Note the Certificate Hierarchy.
![Page 23: Web Security Sankar Roy 1. Acknowledgement While preparing the presentation slides and the demo, I received help from Professor Eugene Vasserman Professor](https://reader035.vdocument.in/reader035/viewer/2022070323/56649e235503460f94b113a3/html5/thumbnails/23.jpg)
23
Secure Web Browsing ProtocolSecure browsing (HTTPS) is like running the HTTP protocol on top of SSL which is a security technologyAfter you type mybank.com (say B) on a browser (say A) address bar, the following events take place:
1. Using the public/private key pair, A and B establish a confidential communication channel. B’s certificate makes A sure that B is the correct website
2. A displays the secure login page in front of you
3. You type the username and password, and A sends it to B over the confidential channel
4. B decrypts your username and password and verify. B becomes sure that it is communicating with you and nobody else
5. You (and A) can continue the mutually authenticated and confidential web session with B
![Page 24: Web Security Sankar Roy 1. Acknowledgement While preparing the presentation slides and the demo, I received help from Professor Eugene Vasserman Professor](https://reader035.vdocument.in/reader035/viewer/2022070323/56649e235503460f94b113a3/html5/thumbnails/24.jpg)
24
Weakness of the PKI System
1. One compromised CA can issue a certificate to anybody X. Then, X can issue certificates.
2. Possible usage of a hierarchy of certificate authorities (CAs) which form a chain of trust. A bad node in the chain kills the system.
3. It is hard for a browser to manage the long list of trusted CAs. Updating the list of revoked/untrusted CAs is even harder.
TRUSTED ROOT
Certificate, e.g. BigCorp.com
TRUSTED DELEGATE
Certificate, e.g.
MyBank.com
Certificate, e.g.
Google.com
![Page 25: Web Security Sankar Roy 1. Acknowledgement While preparing the presentation slides and the demo, I received help from Professor Eugene Vasserman Professor](https://reader035.vdocument.in/reader035/viewer/2022070323/56649e235503460f94b113a3/html5/thumbnails/25.jpg)
25
More Limitations of HTTPS
• We often encounter warning from the browser due to invalid (or expired) certificates. It can be very confusing to the common user to decide what to do in such situations to guarantee safety
• Building trust could be confusing: trusted authority vs. trustworthy authority– Let’s compare two certificates of Citibank. One is
issued by Verisign and the other by a Russian CA. Both of the certificates can be trusted by the browser, but only the first one might be trustworthy.
![Page 26: Web Security Sankar Roy 1. Acknowledgement While preparing the presentation slides and the demo, I received help from Professor Eugene Vasserman Professor](https://reader035.vdocument.in/reader035/viewer/2022070323/56649e235503460f94b113a3/html5/thumbnails/26.jpg)
26
Certificate, e.g. NOT
Google.com
Certificate, e.g. NOT
MyBank.com
Certificate, e.g.
MyBank.com
Certificate, e.g.
Google.com
Delegate Changes, You Don’t Notice
ROOT
Certificate, e.g. BigCorp.com
UNTRUSTWORTHY DELEGATE
TRUSTED ROOT
Certificate, e.g. BigCorp.com
TRUSTED DELEGATE
![Page 27: Web Security Sankar Roy 1. Acknowledgement While preparing the presentation slides and the demo, I received help from Professor Eugene Vasserman Professor](https://reader035.vdocument.in/reader035/viewer/2022070323/56649e235503460f94b113a3/html5/thumbnails/27.jpg)
27
Demonstration: Man-in-the-middle Attack
• Goal: We show that just getting “https://” displayed on the address bar does not guarantee security.
• Each student has a desktop to connect to the Internet– he/she may use the Firefox browser to visit a bank website
• As an example, type on the Firefox address bar https://yourBank.com• Caution: when the login page is displayed on Firefox, – please use a bogus login id and password– do not type any valid id or password to avoid problems
![Page 28: Web Security Sankar Roy 1. Acknowledgement While preparing the presentation slides and the demo, I received help from Professor Eugene Vasserman Professor](https://reader035.vdocument.in/reader035/viewer/2022070323/56649e235503460f94b113a3/html5/thumbnails/28.jpg)
28
A Diagram of the Man-in-the-middle AttackThe adversary (Mallory) intercepts the connection between Alice (e.g. you) and Bob (e.g. your bank).
Muahaha!
Alice
Bob
Bob
![Page 29: Web Security Sankar Roy 1. Acknowledgement While preparing the presentation slides and the demo, I received help from Professor Eugene Vasserman Professor](https://reader035.vdocument.in/reader035/viewer/2022070323/56649e235503460f94b113a3/html5/thumbnails/29.jpg)
29
Demonstration
![Page 30: Web Security Sankar Roy 1. Acknowledgement While preparing the presentation slides and the demo, I received help from Professor Eugene Vasserman Professor](https://reader035.vdocument.in/reader035/viewer/2022070323/56649e235503460f94b113a3/html5/thumbnails/30.jpg)
30
Explaining the Previous Demo• Setup: One proxy server for the whole class/lab• Each Desktop’s browser (Firefox) is pre-configured with the proxy server’s information
(i.e. the IP address, and the port)
• Lesson: Never proceed if your browser warns that it does not trust a website’s certificate
…
Desktop 1
Desktop n
…
Website 1
Website n
Proxy Server
https conctn https conctn
…
• If you are not careful, the proxy server can decrypt– your login name, password, and the other communicated data
You areusing Firefoxon oneDesktop.
One ofthesewebsitesis yourbank.
![Page 31: Web Security Sankar Roy 1. Acknowledgement While preparing the presentation slides and the demo, I received help from Professor Eugene Vasserman Professor](https://reader035.vdocument.in/reader035/viewer/2022070323/56649e235503460f94b113a3/html5/thumbnails/31.jpg)
31
What could Happen if the PKI is Broken?
• Then, bogus certificates could be accepted. • We demonstrated a man-in-the-middle attack in
a similar scenario.• The following events occur in the demo attack:– An HTTPS request from Client C to Server S is
intercepted by the adversary on a proxy server– The adversary (Mallory) then sends a bogus certificate
in the name of Server S– The Client C authenticates the certificate chain and
sends a session key, encrypted using the public key supplied by Mallory
![Page 32: Web Security Sankar Roy 1. Acknowledgement While preparing the presentation slides and the demo, I received help from Professor Eugene Vasserman Professor](https://reader035.vdocument.in/reader035/viewer/2022070323/56649e235503460f94b113a3/html5/thumbnails/32.jpg)
32
Problems if the PKI is broken (Contd.)• The adversary Mallory decrypts the session
key• Mallory opens an HTTPS session with Server S
and proxies the traffic between C and S• All the data that is in transferred between C
and S is available to Mallory
![Page 33: Web Security Sankar Roy 1. Acknowledgement While preparing the presentation slides and the demo, I received help from Professor Eugene Vasserman Professor](https://reader035.vdocument.in/reader035/viewer/2022070323/56649e235503460f94b113a3/html5/thumbnails/33.jpg)
33
Another Problem: Only the Login is Done in HTTPS
In some portals (e.g. Yahoo mail) the web session after successful login switches back to HTTP. The HTTP session is then authenticated only by a cookie. Problem: client’s cookie can be stolen
– (as an example) when the adversary does packet sniffing on the same Ethernet or Wi-Fi network as the client’s machine
Outcome: the HTTP session can be hijacked.Solution: we suggest to use only those websites which employ HTTPS for the whole session (e.g. Gmail)
![Page 34: Web Security Sankar Roy 1. Acknowledgement While preparing the presentation slides and the demo, I received help from Professor Eugene Vasserman Professor](https://reader035.vdocument.in/reader035/viewer/2022070323/56649e235503460f94b113a3/html5/thumbnails/34.jpg)
34
Summary
• We discussed common security threats of Web browsing
• We presented a few standard countermeasures to mitigate the risks
• Remainder:– the next homework is due before the next class (1pm
on February 7) – the next class will be held in Room 127