SSL, HTTPS and the Lock Icon Borrowed from Dan Boneh & others.

Slides:



Advertisements
Similar presentations
SSL/TLS Protocol Network Security Gene Itkis. Basic paradigmatic application: on-line purchase Client contacts Server (possibly for the first time) Spontaneity.
Advertisements

ForceHTTPS: Protecting High-Security Web Sites from Network Attacks Collin Jackson and Adam Barth.
HTTPS and the Lock Icon Dan Boneh. Goals for this lecture Brief overview of HTTPS: How the SSL/TLS protocol works (very briefly) How to use HTTPS Integrating.
Internet and Intranet Protocols and Applications Lecture 9a: Secure Sockets Layer (SSL) March, 2004 Arthur Goldberg Computer Science Department New York.
1 Lecture 17: SSL/TLS history, architecture basic handshake session initiation/resumption key computation negotiating cipher suites application: SET.
CS470, A.SelcukSSL/TLS & SET1 CS 470 Introduction to Applied Cryptography Instructor: Ali Aydin Selcuk.
1 Lecture 12 SSL/TLS (Secure Sockets Layer / Transport Layer Security) CIS CIS 5357 Network Security.
Dan Boneh Web security HTTPS and the Lock Icon. Dan Boneh Goals for this lecture Brief overview of HTTPS: How the SSL/TLS protocol works (very briefly)
ECE 454/CS 594 Computer and Network Security
Lecture 6: Web security: SSL
SMUCSE 5349/49 SSL/TLS. SMUCSE 5349/7349 Layers of Security.
Cryptography and Network Security
SSL CS772 Fall Secure Socket layer Design Goals: SSLv2) SSL should work well with the main web protocols such as HTTP. Confidentiality is the top.
Socket Layer Security. In this Presentation: need for web security SSL/TLS transport layer security protocols HTTPS secure shell (SSH)
Working Connection Computer and Network Security - SSL, IPsec, Firewalls – (Chapter 17, 18, 19, and 23)
7-1 Chapter 7 – Web Security Use your mentality Wake up to reality —From the song, "I've Got You under My Skin“ by Cole Porter.
An Introduction to Secure Sockets Layer (SSL). Overview Types of encryption SSL History Design Goals Protocol Problems Competing Technologies.
Slide 1 Vitaly Shmatikov CS 378 SSL/TLS. slide 2 What is SSL / TLS? uTransport Layer Security protocol, version 1.0 De facto standard for Internet security.
Module 5: TLS and SSL 1. Overview Transport Layer Security Overview Secure Socket Layer Overview SSL Termination SSL in the Hosted Environment Load Balanced.
COMP043-Cryptology Week 4 – Certs and Sigs. Digital Signatures Digital signatures provide –Integrity –Authenticity and –Non-repudiation How do they work?
Topic 8: Secure communication in mobile devices. Choice of secure communication protocols, leveraging SSL for remote authentication and using HTTPS for.
More Trick For Defeating SSL
More on SSL/TLS. Internet security: TLS TLS is one of the more prominent internet security protocols. TLS is one of the more prominent internet security.
Mar 19, 2002Mårten Trolin1 This lecture On the assignment Certificates and key management SSL/TLS –Introduction –Phases –Commands.
Apr 2, 2002Mårten Trolin1 Previous lecture On the assignment Certificates and key management –Obtaining a certificate –Verifying a certificate –Certificate.
Cryptography and Network Security Chapter 17
Apr 22, 2003Mårten Trolin1 Agenda Course high-lights – Symmetric and asymmetric cryptography – Digital signatures and MACs – Certificates – Protocols Interactive.
0 SSL3.0 / TLS1.0 Secure Communication over Insecure Line.
8-1 What is network security? Confidentiality: only sender, intended receiver should “understand” message contents m sender encrypts message m receiver.
Encryption An Overview. Fundamental problems Internet traffic goes through many networks and routers Many of those networks are broadcast media Sniffing.
SSL By: Anthony Harris & Adam Shkoler. What is SSL? SSL stands for Secure Sockets Layer SSL is a cryptographic protocol which provides secure communications.
Chapter 8 Web Security.
Computer Science Public Key Management Lecture 5.
CSCI 6962: Server-side Design and Programming
How HTTPS Works J. David Giese. Hyper Text Transfer Protocol BrowserHTTP Server GET / HTTP/1.1 HOST: edge-effect.github.io HEADERS BODY HTTP/ OK.
SSL and https for Secure Web Communication CSCI 5857: Encoding and Encryption.
HTTPS and the Lock Icon Faisal Karim Shaikh Slides by Dan Boneh.
Secure Socket Layer (SSL)
SSL / TLS in ITDS Arun Vishwanathan 23 rd Dec 2003.
Behzad Akbari Spring 2012 (These slides are based on lecture slides by Lawrie Brown)
Introduction to Secure Sockets Layer (SSL) Protocol Based on:
Security Protocols and E-commerce University of Palestine Eng. Wisam Zaqoot April 2010 ITSS 4201 Internet Insurance and Information Hiding.
CSCE 715: Network Systems Security Chin-Tser Huang University of South Carolina.
Network Security Essentials Chapter 5
Cryptography and Network Security (CS435) Part Fourteen (Web Security)
Web Security : Secure Socket Layer Secure Electronic Transaction.
8-1 Chapter 8 Security Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 part 3: Securing TCP.
CS 4244: Internet Programming Security 1.0. Introduction Client identification and cookies Basic Authentication Digest Authentication Secure HTTP.
Can SSL and TOR be intercepted? Secure Socket Layer.
SMUCSE 5349/7349 SSL/TLS. SMUCSE 5349/7349 Layers of Security.
1 SSL/TLS. 2 Web security Security requirements Secrecy to prevent eavesdroppers to learn sensitive information Entity authentication Message authentication.
Secure Socket Layer SSL and TLS. SSL Protocol Peer negotiation for algorithm support Public key encryptionPublic key encryption -based key exchange and.
Mar 28, 2003Mårten Trolin1 This lecture Certificates and key management Non-interactive protocols –PGP SSL/TLS –Introduction –Phases –Commands.
CSCE 715: Network Systems Security Chin-Tser Huang University of South Carolina.
8-1 CSE 4707/5850 Network Security (2) SSL/TLS. 8-2 Think about Google or YouTube  Desired properties  Indeed the other side is Google or YouTube server.
Lecture 6 (Chapter 16,17,18) Network and Internet Security Prepared by Dr. Lamiaa M. Elshenawy 1.
@Yuan Xue CS 285 Network Security Secure Socket Layer Yuan Xue Fall 2013.
Cryptography CSS 329 Lecture 13:SSL.
Apr 1, 2003Mårten Trolin1 Previous lecture Certificates and key management Non-interactive protocols –PGP SSL/TLS –Introduction –Phases –Commands.
SSL: Secure Socket Layer By: Mike Weissert. Overview Definition History & Background SSL Assurances SSL Session Problems Attacks & Defenses.
Web security HTTPS and the Lock Icon.
Web security HTTPS and the Lock Icon.
Avishai Wool Slides credit: Dan Boneh, John Mitchell
Secure Sockets Layer (SSL)
CSCE 715: Network Systems Security
Using SSL – Secure Socket Layer
Web security HTTPS and the Lock Icon.
Cryptography and Network Security
Presentation transcript:

SSL, HTTPS and the Lock Icon Borrowed from Dan Boneh & others

Goals for this lecture Brief overview of HTTPS: How the SSL/TLS protocol works (very briefly) How to use HTTPS Integrating HTTPS into the browser Lots of user interface problems to watch for 2

Threat Model: Network Attacker Network Attacker: Controls network infrastructure: Routers, DNS Passive attacker: only eavesdrops on net traffic Active attacker: eavesdrops, injects, blocks, and modifies packets Examples: Wireless network at Internet Café Internet access at hotels (untrusted ISP) 3

Reminder: Public-Key Encryption Alice Enc m c Bob Dec c m PK Bob SK Bob Bob generates (SK Bob, PK Bob ) Alice: using PK Bob encrypts messages and only Bob can decrypt Public-key encryption: 4

Certificates How does Alice (browser) obtain PK Bob ? CA PK and proof “I am Bob” Browser Alice SK CA check proof issue Cert with SK CA : Bob’s key is PK choose (SK,PK ) Server Bob PK CA verify Cert Bob uses Cert for an extended period (e.g. one year) PK CA 5

Certificates: example Important fields: 6

Certificates on the web Subject’s CommonName can be: An explicit name, e.g. cs.stanford.edu, or A wildcard cert, e.g. *.stanford.edu or cs*.stanford.edu matching rules: “ * ” must occur in leftmost component, does not match “.” example: *.a.com matches x.a.com but not y.x.a.com (as in RFC 2818: “HTTPS over TLS”) 7

Managing your certificates Firefox: Tools > Options > Advanced > Certificates

Certificate Authorities Browsers accept certificates from a large number of CAs Top level CAs ≈ 60 Intermediate CAs ≈

SSL/TLS

SSL/TLS: the cryptographic protocol in HTTPS Establish a session Agree on algorithms Share secrets Perform authentication Transfer application data Ensure privacy and integrity 11

Handshake Negotiate Cipher-Suite Algorithms Symmetric cipher to use Key exchange method Message digest function Establish and share master secret Optionally authenticate server and/or client 12

Brief overview of SSL/TLS browser server SK client-hello server-hello + server-cert ( PK ) key exchange (several options) Finished cert client-key-exchange: E(PK, k) rand. k k HTTP data encrypted, Symmetric cipher(k) Most common: server authentication only 13

ClientHello C S Client announces (in plaintext): Protocol version he is running Cryptographic algorithms he supports

struct { ProtocolVersion client_version; Random random; SessionID session_id; CipherSuite cipher_suites; CompressionMethod compression_methods; } ClientHello ClientHello (RFC) Highest version of the protocol supported by the client Set of cryptographic algorithms supported by the client (e.g., RSA or Diffie-Hellman)

Client Hello - Cipher Suites INITIAL (NULL) CIPHER SUITE PUBLIC-KEY ALGORITHM SYMMETRIC ALGORITHM HASH ALGORITHM CIPHER SUITE CODES USED IN SSL MESSAGES SSL_NULL_WITH_NULL_NULL = { 0, 0 } SSL_RSA_WITH_NULL_MD5 = { 0, 1 } SSL_RSA_WITH_NULL_SHA = { 0, 2 } SSL_RSA_EXPORT_WITH_RC4_40_MD5 = { 0, 3 } SSL_RSA_WITH_RC4_128_MD5 = { 0, 4 } SSL_RSA_WITH_RC4_128_SHA = { 0, 5 } SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD5 = { 0, 6 } SSL_RSA_WITH_IDEA_CBC_SHA = { 0, 7 } SSL_RSA_EXPORT_WITH_DES40_CBC_SHA = { 0, 8 } SSL_RSA_WITH_DES_CBC_SHA = { 0, 9 } SSL_RSA_WITH_3DES_EDE_CBC_SHA = { 0, 10 } 16

ServerHello C Version c, suite c, N c ServerHello S Server responds (in plaintext) with: Highest protocol version supported by both client and server Strongest cryptographic suite selected from those offered by the client Server selects the protocol version and the crypto algorithms

ServerKeyExchange C Version s, suite s, N s, ServerKeyExchange S Server sends his public-key certificate containing either his RSA, or his Diffie-Hellman public key (depending on chosen crypto suite) Version c, suite c, N c

ClientKeyExchange C Version s, suite s, N s, sig ca (S,K s ), “ServerHelloDone” S Version c, suite c, N c ClientKeyExchange Client generates some secret key material and sends it to the server encrypted with the server’s public key (if using RSA) Client selects what will become the secret session key

What is Authenticated in SSL ? #1 Server’s PK provided as a Cert signed by CA Browser has CA’s public key Verified signature  Trust the server’s PK But does the server hold the matching SK ? 20

What is Authenticated in SSL? #2 Browser’s secret random k encrypted by PK Server decrypts k Browser & server derive shared secret key All subsequent messages are encrypted With symmetric cipher, e.g. RC4 If browser decrypts successfully  Server got the correct k  Server had the SK matching the Cert  Server is authenticated Client is NOT authenticated: usually has to login (through the encrypted channel) 21

Version Rollback Attack C Version s =2.0, suite s, N s, sig ca (S,K s ), “ServerHelloDone” S Version c =2.0, suite c, N c {Secret c } Ks C and S end up communicating using SSL 2.0 (weaker earlier version of the protocol that does not include “Finished” messages) Server is fooled into thinking he is communicating with a client who supports only SSL 2.0 Fixed in SSL v3.0

“Chosen-Protocol” Attacks Why do people release new versions of security protocols? Because the old version got broken! New version must be backward-compatible Not everybody upgrades right away Attacker can fool someone into using the old, broken version and exploit known vulnerability Similar: fool victim into using weak crypto algorithms Defense is hard: must authenticate version early Many protocols had “version rollback” attacks SSL, SSH, GSM (cell phones)

HTTPS in the Browser

The lock icon: SSL indicator Intended goal: Provide user with identity of page origin Indicate to user that page contents were not viewed or modified by a network attacker In reality: Origin ID is not always helpful example: Stanford HR is hosted at BenefitsCenter.com Many other problems (next few slides) 25

When is the (basic) lock icon displayed All elements on the page fetched using HTTPS (with some exceptions) For all elements: HTTPS cert issued by a CA trusted by browser HTTPS cert is valid (e.g. not expired) CommonName in cert matches domain in URL 26

The lock UI: Extended Validation (EV) Certs Green background or text in browser URL Harder to obtain than regular certs requires human lawyer at CA to approve cert request Designed for banks and large e-commerce sites 27

A general UI attack: picture-in-picture Trained users are more likely to fall victim to this [JSTB’07] 28

HTTPS and login pages: the bad way Users often land on login page over HTTP: Type site’s HTTP URL into address bar, or Google links to the HTTP page <form method="post" action=" View source:

HTTPS and login pages: guidelines General guideline: never show a login screen via http Response to should beRedirect:

Problems with HTTPS and the Lock Icon

1. HTTP  HTTPS upgrade Common use pattern: browse site over HTTP; move to HTTPS for checkout connect to bank over HTTP; move to HTTPS for login Easy attack: prevent the upgrade (ssl_strip) [Moxie’08]  Location: https ://...  Location: http ://... (redirect)  web server attacker SSLHTTP 32

Tricks and Details Tricks: drop-in a clever fav icon (older browsers) Details: Erase existing session and force user to login: ssl_strip injects “Set-cookie” headers to delete existing session cookies in browser. Number of users who detected HTTP downgrade: 0  33

2. Semantic attacks on certs International domains: xyz.cn Rendered using international character set Observation: Chinese character set contains chars that look like “/” and “?” and “.” and “=” Attack: buy domain cert for *.badguy.cn setup domain called: note: single cert *.badguy.cn works for all sites Extended validation (EV) certs may help defeat this 34

[Moxie’08] 35

3. Certificate Issuance Woes Wrong issuance: 2011: Comodo and DigiNotar RAs hacked, issue certs for Gmail, Yahoo! Mail, … Rogue CA:  2009: Etisalat CA in UAE Signs software patch on behalf of RIM  PacketForensics: HTTPS MiTM for law enforcement (see also crypto.stanford.edu/ssl-mitm ) ⇒ enables eavesdropping w/o a warning in user’s browser 36

Man in the middle attack using rogue certs Attacker proxies data between user and bank. Sees all traffic and can modify data at will. bank attacker ClientHello BankCertBadguyCert ServerCert (Bank) ServerCert (rogue) GET SSL key exchange k1k1 k1k1 k2k2 k2k2 HTTP data enc with k 1 HTTP data enc with k 2 (cert for Bank by a valid CA) 37

What to do? (many good ideas) 1.HTTP public-key pinning, TACK Let a site declare CAs that can sign its cert on subsequent HTTPS, browser rejects certs for site issued by other CAs TOFU: Trust on First Use 2.Certificate Transparency: [LL’12] idea: CA’s must advertise a log of all certs. they issued Browser will only use a cert if it is on the CA’s log Efficient implementation using Merkle hash trees Companies can scan logs to look for invalid issuance 38

4. Mixed Content: HTTP and HTTPS Page loads over HTTPS, but contains content over HTTP (e.g. ) Active network attacker can hijack session Modifies script en-route to browser Another way to embed content: served over the same protocol as embedding page Can use for content served over HTTP or HTTPS 39

Mixed Content: HTTP and HTTPS IE7: No SSL lock in address bar: Chrome: 40

5. Peeking through SSL Network traffic reveals length of HTTPS packets TLS supports up to 256 bytes of padding AJAX-rich pages have lots and lots of interactions with the server These interactions expose specific internal state of the page BAM! Chen, Wang, Wang, Zhang, 2010

Peeking through SSL: an example Vulnerabilities in an online tax application No easy fix. Can also be used to ID Tor traffic Vulnerabilities in an online tax application No easy fix. Can also be used to ID Tor traffic 42

THE END

6. Origin Contamination: an example Solution: remove lock from top page after loading bottom page 44

Integrating SSL/TLS with HTTP  HTTPS Two complications Web proxies solution: browser sends CONNECT domain-name before client-hello (dropped by proxy) Virtual hosting: two sites hosted at same IP address. solution in TLS 1.1: SNI (RFC 4366) client_hello_extension: server_name=cnn.com implemented since FF2 and IE7 (vista) web proxy web server corporate network web server cert CNN cert FOX client-hello server-cert ???

Why is HTTPS not used for all web traffic? Slows down web servers Breaks Internet caching ISPs cannot cache HTTPS traffic Results in increased traffic at web site Incompatible with virtual hosting (older browsers) May. 2013: IE6 ≈ 7% (ie6countdown.com)

The lock UI: helps users authenticate site uninformative

Problems with HTTPS and the Lock Icon 1.Upgrade from HTTP to HTTPS 2.Semantic attacks on certs 3.Forged certs 4.Mixed content HTTP and HTTPS on the same page 5.Origin contamination Weak HTTPS page contaminates stronger HTTPS page 6.Does HTTPS hide web traffic? 48

Defense: Strict Transport Security (HSTS) Header tells browser to always connect over HTTPS After first visit, subsequent visits are over HTTPS self signed cert results in an error STS flag deleted when user “clears private data” (chrome) Compromise: security vs. privacy web server Strict-Transport-Security max-age=31 ⋅ 10 6 ; 49