SlideShare a Scribd company logo
1 of 38
Download to read offline
How Secure is TLS?
miTLS: a verified reference implementation
Cédric Fournet
with
Karthikeyan Bhargavan, Antoine Delignat-Lavaud, Markulf Kohlweiss,
Alfredo Pironti, Pierre-Yves Strub, Santiago Zanella Beguelin
https://www.miTLS.org
2015 TLS 1.3?
SChannel, OpenSSL, NSS, GnuTLS, JSSE, PolarSSL
still patched every month! + Snowden allegations
Well-understood, detailed specs
many security theorems…
mostly for small simplified models of TLS
Threat modelSecurity Goal
connect(server,port);
send(d1);
send(d2);
send(d3);
…
accept(port);
d1’ = recv();
d2’ = recv();
d3’ = recv();
…
authentication
infrastructure
Security Goal
X.509 public-key
infrastructure
connect(server,port);
send(d1);
send(d2);
send(d3);
…
accept(port);
d1’ = recv();
d2’ = recv();
d3’ = recv();
…
Client Server
Client Server
Client Server
Client Server
Protocol Logic
e.g. ambiguous messages
• cause clients and server
to negotiate weak sessions
Cryptography
e.g. not enough randomness
• write applet to realize
adaptive attack (BEAST)
Weak Algorithms
MD5, PKCS1, RC4, …
Implementation Bugs
many critical errors
TLS
DESIGN
Many obsolete crypto
constructions
•
•
•
•
•
Countermeasures
Disable these features:
SSL3, compression, RC4
Implement mitigations
very very carefully:
• empty fragment
to initialize IV
for TLS 1.0 AES-CBC
• constant-time mitigation
for Bleichenbacher attacks
• constant-time plaintext
length-hiding HMAC to
prevent Lucky 13
The duplicate goto always branches
to the end of the function with err = 0
The key is not bound to the
server signing-key certificate
Implementation Bugs
many critical errors
thenGnuTLS, Mar’14
thenHeartbleed,
OpenSSL, April’14
thenPoodle, Sep’14
Memory safety
Buffer overruns leak secrets
Missing checks
Forgetting to verify
signature/MAC/certificate
bypasses crypto guarantees
Certificate validation
ASN.1 parsing,
wildcard certificates
State machine bugs
Most TLS implementations
don’t conform to spec
Unexpected transitions break
protocol (badly)
(EarlyCCS, OpenSSL, …)
Implementation Bugs
many critical errors
Test results for OpenSSL:
each arrow is a bug
IEEE Security & Privacy 2015
Protocol Logic
e.g. ambiguous messages
• cause clients and server
to negotiate weak sessions
Cryptography
e.g. not enough randomness
• write applet to realize
adaptive attack (BEAST)
Weak Algorithms
MD5, PKCS1, RC4, …
Implementation Bugs
many critical errors
TLS
DESIGN
Infrastructure
certificate management
Application
HTTPS clients & servers
Infrastructure
certificate management
Application
HTTPS clients & servers
IEEE Security & Privacy 2014
HTTP/1.1 302 Redirect
Location: https://x.com/P
Set-Cookie: SID=[SessionToken]; secure
Content-Length: 0
Many web services rely
on session tokens to
authenticate their users
The secure cookie attribute
tells the client browser that
the cookie is HTTPS-only
Many browsers silently
process truncated
HTTP (e.g. images)
After truncation,
any fake HTTP query leaks
the authentication token
Demo: hijacking
Google & Facebook
user accounts
Browser vulnerable
to truncations?
Header Body (Length) Body (Chunked)
Android 4.2.2 YES YES YES
Chrome 27 YES YES YES
Chrome 28 NO NO YES
Firefox 24 NO YES YES
Safari Mobile 7.0.2 YES YES YES
Opera Mini 7.5 YES YES YES
Opera Classic 12.1 YES YES YES
Internet Explorer 10 NO YES YES
https://www.secure-resumption.com/
Client TLS library
Chromium
Opera 15+
NSS
Internet
Explorer
SChannel
Safari &
Apple mail
Secure
Transport
Apple Mail
Secure
Transport
CURL OpenSSL
CURL GnuTLS
Wget OpenSSL
NodeJS HTTPS OpenSSL
PHP SSL
Transport
OpenSSL
Apache
HttpClient
JSSE 1.7
SVN / Neon OpenSSL
SVN / Neon OpenSSL
Cadaver/Neon OpenSSL
Git / CURL GnuTLS
Protocol Logic
e.g. ambiguous messages
• cause clients and server
to negotiate older weaker TLS
Cryptography
e.g. no fresh IV
• write applet to realize
adaptive attack (BEAST)
Weak Algorithms
MD5, PKCS1, RC4, …
Implementation Bugs
many critical errors
TLS
DESIGN
Infrastructure
certificate management
Application
HTTPS clients & servers
IEEE Security & Privacy 2013
https://www.miTLS.org
TLS negotiates its use of cryptography
Not all algorithms are equal!
Cautionary tale: ECDHE considered safest,
open to attack for 2 years due to bug
in elliptic curve fast multiplication
Clients and servers should get security
for the ciphersuite they prefer,
not the weakest they support
Circular dependency: TLS relies on
the ciphersuites being negotiated
We verify TLS generically,
for multiple ciphersuites & algorithms
This requires new cryptographic models
symmetric
encryption
(AES-CBC)
Cryptographic algorithms
symmetric
encryption
(RC4)
Secure RPC
some
application code
TLS 1.2
Applications & Adversaries
Security protocols
Cryptographic constructions
encrypt
then-MAC
fragment-MAC-
encode-then-encrypt
some
attack
some
attack
some
attack
message
authentication
(SHA1)
INT-CMA IND-CPA
authenticated encryption
secure channel
TLS.fs7
TLS.fs
TLS.fsi
Type
(F7)
Prove
(Z3)
Compile
(F#)
Erase
types
Handshake.fs7
Record.fs7
Modular Type-checking
Modules for miTLS
TLS.fs7
TLS.fs
TLS.fsi
Type
(F7)
Prove
(Z3)
Compile
(F#)
Erase
types
Handshake.fs7
Record.fs7
KEM
DHGroup
DH
KEF
KDF/
MAC
RSA
Cert
Sig
SessionDB StAE
LHAE
Enc
MAC
Record
Dispatch
TCP
Untyped Adversary
Encode
LHAEPlain
StPlain
TLSFragmentAlert
Datastream
Handshake (and CCS)
TLSInfoTLSConstants
Handshake/CCS
TLS
Record
AppData
Base Bytes
Untyped API
Adversary
RPC
RPCPlain
Application
TLS API
Alert
Protocol
AppData
Protocol
Nonce
TLS
CoreCrypto
RSAKey
Auth
AuthPlain
Extensions
1
2
3 4 5
6 7
Range
8
9
Error
type connection // for each local instance of the protocol
// creating new client and server instances
val connect: TcpStream -> params -> (;Client) nullconnection Result
val accept: TcpStream -> params -> (;Server) nullconnection Result
// triggering new handshakes, and closing connections
val rehandshake: c:connection{Role(c)=Client} connection Result
val request: c:connection{Role(c)=Server} connection Result
val shutdown: c:connection TcpStream Result
// writing data
type (;c:connection,data:(;c) msg_o) ioresult_o =
| WriteComplete of c':connection
| WritePartial of c':connection * rest:(;c') msg_o
| MustRead of c':connection
val write: c:connection -> data:(;c) msg_o -> (;c,data) ioresult_o
// reading data
type (;c:connection) ioresult_i =
| Read of c':connection * data:(;c) msg_i
| CertQuery of c':connection
| Handshake of c':connection
| Close of TcpStream
| Warning of c':connection * a:alertDescription
| Fatal of a:alertDescription
val read : c:connection -> (;c) ioresult_i
concrete TLS & ideal TLS
are computationally
indistinguishable
miTLS
implementation
miTLS typed API
Bytes, Network
lib.fs
Cryptographic Provider
cryptographic assumptions
any program
representing the
adversary
application
data stream
miTLS ideal
implementation
miTLS typed API
application
Safe, except for a
negligible probability
Safe by typing
(info-theoretically)
7,000 lines of F#
checked against
3,000 lines of F7
type annotations
+
3,000 lines of EasyCrypt
for the core key exchange
miTLS
implementation
miTLS typed API
Bytes, Network
lib.fs
Cryptographic Provider
cryptographic assumptions
any program
representing the
adversary
application
data stream
miTLS ideal
implementation
miTLS typed API
application
reference code vs
production code
Sufficient for simple applications.
We miss system engineering:
custom memory manager,
crypto hardware acceleration,
low-level countermeasures…
We are considering building
a lower-level, lightweight,
verified implementation of TLS
305 292
419
20 57 45
miTLS OpenSSL JSSE
Handshake (Sessions/S)
RSA
DHE
0
50
100
150
200
250
Transport
Layer (MB/S)
RC4-MD5
RC4-SHA
3DES-SHA
AES128-SHA
AES128-SHA256
AES256-SHA
AES256-SHA256
We account for some side-channels, not for timing
1. verification tools: F7, Z3, EasyCrypt
now: mechanized theory using Coq/SSReflect
next: certified F* tools and SMT solver
2. cryptographic assumptions
now: concrete reductions using Easycrypt
next: mechanized proofs using relational probabilistic logic
3. the F# compiler and runtime: Windows and .NET
next: minimal TCB running e.g. on isolated core (SGX)
4. core cryptographic providers
next: correctness for selected algorithms (elliptic curves)
http://www.mitls.org
fournet@microsoft.com
How (un)secure is SSL/TLS?

More Related Content

What's hot

Transport Layer Security
Transport Layer SecurityTransport Layer Security
Transport Layer SecurityHuda Seyam
 
Introduction to Secure Sockets Layer
Introduction to Secure Sockets LayerIntroduction to Secure Sockets Layer
Introduction to Secure Sockets LayerNascenia IT
 
The Fundamental of Secure Socket Layer (SSL)
The Fundamental of Secure Socket Layer (SSL)The Fundamental of Secure Socket Layer (SSL)
The Fundamental of Secure Socket Layer (SSL)Vishal Kumar
 
Ssl (Secure Sockets Layer)
Ssl (Secure Sockets Layer)Ssl (Secure Sockets Layer)
Ssl (Secure Sockets Layer)Asad Ali
 
TLS/SSL Protocol Design 201006
TLS/SSL Protocol Design 201006TLS/SSL Protocol Design 201006
TLS/SSL Protocol Design 201006Nate Lawson
 
Message authentication and hash function
Message authentication and hash functionMessage authentication and hash function
Message authentication and hash functionomarShiekh1
 
secure socket layer
secure socket layersecure socket layer
secure socket layerAmar Shah
 
Transport Layer Security
Transport Layer SecurityTransport Layer Security
Transport Layer SecurityChhatra Thapa
 
What is SSL ? The Secure Sockets Layer (SSL) Protocol
What is SSL ? The Secure Sockets Layer (SSL) ProtocolWhat is SSL ? The Secure Sockets Layer (SSL) Protocol
What is SSL ? The Secure Sockets Layer (SSL) ProtocolMohammed Adam
 
PPT ON WEB SECURITY BY MONODIP SINGHA ROY
PPT ON WEB SECURITY BY MONODIP SINGHA ROYPPT ON WEB SECURITY BY MONODIP SINGHA ROY
PPT ON WEB SECURITY BY MONODIP SINGHA ROYMonodip Singha Roy
 
SSL Secure Socket Layer
SSL Secure Socket LayerSSL Secure Socket Layer
SSL Secure Socket Layeromkar bhagat
 
TLS/SSL Internet Security Talk
TLS/SSL Internet Security TalkTLS/SSL Internet Security Talk
TLS/SSL Internet Security TalkNisheed KM
 
Webinar SSL English
Webinar SSL EnglishWebinar SSL English
Webinar SSL EnglishSSL247®
 

What's hot (20)

Transport layer security
Transport layer securityTransport layer security
Transport layer security
 
Transport Layer Security
Transport Layer SecurityTransport Layer Security
Transport Layer Security
 
Introduction to Secure Sockets Layer
Introduction to Secure Sockets LayerIntroduction to Secure Sockets Layer
Introduction to Secure Sockets Layer
 
The Fundamental of Secure Socket Layer (SSL)
The Fundamental of Secure Socket Layer (SSL)The Fundamental of Secure Socket Layer (SSL)
The Fundamental of Secure Socket Layer (SSL)
 
Ssl (Secure Sockets Layer)
Ssl (Secure Sockets Layer)Ssl (Secure Sockets Layer)
Ssl (Secure Sockets Layer)
 
TLS/SSL Protocol Design 201006
TLS/SSL Protocol Design 201006TLS/SSL Protocol Design 201006
TLS/SSL Protocol Design 201006
 
Message authentication and hash function
Message authentication and hash functionMessage authentication and hash function
Message authentication and hash function
 
secure socket layer
secure socket layersecure socket layer
secure socket layer
 
Transport Layer Security
Transport Layer SecurityTransport Layer Security
Transport Layer Security
 
Secure Socket Layer
Secure Socket LayerSecure Socket Layer
Secure Socket Layer
 
SSL/TLS
SSL/TLSSSL/TLS
SSL/TLS
 
SSL/TLS Handshake
SSL/TLS HandshakeSSL/TLS Handshake
SSL/TLS Handshake
 
What is SSL ? The Secure Sockets Layer (SSL) Protocol
What is SSL ? The Secure Sockets Layer (SSL) ProtocolWhat is SSL ? The Secure Sockets Layer (SSL) Protocol
What is SSL ? The Secure Sockets Layer (SSL) Protocol
 
SSL TLS Protocol
SSL TLS ProtocolSSL TLS Protocol
SSL TLS Protocol
 
SSL/TLS
SSL/TLSSSL/TLS
SSL/TLS
 
PPT ON WEB SECURITY BY MONODIP SINGHA ROY
PPT ON WEB SECURITY BY MONODIP SINGHA ROYPPT ON WEB SECURITY BY MONODIP SINGHA ROY
PPT ON WEB SECURITY BY MONODIP SINGHA ROY
 
CRYPTOGRAPHY AND NETWORK SECURITY- Transport-level Security
CRYPTOGRAPHY AND NETWORK SECURITY- Transport-level SecurityCRYPTOGRAPHY AND NETWORK SECURITY- Transport-level Security
CRYPTOGRAPHY AND NETWORK SECURITY- Transport-level Security
 
SSL Secure Socket Layer
SSL Secure Socket LayerSSL Secure Socket Layer
SSL Secure Socket Layer
 
TLS/SSL Internet Security Talk
TLS/SSL Internet Security TalkTLS/SSL Internet Security Talk
TLS/SSL Internet Security Talk
 
Webinar SSL English
Webinar SSL EnglishWebinar SSL English
Webinar SSL English
 

Similar to How (un)secure is SSL/TLS?

OpenSSL Basic Function Call Flow
OpenSSL Basic Function Call FlowOpenSSL Basic Function Call Flow
OpenSSL Basic Function Call FlowWilliam Lee
 
WebSockets Everywhere: the Future Transport Protocol for Everything (Almost)
WebSockets Everywhere: the Future Transport Protocol for Everything (Almost)WebSockets Everywhere: the Future Transport Protocol for Everything (Almost)
WebSockets Everywhere: the Future Transport Protocol for Everything (Almost)Ericom Software
 
Network programming in Java
Network programming in JavaNetwork programming in Java
Network programming in JavaTushar B Kute
 
Socket Programming - nitish nagar
Socket Programming - nitish nagarSocket Programming - nitish nagar
Socket Programming - nitish nagarNitish Nagar
 
Network Programming in Java
Network Programming in JavaNetwork Programming in Java
Network Programming in JavaTushar B Kute
 
Network programming in Java
Network programming in JavaNetwork programming in Java
Network programming in JavaTushar B Kute
 
Networking and Go: An Engineer's Journey (Strangeloop 2019)
Networking and Go: An Engineer's Journey (Strangeloop 2019)Networking and Go: An Engineer's Journey (Strangeloop 2019)
Networking and Go: An Engineer's Journey (Strangeloop 2019)Sneha Inguva
 
SECURE SOCKET LAYER ( WEB SECURITY )
SECURE SOCKET LAYER ( WEB SECURITY )SECURE SOCKET LAYER ( WEB SECURITY )
SECURE SOCKET LAYER ( WEB SECURITY )Monodip Singha Roy
 
OpenSSL programming (still somewhat initial version)
OpenSSL programming (still somewhat initial version)OpenSSL programming (still somewhat initial version)
OpenSSL programming (still somewhat initial version)Shteryana Shopova
 
Application Layer and Socket Programming
Application Layer and Socket ProgrammingApplication Layer and Socket Programming
Application Layer and Socket Programmingelliando dias
 
Web Real-time Communications
Web Real-time CommunicationsWeb Real-time Communications
Web Real-time CommunicationsAlexei Skachykhin
 
DIY Internet: Snappy, Secure Networking with MinimaLT (JSConf EU 2013)
DIY Internet: Snappy, Secure Networking with MinimaLT (JSConf EU 2013)DIY Internet: Snappy, Secure Networking with MinimaLT (JSConf EU 2013)
DIY Internet: Snappy, Secure Networking with MinimaLT (JSConf EU 2013)Igalia
 

Similar to How (un)secure is SSL/TLS? (20)

Sockets
SocketsSockets
Sockets
 
OpenSSL Basic Function Call Flow
OpenSSL Basic Function Call FlowOpenSSL Basic Function Call Flow
OpenSSL Basic Function Call Flow
 
WebSockets Everywhere: the Future Transport Protocol for Everything (Almost)
WebSockets Everywhere: the Future Transport Protocol for Everything (Almost)WebSockets Everywhere: the Future Transport Protocol for Everything (Almost)
WebSockets Everywhere: the Future Transport Protocol for Everything (Almost)
 
SSL
SSLSSL
SSL
 
Network programming in Java
Network programming in JavaNetwork programming in Java
Network programming in Java
 
Transport Layer Security
Transport Layer SecurityTransport Layer Security
Transport Layer Security
 
Socket Programming - nitish nagar
Socket Programming - nitish nagarSocket Programming - nitish nagar
Socket Programming - nitish nagar
 
Network Programming in Java
Network Programming in JavaNetwork Programming in Java
Network Programming in Java
 
Unit 8 Java
Unit 8 JavaUnit 8 Java
Unit 8 Java
 
Network programming in Java
Network programming in JavaNetwork programming in Java
Network programming in Java
 
Networking and Go: An Engineer's Journey (Strangeloop 2019)
Networking and Go: An Engineer's Journey (Strangeloop 2019)Networking and Go: An Engineer's Journey (Strangeloop 2019)
Networking and Go: An Engineer's Journey (Strangeloop 2019)
 
SECURE SOCKET LAYER ( WEB SECURITY )
SECURE SOCKET LAYER ( WEB SECURITY )SECURE SOCKET LAYER ( WEB SECURITY )
SECURE SOCKET LAYER ( WEB SECURITY )
 
OpenSSL programming (still somewhat initial version)
OpenSSL programming (still somewhat initial version)OpenSSL programming (still somewhat initial version)
OpenSSL programming (still somewhat initial version)
 
Ssl and tls
Ssl and tlsSsl and tls
Ssl and tls
 
Application Layer and Socket Programming
Application Layer and Socket ProgrammingApplication Layer and Socket Programming
Application Layer and Socket Programming
 
What is TLS/SSL?
What is TLS/SSL? What is TLS/SSL?
What is TLS/SSL?
 
Networking in Java
Networking in JavaNetworking in Java
Networking in Java
 
Web Real-time Communications
Web Real-time CommunicationsWeb Real-time Communications
Web Real-time Communications
 
DIY Internet: Snappy, Secure Networking with MinimaLT (JSConf EU 2013)
DIY Internet: Snappy, Secure Networking with MinimaLT (JSConf EU 2013)DIY Internet: Snappy, Secure Networking with MinimaLT (JSConf EU 2013)
DIY Internet: Snappy, Secure Networking with MinimaLT (JSConf EU 2013)
 
tor
tortor
tor
 

More from Microsoft

Uwp + Xamarin : Du nouveau en terre du milieu
Uwp + Xamarin : Du nouveau en terre du milieuUwp + Xamarin : Du nouveau en terre du milieu
Uwp + Xamarin : Du nouveau en terre du milieuMicrosoft
 
La Blockchain pas à PaaS
La Blockchain pas à PaaSLa Blockchain pas à PaaS
La Blockchain pas à PaaSMicrosoft
 
Tester, Monitorer et Déployer son application mobile
Tester, Monitorer et Déployer son application mobileTester, Monitorer et Déployer son application mobile
Tester, Monitorer et Déployer son application mobileMicrosoft
 
Windows 10, un an après – Nouveautés & Démo
Windows 10, un an après – Nouveautés & Démo Windows 10, un an après – Nouveautés & Démo
Windows 10, un an après – Nouveautés & Démo Microsoft
 
Prenez votre pied avec les bots et cognitive services.
Prenez votre pied avec les bots et cognitive services.Prenez votre pied avec les bots et cognitive services.
Prenez votre pied avec les bots et cognitive services.Microsoft
 
Office 365 Dev PnP & PowerShell : exploitez enfin le potentiel de votre écosy...
Office 365 Dev PnP & PowerShell : exploitez enfin le potentiel de votre écosy...Office 365 Dev PnP & PowerShell : exploitez enfin le potentiel de votre écosy...
Office 365 Dev PnP & PowerShell : exploitez enfin le potentiel de votre écosy...Microsoft
 
Créer un bot de A à Z
Créer un bot de A à ZCréer un bot de A à Z
Créer un bot de A à ZMicrosoft
 
Microsoft Composition, pierre angulaire de vos applications ?
Microsoft Composition, pierre angulaire de vos applications ?Microsoft Composition, pierre angulaire de vos applications ?
Microsoft Composition, pierre angulaire de vos applications ?Microsoft
 
Les nouveautés SQL Server 2016
Les nouveautés SQL Server 2016Les nouveautés SQL Server 2016
Les nouveautés SQL Server 2016Microsoft
 
Conteneurs Linux ou Windows : quelles approches pour des IT agiles ?
Conteneurs Linux ou Windows : quelles approches pour des IT agiles ?Conteneurs Linux ou Windows : quelles approches pour des IT agiles ?
Conteneurs Linux ou Windows : quelles approches pour des IT agiles ?Microsoft
 
Administration et supervision depuis le Cloud avec Azure Logs Analytics
Administration et supervision depuis le Cloud avec Azure Logs AnalyticsAdministration et supervision depuis le Cloud avec Azure Logs Analytics
Administration et supervision depuis le Cloud avec Azure Logs AnalyticsMicrosoft
 
Retour d'expérience de projets Azure IoT "large scale" (MicroServices, portag...
Retour d'expérience de projets Azure IoT "large scale" (MicroServices, portag...Retour d'expérience de projets Azure IoT "large scale" (MicroServices, portag...
Retour d'expérience de projets Azure IoT "large scale" (MicroServices, portag...Microsoft
 
Plan de Reprise d'Activité avec Azure Site Recovery
Plan de Reprise d'Activité avec Azure Site RecoveryPlan de Reprise d'Activité avec Azure Site Recovery
Plan de Reprise d'Activité avec Azure Site RecoveryMicrosoft
 
Modélisation, déploiement et gestion des infrastructures Cloud : outils et bo...
Modélisation, déploiement et gestion des infrastructures Cloud : outils et bo...Modélisation, déploiement et gestion des infrastructures Cloud : outils et bo...
Modélisation, déploiement et gestion des infrastructures Cloud : outils et bo...Microsoft
 
Transformation de la représentation : De la VR à la RA, aller & retour.
Transformation de la représentation : De la VR à la RA, aller & retour.Transformation de la représentation : De la VR à la RA, aller & retour.
Transformation de la représentation : De la VR à la RA, aller & retour.Microsoft
 
Quelles architectures pour vos applications Cloud, de la VM au conteneur : ça...
Quelles architectures pour vos applications Cloud, de la VM au conteneur : ça...Quelles architectures pour vos applications Cloud, de la VM au conteneur : ça...
Quelles architectures pour vos applications Cloud, de la VM au conteneur : ça...Microsoft
 
Introduction à ASP.NET Core
Introduction à ASP.NET CoreIntroduction à ASP.NET Core
Introduction à ASP.NET CoreMicrosoft
 
Open Source et Microsoft Azure, rêve ou réalité ?
Open Source et Microsoft Azure, rêve ou réalité ?Open Source et Microsoft Azure, rêve ou réalité ?
Open Source et Microsoft Azure, rêve ou réalité ?Microsoft
 
Comment développer sur la console Xbox One avec une application Universal Win...
Comment développer sur la console Xbox One avec une application Universal Win...Comment développer sur la console Xbox One avec une application Universal Win...
Comment développer sur la console Xbox One avec une application Universal Win...Microsoft
 
Azure Service Fabric pour les développeurs
Azure Service Fabric pour les développeursAzure Service Fabric pour les développeurs
Azure Service Fabric pour les développeursMicrosoft
 

More from Microsoft (20)

Uwp + Xamarin : Du nouveau en terre du milieu
Uwp + Xamarin : Du nouveau en terre du milieuUwp + Xamarin : Du nouveau en terre du milieu
Uwp + Xamarin : Du nouveau en terre du milieu
 
La Blockchain pas à PaaS
La Blockchain pas à PaaSLa Blockchain pas à PaaS
La Blockchain pas à PaaS
 
Tester, Monitorer et Déployer son application mobile
Tester, Monitorer et Déployer son application mobileTester, Monitorer et Déployer son application mobile
Tester, Monitorer et Déployer son application mobile
 
Windows 10, un an après – Nouveautés & Démo
Windows 10, un an après – Nouveautés & Démo Windows 10, un an après – Nouveautés & Démo
Windows 10, un an après – Nouveautés & Démo
 
Prenez votre pied avec les bots et cognitive services.
Prenez votre pied avec les bots et cognitive services.Prenez votre pied avec les bots et cognitive services.
Prenez votre pied avec les bots et cognitive services.
 
Office 365 Dev PnP & PowerShell : exploitez enfin le potentiel de votre écosy...
Office 365 Dev PnP & PowerShell : exploitez enfin le potentiel de votre écosy...Office 365 Dev PnP & PowerShell : exploitez enfin le potentiel de votre écosy...
Office 365 Dev PnP & PowerShell : exploitez enfin le potentiel de votre écosy...
 
Créer un bot de A à Z
Créer un bot de A à ZCréer un bot de A à Z
Créer un bot de A à Z
 
Microsoft Composition, pierre angulaire de vos applications ?
Microsoft Composition, pierre angulaire de vos applications ?Microsoft Composition, pierre angulaire de vos applications ?
Microsoft Composition, pierre angulaire de vos applications ?
 
Les nouveautés SQL Server 2016
Les nouveautés SQL Server 2016Les nouveautés SQL Server 2016
Les nouveautés SQL Server 2016
 
Conteneurs Linux ou Windows : quelles approches pour des IT agiles ?
Conteneurs Linux ou Windows : quelles approches pour des IT agiles ?Conteneurs Linux ou Windows : quelles approches pour des IT agiles ?
Conteneurs Linux ou Windows : quelles approches pour des IT agiles ?
 
Administration et supervision depuis le Cloud avec Azure Logs Analytics
Administration et supervision depuis le Cloud avec Azure Logs AnalyticsAdministration et supervision depuis le Cloud avec Azure Logs Analytics
Administration et supervision depuis le Cloud avec Azure Logs Analytics
 
Retour d'expérience de projets Azure IoT "large scale" (MicroServices, portag...
Retour d'expérience de projets Azure IoT "large scale" (MicroServices, portag...Retour d'expérience de projets Azure IoT "large scale" (MicroServices, portag...
Retour d'expérience de projets Azure IoT "large scale" (MicroServices, portag...
 
Plan de Reprise d'Activité avec Azure Site Recovery
Plan de Reprise d'Activité avec Azure Site RecoveryPlan de Reprise d'Activité avec Azure Site Recovery
Plan de Reprise d'Activité avec Azure Site Recovery
 
Modélisation, déploiement et gestion des infrastructures Cloud : outils et bo...
Modélisation, déploiement et gestion des infrastructures Cloud : outils et bo...Modélisation, déploiement et gestion des infrastructures Cloud : outils et bo...
Modélisation, déploiement et gestion des infrastructures Cloud : outils et bo...
 
Transformation de la représentation : De la VR à la RA, aller & retour.
Transformation de la représentation : De la VR à la RA, aller & retour.Transformation de la représentation : De la VR à la RA, aller & retour.
Transformation de la représentation : De la VR à la RA, aller & retour.
 
Quelles architectures pour vos applications Cloud, de la VM au conteneur : ça...
Quelles architectures pour vos applications Cloud, de la VM au conteneur : ça...Quelles architectures pour vos applications Cloud, de la VM au conteneur : ça...
Quelles architectures pour vos applications Cloud, de la VM au conteneur : ça...
 
Introduction à ASP.NET Core
Introduction à ASP.NET CoreIntroduction à ASP.NET Core
Introduction à ASP.NET Core
 
Open Source et Microsoft Azure, rêve ou réalité ?
Open Source et Microsoft Azure, rêve ou réalité ?Open Source et Microsoft Azure, rêve ou réalité ?
Open Source et Microsoft Azure, rêve ou réalité ?
 
Comment développer sur la console Xbox One avec une application Universal Win...
Comment développer sur la console Xbox One avec une application Universal Win...Comment développer sur la console Xbox One avec une application Universal Win...
Comment développer sur la console Xbox One avec une application Universal Win...
 
Azure Service Fabric pour les développeurs
Azure Service Fabric pour les développeursAzure Service Fabric pour les développeurs
Azure Service Fabric pour les développeurs
 

Recently uploaded

2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 

Recently uploaded (20)

2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 

How (un)secure is SSL/TLS?

  • 1. How Secure is TLS? miTLS: a verified reference implementation Cédric Fournet with Karthikeyan Bhargavan, Antoine Delignat-Lavaud, Markulf Kohlweiss, Alfredo Pironti, Pierre-Yves Strub, Santiago Zanella Beguelin https://www.miTLS.org
  • 2. 2015 TLS 1.3? SChannel, OpenSSL, NSS, GnuTLS, JSSE, PolarSSL still patched every month! + Snowden allegations Well-understood, detailed specs many security theorems… mostly for small simplified models of TLS
  • 3. Threat modelSecurity Goal connect(server,port); send(d1); send(d2); send(d3); … accept(port); d1’ = recv(); d2’ = recv(); d3’ = recv(); … authentication infrastructure
  • 9.
  • 10. Protocol Logic e.g. ambiguous messages • cause clients and server to negotiate weak sessions Cryptography e.g. not enough randomness • write applet to realize adaptive attack (BEAST) Weak Algorithms MD5, PKCS1, RC4, … Implementation Bugs many critical errors TLS DESIGN
  • 11. Many obsolete crypto constructions • • • • • Countermeasures Disable these features: SSL3, compression, RC4 Implement mitigations very very carefully: • empty fragment to initialize IV for TLS 1.0 AES-CBC • constant-time mitigation for Bleichenbacher attacks • constant-time plaintext length-hiding HMAC to prevent Lucky 13
  • 12. The duplicate goto always branches to the end of the function with err = 0 The key is not bound to the server signing-key certificate Implementation Bugs many critical errors thenGnuTLS, Mar’14 thenHeartbleed, OpenSSL, April’14 thenPoodle, Sep’14
  • 13. Memory safety Buffer overruns leak secrets Missing checks Forgetting to verify signature/MAC/certificate bypasses crypto guarantees Certificate validation ASN.1 parsing, wildcard certificates State machine bugs Most TLS implementations don’t conform to spec Unexpected transitions break protocol (badly) (EarlyCCS, OpenSSL, …)
  • 14. Implementation Bugs many critical errors Test results for OpenSSL: each arrow is a bug IEEE Security & Privacy 2015
  • 15. Protocol Logic e.g. ambiguous messages • cause clients and server to negotiate weak sessions Cryptography e.g. not enough randomness • write applet to realize adaptive attack (BEAST) Weak Algorithms MD5, PKCS1, RC4, … Implementation Bugs many critical errors TLS DESIGN Infrastructure certificate management Application HTTPS clients & servers
  • 17. Application HTTPS clients & servers IEEE Security & Privacy 2014
  • 18. HTTP/1.1 302 Redirect Location: https://x.com/P Set-Cookie: SID=[SessionToken]; secure Content-Length: 0 Many web services rely on session tokens to authenticate their users The secure cookie attribute tells the client browser that the cookie is HTTPS-only Many browsers silently process truncated HTTP (e.g. images) After truncation, any fake HTTP query leaks the authentication token Demo: hijacking Google & Facebook user accounts Browser vulnerable to truncations? Header Body (Length) Body (Chunked) Android 4.2.2 YES YES YES Chrome 27 YES YES YES Chrome 28 NO NO YES Firefox 24 NO YES YES Safari Mobile 7.0.2 YES YES YES Opera Mini 7.5 YES YES YES Opera Classic 12.1 YES YES YES Internet Explorer 10 NO YES YES
  • 20. Client TLS library Chromium Opera 15+ NSS Internet Explorer SChannel Safari & Apple mail Secure Transport Apple Mail Secure Transport CURL OpenSSL CURL GnuTLS Wget OpenSSL NodeJS HTTPS OpenSSL PHP SSL Transport OpenSSL Apache HttpClient JSSE 1.7 SVN / Neon OpenSSL SVN / Neon OpenSSL Cadaver/Neon OpenSSL Git / CURL GnuTLS
  • 21.
  • 22. Protocol Logic e.g. ambiguous messages • cause clients and server to negotiate older weaker TLS Cryptography e.g. no fresh IV • write applet to realize adaptive attack (BEAST) Weak Algorithms MD5, PKCS1, RC4, … Implementation Bugs many critical errors TLS DESIGN Infrastructure certificate management Application HTTPS clients & servers
  • 23.
  • 24. IEEE Security & Privacy 2013
  • 26. TLS negotiates its use of cryptography Not all algorithms are equal! Cautionary tale: ECDHE considered safest, open to attack for 2 years due to bug in elliptic curve fast multiplication Clients and servers should get security for the ciphersuite they prefer, not the weakest they support Circular dependency: TLS relies on the ciphersuites being negotiated We verify TLS generically, for multiple ciphersuites & algorithms This requires new cryptographic models
  • 27. symmetric encryption (AES-CBC) Cryptographic algorithms symmetric encryption (RC4) Secure RPC some application code TLS 1.2 Applications & Adversaries Security protocols Cryptographic constructions encrypt then-MAC fragment-MAC- encode-then-encrypt some attack some attack some attack message authentication (SHA1) INT-CMA IND-CPA authenticated encryption secure channel
  • 29. Modules for miTLS TLS.fs7 TLS.fs TLS.fsi Type (F7) Prove (Z3) Compile (F#) Erase types Handshake.fs7 Record.fs7 KEM DHGroup DH KEF KDF/ MAC RSA Cert Sig SessionDB StAE LHAE Enc MAC Record Dispatch TCP Untyped Adversary Encode LHAEPlain StPlain TLSFragmentAlert Datastream Handshake (and CCS) TLSInfoTLSConstants Handshake/CCS TLS Record AppData Base Bytes Untyped API Adversary RPC RPCPlain Application TLS API Alert Protocol AppData Protocol Nonce TLS CoreCrypto RSAKey Auth AuthPlain Extensions 1 2 3 4 5 6 7 Range 8 9 Error
  • 30.
  • 31.
  • 32. type connection // for each local instance of the protocol // creating new client and server instances val connect: TcpStream -> params -> (;Client) nullconnection Result val accept: TcpStream -> params -> (;Server) nullconnection Result // triggering new handshakes, and closing connections val rehandshake: c:connection{Role(c)=Client} connection Result val request: c:connection{Role(c)=Server} connection Result val shutdown: c:connection TcpStream Result // writing data type (;c:connection,data:(;c) msg_o) ioresult_o = | WriteComplete of c':connection | WritePartial of c':connection * rest:(;c') msg_o | MustRead of c':connection val write: c:connection -> data:(;c) msg_o -> (;c,data) ioresult_o // reading data type (;c:connection) ioresult_i = | Read of c':connection * data:(;c) msg_i | CertQuery of c':connection | Handshake of c':connection | Close of TcpStream | Warning of c':connection * a:alertDescription | Fatal of a:alertDescription val read : c:connection -> (;c) ioresult_i
  • 33. concrete TLS & ideal TLS are computationally indistinguishable miTLS implementation miTLS typed API Bytes, Network lib.fs Cryptographic Provider cryptographic assumptions any program representing the adversary application data stream miTLS ideal implementation miTLS typed API application Safe, except for a negligible probability Safe by typing (info-theoretically)
  • 34. 7,000 lines of F# checked against 3,000 lines of F7 type annotations + 3,000 lines of EasyCrypt for the core key exchange miTLS implementation miTLS typed API Bytes, Network lib.fs Cryptographic Provider cryptographic assumptions any program representing the adversary application data stream miTLS ideal implementation miTLS typed API application
  • 35. reference code vs production code Sufficient for simple applications. We miss system engineering: custom memory manager, crypto hardware acceleration, low-level countermeasures… We are considering building a lower-level, lightweight, verified implementation of TLS 305 292 419 20 57 45 miTLS OpenSSL JSSE Handshake (Sessions/S) RSA DHE 0 50 100 150 200 250 Transport Layer (MB/S) RC4-MD5 RC4-SHA 3DES-SHA AES128-SHA AES128-SHA256 AES256-SHA AES256-SHA256
  • 36. We account for some side-channels, not for timing 1. verification tools: F7, Z3, EasyCrypt now: mechanized theory using Coq/SSReflect next: certified F* tools and SMT solver 2. cryptographic assumptions now: concrete reductions using Easycrypt next: mechanized proofs using relational probabilistic logic 3. the F# compiler and runtime: Windows and .NET next: minimal TCB running e.g. on isolated core (SGX) 4. core cryptographic providers next: correctness for selected algorithms (elliptic curves)