Strengthening Master Secrets! (to get good TLS Channel Identifiers)



Similar documents
Breaking and Fixing Authentication over TLS

Information Security

Binding Security Tokens to TLS Channels. A. Langley, Google Inc. D. Balfanz, Google Inc. A. Popov, Microsoft Corp.

SECURE SOCKETS LAYER (SSL)

Internet Engineering Task Force (IETF) Request for Comments: Category: Standards Track ISSN: A. Langley Google June 2015

Secure Socket Layer (SSL) and Trnasport Layer Security (TLS)

Outline. Transport Layer Security (TLS) Security Protocols (bmevihim132)

SSL Secure Socket Layer

Announcement. Final exam: Wed, June 9, 9:30-11:18 Scope: materials after RSA (but you need to know RSA) Open books, open notes. Calculators allowed.

SSL Secure Socket Layer

Authenticity of Public Keys

History of the TLS Authentication Gap Bug. Marsh Ray Steve Dispensa PhoneFactor

Web Security Considerations

Network Security Web Security and SSL/TLS. Angelos Keromytis Columbia University

Security Engineering Part III Network Security. Security Protocols (I): SSL/TLS

TLS-RSA-PSK. Channel Binding using Transport Layer Security with Pre Shared Keys

Real-Time Communication Security: SSL/TLS. Guevara Noubir CSU610

Managing and Securing Computer Networks. Guy Leduc. Chapter 4: Securing TCP. connections. connections. Chapter goals: security in practice:

Secure Socket Layer. Security Threat Classifications

Communication Security for Applications

The BEAST Wins Again: Why TLS Keeps Failing to Protect HTTP

Web Application Entity Session Management using the eid Card Frank Cornelis 03/03/2010. Fedict All rights reserved

Overview of SSL. Outline. CSC/ECE 574 Computer and Network Security. Reminder: What Layer? Protocols. SSL Architecture

Communication Systems SSL

The BEAST Wins Again: Why TLS Keeps Failing to Protect HTTP

Web Security (SSL) Tecniche di Sicurezza dei Sistemi 1

Communication Systems 16 th lecture. Chair of Communication Systems Department of Applied Sciences University of Freiburg 2009

SSL: Secure Socket Layer

Secure Sockets Layer (SSL ) / Transport Layer Security (TLS) Network Security Products S31213

SECURE SOCKETS LAYER (SSL) SECURE SOCKETS LAYER (SSL) SSL ARCHITECTURE SSL/TLS DIFFERENCES SSL ARCHITECTURE. INFS 766 Internet Security Protocols

SSL/TLS. What Layer? History. SSL vs. IPsec. SSL Architecture. SSL Architecture. IT443 Network Security Administration Instructor: Bo Sheng

Security Protocols and Infrastructures. h_da, Winter Term 2011/2012

Embedded SSL. Christophe Kiennert, Pascal Urien. Embedded SSL - Christophe Kiennert, Pascal Urien 1

CSC 474 Information Systems Security

Einführung in SSL mit Wireshark

CSC Network Security

How To Understand And Understand The Ssl Protocol ( And Its Security Features (Protocol)

Secure Socket Layer (SSL) and Transport Layer Security (TLS)

Lecture 7: Transport Level Security SSL/TLS. Course Admin

Transport Level Security

ISA 562 Information System Security

Security Protocols HTTPS/ DNSSEC TLS. Internet (IPSEC) Network (802.1x) Application (HTTP,DNS) Transport (TCP/UDP) Transport (TCP/UDP) Internet (IP)

Lab Exercise SSL/TLS. Objective. Step 1: Open a Trace. Step 2: Inspect the Trace

Lecture 4: Transport Layer Security (secure Socket Layer)

Secure Socket Layer/ Transport Layer Security (SSL/TLS)

WEB Security & SET. Outline. Web Security Considerations. Web Security Considerations. Secure Socket Layer (SSL) and Transport Layer Security (TLS)

The Beautiful Features of SSL And Why You Want to Use Them?

Secure Socket Layer. Carlo U. Nicola, SGI FHNW With extracts from publications of : William Stallings.

SSL Interception Proxies. Jeff Jarmoc Sr. Security Researcher Dell SecureWorks. and Transitive Trust

Chapter 17. Transport-Level Security

Final Exam. IT 4823 Information Security Administration. Rescheduling Final Exams. Kerberos. Idea. Ticket

, ) I Transport Layer Security

HTTP Mutual authentication and Web security

Secure Socket Layer. Introduction Overview of SSL What SSL is Useful For

The Belgian e-id: hacker vs developer

Security. Contents. S Wireless Personal, Local, Metropolitan, and Wide Area Networks 1

CS 356 Lecture 27 Internet Security Protocols. Spring 2013

Cryptography and Network Security Sicurezza delle reti e dei sistemi informatici SSL/TSL

As enterprises conduct more and more

SSL/TLS: The Ugly Truth

HTTPS: Transport-Layer Security (TLS), aka Secure Sockets Layer (SSL)

GNU Network Security Labyrinth. - or: an howto for network application authors. TLS SASL Kerberos GSS-API

Protocol Rollback and Network Security

Some solutions commonly used in order to guarantee a certain level of safety and security are:

Network Security. Chapter 12 Security Protocols of the Transport Layer

Transport Layer Security (TLS)

On the Security of TLS 1.3 and QUIC Against Weaknesses in PKCS#1 v1.5 Encryption

GNUTLS. a Transport Layer Security Library This is a Draft document Applies to GnuTLS by Nikos Mavroyanopoulos

Secure Communication Protocol for ATM Using TLS Handshake

Lab 7. Answer. Figure 1

SSL DOES NOT MEAN SOL What if you don t have the server keys?

Chapter 11 Security Protocols. Network Security Threats Security and Cryptography Network Security Protocols Cryptographic Algorithms

Transport Layer Security Protocols

Network Security Protocols

Harden SSL/TLS v1.01. Windows hardening tool. Thierry ZOLLER.

MatrixSSL Developer's Guide Version 3.7

Network Security Essentials Chapter 5

Secure Socket Layer (TLS) Carlo U. Nicola, SGI FHNW With extracts from publications of : William Stallings.

Chapter 10. Network Security

Chair for Network Architectures and Services Department of Informatics TU München Prof. Carle. Network Security. Chapter 5

Internet Security Architecture

Overview of CSS SSL. SSL Cryptography Overview CHAPTER

T Cryptography and Data Security

Network Security Standards. Key distribution Kerberos SSL/TLS

Secure Sockets Layer

Public Key Infrastructure (PKI)

SSL/TLS/X.509. Aggelos Kiayias

Take-home points. Distributed Systems Security II. Remember digital signatures. Today: Auth protocols

Security Protocols/Standards

govroam Web Interface User Guide

Today s Topics SSL/TLS. Certification Authorities VPN. Server Certificates Client Certificates. Trust Registration Authorities

Institute of Computer Technology - Vienna University of Technology. L96 - SSL, PGP, Kerberos

INF3510 Information Security University of Oslo Spring Lecture 9 Communication Security. Audun Jøsang

Chapter 7 Transport-Level Security

Using etoken for SSL Web Authentication. SSL V3.0 Overview

A Proof of Concept Implementation of SSL/TLS Session-Aware User Authentication (TLS-SA)

Kerberos and Single Sign On with HTTP

Overview. SSL Cryptography Overview CHAPTER 1

Extensible Authentication Protocol Transport Layer Security Deployment Guide for Wireless LAN Networks

Practical Invalid Curve Attacks on TLS-ECDH

Transcription:

Strengthening Master Secrets! (to get good TLS Channel Identifiers) K Bhargavan, A Delignat-Lavaud, A Pironti (INRIA) A Langley (Google), M Ray (Microsoft) https://secure-resumption.com IETF 89, London, March 4, 2014 Joint work with C. Fournet, P- Y Strub, M. Kohlweiss, S Zanella- Béguelin

User Authentication over TLS Common Pattern Outer: server-authenticated TLS Inner: user authentication protocol Many examples SASL, GSSAPI, PEAP, Renegotiation with client certificate Common concerns How to bind inner authentication with outer channel?

MITM on Tunneled Auth [2002]! Simplified version of [Asokan, Niemi, Nyberg 02] User u connects to malicious server M M forwards user auth messages to S unchanged M can send Data to S pretending to be u

TLS Renegotiation [2009]! Martin Rex s Version Client C connects to malicious server M C renegogates with cert C ; M forwards handshake messages to S unchanged S appends Data,Data C is now connected to S New keys unknown to M

Attack Preconditions and Caveats The user u must be willing to authenticate to M If TLS client refuses to connect,! or user refuses to authenticate, the attack doesn t apply For Rex s renegotiation attack C is willing to accept a change of server cert from M to S S concatenates data received before and after renego If TLS client/server prevents these, the attack doesn t apply In practice, however, all these preconditions are widely met!! So, user authentication protocols implement! various channel binding countermeasures.

Binding User Auth to TLS Channels Extract TLS- level channel idengfier cid cid cid Bind cid to User authengcagon Choices for iden5fier: cid=f(master_secret) cid=f(verify_data) Does not work if M can ensure that cid = cid

Triple Handshake Attack [2014]! Bhargavan, Delignat-Lavaud, Fournet, Pironti, Strub [S&P 14] None of the existing channel identifiers quite work Authentication protocols bound to master_secret! can be broken after one handshake (PEAP) Authentication protocols bound to verify_data! can be broken after two handshakes (SASL) Client-authenticated TLS Renegotiation using RFC5746! can be broken after three handshakes Why is this a concern for TLS? It affects renegotiation TLS does not provide a good channel identifier,! but it can and it should!

Triple Handshake Attack: 1 In the RSA handshake, M can ensure that the master secrets on both connections is the same M re-encrypts C s premaster secret under S s public key Uses same client and server randoms on both handshakes M can also do this with! DHE handshakes It chooses a bad! Diffie-Hellman group Impact: The master secret is not a good channel identifier Breaks: Compound authentication (reenables 2002 attack)! Detailed message traces: https://secure-resumption.com

Triple Handshake Attack: 2 If C resumes its session on a new connection,! M can forward the abbreviated handshake to S Works because master secrets,! ciphersuites, session ID the same Both new connections will! have the same handshake log" and same verify_data On both connections, same! tls-unique=server_verify_data Impact: tls-unique is not a good identifier after resumption Breaks: Channel Binding in SASL (SCRAM, GS2)

Triple Handshake Attack: 3 If C renegotiates with client certificate;! M can forward the renegotiation handshake to S Works because renegotiation! indication is the same RI = client_verify_data +! server_verify_data Impact: Renegotiation Indication! is not a good channel identifier after session resumption Breaks: Renegotiation Indication (reenable s Rex s attack)

Countermeasures For renegotiation, implementation checks will be enough Always validate server certificate during renegotiation Many TLS clients still need to do this For tls-unique, compound auth, no easy fixes Don t rely on tls-unique after resumption Ensure that clients only present user credentials to trusted servers Root problem: Master secrets generated in different TLS security contexts can be the same E.g. master secret does not depend on server certificate If we make the master secret a good session identifier,! tls-unique and renegotiation indication will be fixed for free!

Proposal: Extended Master Secret Compute a session hash for full handshakes session_hash = Hash(handshake_messages) All messages up to and including ClientKeyExchange! (since master_secret will be needed in SSL 3.0 CertificateVerify) Add session hash to master secret derivation: master_secret = PRF(pre_master_secret,! "extended master secret,! session_hash) [0..47]; Extension draft: draft-bhargavan-tls-session-hash-00.txt Alternative proposal: forget compound authentication and just! fix session resumption: Resumption Indication (à la RFC5746)

Questions? More details and research paper at https://secure-resumption.com

3HS Attack step 1 (RSA) Connection 1: Initial RSA Handshake User Client C ClientHello(cr, [RSA, DH],...) ServerCertificate(cert A, pk A ) ClientKeyExchange(rsa(pk A, pms)) ClientCCS ClientFinished(verifydata(ms, log 1 )) ServerFinished(verifydata(ms, log 2)) Attacker Server A ClientHello(cr, [RSA]) ServerHello(sr, sid, RSA, ENC ALG) ServerCertificate(cert S, pk S ) ServerHelloDone ClientKeyExchange(rsa(pk S, pms)) ClientFinished(verifydata(ms, log 1)) ServerCCS ServerFinished(verifydata(ms, log 2 )) Target Server S Cache new session: sid, ms, anon cert A, cr, sr, RSA, ENC ALG AppData Knows: sid, ms, cr, sr AppData Cache new session: sid, ms, anon cert S cr, sr, RSA, ENC ALG

3HS Attack step 1 (DHE) Connection 1: Initial DHE Handshake (Non-Prime Group) User Client C Attacker Server A Target Server S ClientHello(cr, [DHE,...],...) ServerCertificate(cert A, pk A ) ClientHello(cr, [DHE],...) ServerHello(sr, sid, DHE, ENC ALG) ServerCertificate(cert S, pk S ) Picks DH group: (p, g) Generates: (K S,P S = g KS mod p) ServerKeyExchange(sign(sk A, [P S (P S 1),g,P S, cr, sr])) ClientKeyExchange(g KC mod P S (P S 1)) ServerKeyExchange(sign(sk S, [p, g, P S, cr, sr])) ServerHelloDone ClientKeyExchange(g) Computes: pms= P KC S mod P S (P S 1) = P S mod P S (P S 1) = P S ClientCCS ClientFinished(verifydata(ms, log 1 )) ServerFinished(verifydata(ms, log 2)) Knows: sid, pms, cr, sr ClientFinished(verifydata(ms, log 1)) ServerCCS ServerFinished(verifydata(ms, log 2 )) Computes: pms= g KS mod p = P S Cache new session: sid, ms, anon cert A, cr, sr, DHE, ENC ALG AppData Knows: sid, ms, cr, sr AppData Cache new session: sid, ms, anon cert S cr, sr, DHE, ENC ALG

3HS Attack step 2 (resumption) Connection 2: Session Resumption after initial RSA/DHE Handshake User Client C Attacker Server A Target Server S Has session: sid, ms, anon cert A, cr, sr, KEX ALG, ENC ALG ClientHello(cr, sid) ClientCCS ClientFinished(svd = verifydata(ms, log 2 )) Knows: sid, ms, cr, sr ServerHello(sr, sid) ServerCCS ServerFinished(cvd = verifydata(ms, log 1 )) Has session: sid, ms, anon cert S, cr, sr, KEX ALG, ENC ALG New connection: sid, ms, cr, sr, cvd, svd AppData Knows: sid, ms, cr, sr AppData New connection: sid, ms, cr, sr, cvd, svd

3HS Attack step 3 (renegotiation) Connection 2: Renegotiation with Client Authentication after Resumption User Client C Attacker Server A Target Server S Has session: sid, ms, anon cert A, cr, sr, KEX ALG, ENC ALG Knows: sid, ms, cr, sr Has session: sid, ms, anon cert S, cr, sr, KEX ALG, ENC ALG Has connection: sid, ms, cr, sr, cvd, svd Knows: sid, ms, cr, sr Has connection: sid, ms, cr, sr, cvd, svd AppData 1 ClientHello(cr, [KEX ALG ], [ENC ALG ], cvd) ClientCertificate(cert C, pk C ) ClientKeyExchange(kex C ) CertificateVerify(sign(sk C, log 1 )cert C ) ClientCCS ClientFinished(verifydata(ms, log 2 )) AppData 2 ServerHello(sr, sid, KEX ALG, ENC ALG, cvd, svd) ServerCertificate(cert S, pk S ) ServerKeyExchange(sign(sk S, kex S )) CertificateRequest ServerHelloDone ServerCCS ServerFinished(verifydata(ms, log 3 )) Cache new session: sid, ms, cert C cert S, cr, sr, KEX ALG, ENC ALG Knows: cert C Cache new session: sid, ms, cert C cert S cr, sr, KEX ALG, ENC ALG AppData 3 AppData 4 Accepts data stream: AppData1+AppData3 Accepts data stream: AppData2+AppData4