Presentation is loading. Please wait.

Presentation is loading. Please wait.

Web Security Sankar Roy 1. Acknowledgement While preparing the presentation slides and the demo, I received help from Professor Eugene Vasserman Professor.

Similar presentations


Presentation on theme: "Web Security Sankar Roy 1. Acknowledgement While preparing the presentation slides and the demo, I received help from Professor Eugene Vasserman Professor."— Presentation transcript:

1 Web Security Sankar Roy 1

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 2

3 Web Activities Why do we browse Internet? – email – searching on – social networking – e-commerce – driving directions – reading – watching 3

4 Security-sensitive Web Activities Online shopping Managing confidential emails 4

5 Common Risks 5

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 6

7 Understanding the Web Communication An example: Let’s do a Google search: 0-th step: type google.com on a browsergoogle.com The next three major steps (s 1, s 2 and s 3 ) as shown above are elaborated later DNS = Domain name service Your desktop Google server DNS s1s1 s2s2 s3s3 7

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)google.com 8

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 9

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 10

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 11

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. 12

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” 13

14 Connection Interception: Another View The adversary (let’s call him Mallory) intercepts the communication between Alice and Bob. Muahaha! Alice Bob 14

15 Where does Web Browsing Lack? HTTP is (more or less) OK for Google search because of no confidential data being involved Browser Server 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 15

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 16

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. 17

18 Securing Web Browsing Alice Bob Confidential Authenticated Bob CRAP! 18

19 Basics of PKI: comparison with DMV A party P’s certificate C P 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 C P 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 C P 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 19

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. 20

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 21

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. 22

23 Secure Web Browsing Protocol Secure browsing (HTTPS) is like running the HTTP protocol on top of SSL which is a security technology After you type mybank.com ( say B ) on a browser (say A) address bar, the following events take place:mybank.com 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 23

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 24

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. 25

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 26

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 27

28 A Diagram of the Man-in-the-middle Attack The adversary (Mallory) intercepts the connection between Alice (e.g. you) and Bob (e.g. your bank). Muahaha! Alice Bob 28

29 Demonstration 29

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 … If you are not careful, the proxy server can decrypt – your login name, password, and the other communicated data You are using Firefox on one Desktop. One of these websites is your bank. 30

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 31

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 32

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) 33

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 34


Download ppt "Web Security Sankar Roy 1. Acknowledgement While preparing the presentation slides and the demo, I received help from Professor Eugene Vasserman Professor."

Similar presentations


Ads by Google