Einführung in SSL mit Wireshark



Similar documents
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.

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

3.2: Transport Layer: SSL/TLS Secure Socket Layer (SSL) Transport Layer Security (TLS) Protocol

Web Security Considerations

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

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

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

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

Lab Exercise SSL/TLS. Objective. Requirements. Step 1: Capture a Trace

Transport Level Security

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

Chapter 17. Transport-Level Security

Communication Security for Applications

Communication Systems SSL

Chapter 7 Transport-Level Security

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

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

Secure Sockets Layer

Network Security Essentials Chapter 5

, ) I Transport Layer Security

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

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

Transport Layer Security Protocols

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

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

Web Security (SSL) Tecniche di Sicurezza dei Sistemi 1

CSC Network Security

CSC 474 Information Systems Security

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

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

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

SSL Secure Socket Layer

Information Security

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

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

Security Protocols/Standards

Overview SSL/TLS HTTPS SSH. TLS Protocol Architecture TLS Handshake Protocol TLS Record Protocol. SSH Protocol Architecture SSH Transport Protocol

Lab 7. Answer. Figure 1

Network Security Part II: Standards

SSL Secure Socket Layer

CS 356 Lecture 27 Internet Security Protocols. Spring 2013

Secure Socket Layer. Security Threat Classifications

SECURE SOCKETS LAYER (SSL)

As enterprises conduct more and more

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

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

The Secure Sockets Layer (SSL)

Chapter 10. Network Security

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

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

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

Three attacks in SSL protocol and their solutions

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

SSL: Secure Socket Layer

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

Authentication applications Kerberos X.509 Authentication services E mail security IP security Web security

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

Secure Shell SSH provides support for secure remote login, secure file transfer, and secure TCP/IP and X11 forwarding. It can automatically encrypt,

Spirent Abacus. SIP over TLS Test 编 号 版 本 修 改 时 间 说 明

Overview. SSL Cryptography Overview CHAPTER 1

OpenADR 2.0 Security. Jim Zuber, CTO QualityLogic, Inc.

Implementing SSL Security on a PowerExchange Network

Learning Network Security with SSL The OpenSSL Way

Interested in learning more about security? SSL/TLS: What's Under the Hood. Copyright SANS Institute Author Retains Full Rights

Outline. INF3510 Information Security. Lecture 10: Communications Security. Communication Security Analogy. Network Security Concepts

Authenticity of Public Keys

Lecture 10: Communications Security

Network Security [2] Plain text Encryption algorithm Public and private key pair Cipher text Decryption algorithm. See next slide

SSL A discussion of the Secure Socket Layer

Chapter 51 Secure Sockets Layer (SSL)

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

Bit Chat: A Peer-to-Peer Instant Messenger

TLS and SRTP for Skype Connect. Technical Datasheet

[SMO-SFO-ICO-PE-046-GU-

Chapter 34 Secure Sockets Layer (SSL)

Whitepaper : Using Unsniff Network Analyzer to analyze SSL / TLS

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

Lecture 4: Transport Layer Security (secure Socket Layer)

Using BroadSAFE TM Technology 07/18/05

Security vulnerabilities in the Internet and possible solutions

, SNMP, Securing the Web: SSL

7 Network Security. 7.1 Introduction 7.2 Improving the Security 7.3 Internet Security Framework. 7.5 Absolute Security?

Chapter 27 Secure Sockets Layer (SSL)

FL EDI SECURE FTP CONNECTIVITY TROUBLESHOOTING GUIDE. SSL/FTP (File Transfer Protocol over Secure Sockets Layer)

Protocol Rollback and Network Security

Encrypted Connections

Network Security Protocols

SSL and TLS. An Overview of A Secure Communications Protocol. Simon Horman aka Horms. horms@valinux.co.jp horms@verge.net.au horms@debian.

Scan Report Executive Summary. Part 2. Component Compliance Summary IP Address :

Security Policy Revision Date: 23 April 2009

WXOS 5.5 SSL Optimization Implementation Guide for Configuration and Basic Troubleshooting

Computer and Network Security

Insecure network services. Firewalls. Two separable topics. Packet filtering. Example: blocking forgeries. Example: blocking outgoing mail

tcpcrypt Andrea Bittau, Dan Boneh, Mike Hamburg, Mark Handley, David Mazières, Quinn Slack Stanford, UCL

Domino and Internet. Security. IBM Collaboration Solutions. Ask the Experts 12/16/2014

Overview of CSS SSL. SSL Cryptography Overview CHAPTER

Configuring SSL Termination

Other VPNs TLS/SSL, PPTP, L2TP. Advanced Computer Networks SS2005 Jürgen Häuselhofer

Transcription:

Einführung in SSL mit Wireshark Chemnitzer Linux-Tage 16. März 2014 Martin Kaiser

What? SSL/TLS is the most widely used security protocol on the Internet there's lots of parameters, options, extensions that make it difficult to understand SSL/TLS create simple test scenarios to get started Wireshark can help analyze and understand SSL/TLS in some cases, it's possible to decrypt captured traffic

Overview purpose of TLS record layer handshake test setup Wireshark and TLS decrypting TLS traffic with Wireshark

About me writing embedded software for Digital TVs involved in creating the CI+ Pay-TV standard Wireshark Core Developer http://www.kaiser.cx

TLS Transport Layer Security successor of SSL TLS 1.2 defined in 2008, not widely deployed client and server runs on top of TCP transparent secure channel encryption authentication compression Freedigitalphots/photostock

TLS overview Application data Application data Handshake Alert Change cipher spec Change cipher spec TLS record layer TLS record layer TCP

Record layer signed sequence number type version length data checksum padding encrypted the sequence number is not part of the message type is Application Data, Handshake,... checksum is HMAC (key, hash algorithm) (compress-then-) sign-then-encrypt

Key material pseudorandom function (PRF) pre-master secret ( result of the handshake ) master secret = PRF(pre-master secret, client random, server random,...) key block = PRF(master secret, client random, server random,...) split the key block into six keys client HMAC key, server HMAC key client encryption key, server encryption key client init vector (IV), server init vector

Handshake agree on a set of ciphers client verifies the server's identity calculate the pre-master secret derive master secret and required keys verify the integrity of the handshake messages

Handshake client server supported ciphers, random number verify server certificate create pre-master secret encrypt it with server's public key selected cipher, random number, certificate encrypted pre-master secret checksum of handshake messages checksum of handshake messages

Test setup a simple TLS client and server OpenSSL command line tools server's private key openssl genrsa -out serverkey.pem 2048 server certificate openssl req -x509 -new -key serverkey.pem \ -out servercert.pem \ -subj "/C=DE/ST=Hessen/L=Frankfurt/ O=private/OU=Martin Kaiser's server/ CN=test.kaiser.cx/emailAddress=test@kaiser.cx"

Test client & server serve an info page on port 4433 openssl s_server -accept 4433 \ -cipher AES256-SHA -no_comp -www \ -cert servercert.pem -key serverkey.pem offer only one set of algorithms don't support compression client openssl s_client -no_ticket -tls1 localhost:4433 is the default target

Wireshark and SSL/TLS SSL and TLS up to version 1.2 are supported ASN.1 framework dissect the server's X.509 certificate generate protocol dissectors from ASN.1 modules decrypt captured TLS traffic using the server's private key using the master secret gnutls, libgcrypt are required for this wireshark -v

Demo: capture TLS traffic

Useful Wireshark settings in our example, TCP port 4433 is SSL Decode As this setting can be saved both client and server are on localhost add columns for source and destination port Display Filter ssl Follow TCP stream, Follow SSL stream Time Shift to see the time difference between TLS messages

Cipher Suites Cipher Suite == a set of algorithms type of server's keypair algorithm used for negotiating the pre-master secret some cipher suites use server's keypair directly record-layer's encryption algorithm record-layer's MAC algorithm TLS_<key-exchange>_<auth>_WITH_<enc>_<mac>

Cipher Suite Example TLS_RSA_WITH_AES_256_CBC_SHA server has an RSA keypair RSA is used for pre-master secret calculation record layer encryption uses AES 256 in CBC mode for encryption record layer uses HMAC-SHA-1 for message authentication

Decrypt TLS traffic using the server's private key Edit / Preferences / Protocols / SSL / RSA keys list Protocol data simply shows the decrypted bytes Wireshark decrypts the pre-master secret, calculates the master secret and the key block

Demo: decrypt TLS traffic

Export PDU mechanism strip off all layers below the TLS payload the resulting packets can be interpreted without any key material File / Export PDUs to file experimental

Session resumption speed up the handshake, skip the public key calculations initial connection server assigns a session ID client and server cache the master secret subsequent connection client sends the session ID to resume the session client and server use the cached master secret new random numbers unique key material for each connection decryption with the server's private key requires a capture with the initial handshake

Session resumption in practice openssl s_client -no_ticket -tls1 -sess_out s1.dat cache information for session resumption openssl sess_id -in s1.dat -noout -text display the cached session info openssl s_client -no_ticket -tls1 -sess_in s1.dat resume a session based on cached information

Demo: session resumption

Ephemeral cipher suites use an ephemeral (short-lived) key for generating the pre-master secret server's key pair is not used directly ephemeral key is linked to the server's key pair additional handshake message ServerKeyExchange forward secrecy: if the server's private key is compromised, it can't be used for decrypting captured TLS traffic

Testing an ephemeral cipher suite DHE-RSA-AES256-SHA server certificate contains an RSA keypair Diffie-Hellman is used for calculating the premaster secret the server signs its Diffie-Hellman public key with its RSA private key the record layer uses AES-256 in CBC mode, HMAC-SHA1 openssl s_server -accept 4433 \ -no_comp -cipher DHE-RSA-AES256-SHA -www \ -cert servercert.pem -key serverkey.pem

Demo: ephemeral cipher suite

Decrypt TLS traffic using the master secret session resumption, ephemeral keys the server's private key is not sufficient to decrypt TLS traffic provide the master secret to Wireshark directly key file RSA Session-ID:<sess_id> Master-Key:<master secret> CLIENT_RANDOM <client_random> <master secret> RSA <8 bytes enc pre-master secret> <pre-master secret>

How to create a key file Wireshark File / Export SSL session keys only when Wireshark can already decrypt the TLS traffic e.g. because it has the server's private key use OpenSSL's cached session info openssl sess_id -in s1.dat -noout -text some tweaking is required to get the data into the correct format applications based on NSS (e.g. chrome, firefox) export SSLKEYLOGFILE=./out.log && firefox

Demo: TLS decryption using the master secret

Summary to understand TLS, start with simple scenarios Wireshark can decrypt TLS traffic using the server's private key using the master secret please let us know if you have some TLS traces that Wireshark doesn't fully support

Thank you for your attention. Questions? Freedigitalphotos/Master Isolated Images