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



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.

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

Communication Systems SSL

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

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

Web Security Considerations

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

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

CSC Network Security

CSC 474 Information Systems Security

SECURE SOCKETS LAYER (SSL)

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

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

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

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

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

Communication Security for Applications

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

CS 356 Lecture 27 Internet Security Protocols. Spring 2013

Software Engineering 4C03 Research Project. An Overview of Secure Transmission on the World Wide Web. Sean MacDonald

The Secure Sockets Layer (SSL)

Transport Layer Security Protocols

Overview. SSL Cryptography Overview CHAPTER 1

Information Security

SSL: Secure Socket Layer

SSL Secure Socket Layer

Authenticity of Public Keys

Lecture 4: Transport Layer Security (secure Socket Layer)

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

Network Security Essentials Chapter 5

Secure Socket Layer. Security Threat Classifications

SSL Secure Socket Layer

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

Secure Sockets Layer

Transport Level Security

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

Chapter 7 Transport-Level Security

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

TLS/SSL in distributed systems. Eugen Babinciuc

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

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

Chapter 17. Transport-Level Security

Lab 7. Answer. Figure 1

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

Security Protocols/Standards

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

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

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

ISA 562 Information System Security

Learning Network Security with SSL The OpenSSL Way

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

Overview of CSS SSL. SSL Cryptography Overview CHAPTER

Network Security Part II: Standards

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

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

SSL A discussion of the Secure Socket Layer

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

Web Security (SSL) Tecniche di Sicurezza dei Sistemi 1

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

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

, SNMP, Securing the Web: SSL

Protocol Rollback and Network Security

Transport Layer Security (TLS)

Web Security. Mahalingam Ramkumar

TLS and SRTP for Skype Connect. Technical Datasheet

Einführung in SSL mit Wireshark

SSL Handshake Analysis

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

Lecture 31 SSL. SSL: Secure Socket Layer. History SSL SSL. Security April 13, 2005

Network Security Standards. Key distribution Kerberos SSL/TLS

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

Part III-b. Universität Klagenfurt - IWAS Multimedia Kommunikation (VK) M. Euchner; Mai Siemens AG 2001, ICN M NT

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

ERserver. iseries. Securing applications with SSL

ms-help://ms.technet.2005mar.1033/winnetsv/tnoffline/prodtechnol/winnetsv/plan/ssl...

Managing SSL certificates in the ServerView Suite

ERserver. iseries. Secure Sockets Layer (SSL)

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

Secure network protocols: how SSL/TLS, SSH, SFTP and FTPS work

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

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

Computer and Network Security

SECURE SOCKET LAYER PROTOCOL SIMULATION IN JAVA. A Research Project NAGENDRA KARRI

Low-Level TLS Hacking

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

Certificates and network security

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

Lecture 10: Communications Security

, ) I Transport Layer Security

SSL Report: ebfl.srpskabanka.rs ( )

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

Three attacks in SSL protocol and their solutions

Cryptography and Network Security IPSEC

SSL/TLS: The Ugly Truth

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

Network Security - Secure upper layer protocols - Background. Security. Question from last lecture: What s a birthday attack? Dr.

mod_ssl Cryptographic Techniques

Web Security: Encryption & Authentication

Transcription:

Lecture 7: Transport Level Security SSL/TLS CS 336/536: Computer Network Security Fall 2014 Nitesh Saxena Adopted from previous lecture by Tony Barnard Course Admin HW/Lab 1 Graded; scores posted; to be returned today Solution was provided (emailed) HW/Lab 2 posted Covers Lecture 5 and 6 (network mapping and attacks) Due Oct 20 Labs active this Friday Questions? 2 1

Course Admin Mid-Term Exam Oct 22 In-class, class timing (2 hrs?) Covers Lecture 1-7 Closed Book/Notes Review Oct 15 3 Outline SSL/TLS Protocol Messages and Message Formats Secure Data Exchange Exposition borrowed from Stephen Thomas (a book solely focusing on SSL) 4 2

SSL: Secure Sockets Layer Widely deployed security protocol Had web e-commerce transactions in mind Encryption (especially creditcard numbers) Web-server authentication Optional client authentication Minimum hassle in doing business with new merchant Supported by almost all browsers and web servers https Tens of billions $ spent per year over SSL Originally designed by Netscape in 1993 Number of variations: TLS: transport layer security, RFC 2246 Provides Confidentiality Integrity Authentication 5 Original goals: Available to all TCP applications Not just web e.g., email (IMAP, SMTP), FTP SSL in Action Let us see some examples Gmail (uses SSL) Wells fargo (uses SSL) Blazernet (uses SSL) Uab (no SSL) HTTPS: HTTP over SSL (or TLS) Typically on port 443 (regular http on port 80) 6 3

Which Layer to Add Security to? Relative Location of Security Facilities in the TCP/IP Protocol Stack 7 SSL and TLS SSL 2.0 was developed and patented by Netscape in 1994. TLS is the non-proprietary Internet standard development (RFC 2246, 1999) TLS 1.0 was an upgrade of SSL 3.0, so TLS 1.0 is sometimes referred to as SSL 3.1 Latest standard is TLS 1.2, sometimes referred to as SSL 3.3 8 4

SSL Main Components 1. Handshake 1. Negotiation of protocol algorithms, versions and parameters 2. Authentication of communicating parties 3. Agreement of session keys 2. Secure Session Communication 9 443 1 or more SSL Record Layer units 10 5

Establishing Secure Communications First, establish TCP connection from client to port 443 on server Secure channel established proceed to use 11 12 6

13 14 7

15 16 8

Secure channel established 17 18 9

ClientHello Current versions: SSL 3.3, TLS 1.2 Also used as a nonce to repel replay attacks 19 ServerHello Server decides Server selects from menu submitted by client 20 10

ServerKeyExchange Server sends its public key certificate ServerHelloDone Server has completed initial negotiation. ClientKeyExchange Client generates premaster secret, and sends it encrypted with the server s public key. Server decrypts the premaster secret using the corresponding private key. Both sides can compute necessary keys. Change Cipher Spec Preliminary negotiations are complete and client tells server I m going to begin using the agreed cipher suite. 21 ChangeCipherSpec Since the transition to secured communication is critical, and both sides have to get it exactly right, the SSL specification is very precise in describing the process. The SSL specification also recognizes that some of the information (in particular, the key material) will be different for each direction of communication. In other words, one set of keys will secure data the client sends to the server, and a different set of keys will secure data the server sends to the client. For a given system, whether it is a client or a server, SSL defines a write state and a read state. The write state defines the security information for data that the system sends, and the read state defines the security information for data that the system receives. 22 11

ChangeCipher Spec 23 24 12

Finished Immediately after sending their ChangeCipherSpec messages, each system sends a Finished message. The Finished messages allow both systems to verify that negotiation has been successful and that security has not been compromised. Two aspects of the Finished message contribute to this security. First the Finished message itself is subject to the negotiated cipher suite If the receiving party cannot successfully decrypt and verify the message, then clearly something has gone awry with the security negotiation. The contents of the Finished message also serves to protect the security of the SSL negotiation. Each Finished message contains a cryptographic keyed hash (MAC) of important information about the just-finished negotiation This protects against an attacker who manages to insert fictitious messages into, or remove legitimate messages from, the communication. 25 Authenticating the Server By now in this course we re familiar with the need to authenticate the server s identity. In the usual situation in which SSL is deployed (ordering from Amazon.com) we do not need to authenticate the client SSL has an option to do so, but we will skip this. No surprise: we will insist on the server sending the client an X.509 certificate browser will automatically check validity, using its library of CA public keys. 26 13

Authenticating the Server s Identity continued New: replaces ServerKeyExchange 27 Darth Sends amazon.com certificate ClientKeyExchange Encryption of the pre-master secret with the public key sent in the Certificate message means that the server must actually possess the corresponding private key to decrypt the premaster secret. Both sides can compute necessary keys. 28 14

Message Formats Transport Requirements Record Layer ChangeCipherSpec Protocol Alert Protocol Severity Level Alert Description Handshake Protocol ClientHello ServerHello Certificate ServerHelloDone ClientKeyExchange- include RSA only Finished Securing Messages Message Authentication Code Encryption Creating Cryptographic Keys 29 443 1 or more SSL Record Layer units 30 15

Transport Requirements 31 32 Record Layer 16

33 Figure 5.3 SSL Record Protocol Operations 34 17

HTTP 35 ChangeCipherSpec Protocol Record Layer Header 36 18

Alert Protocol The Alert Protocol signals an error. Some error messages are cautionary, others fatal. TLS removes some of the error categories in SSL and adds some new ones. 37 Alert Protocol Description 38 19

Handshake Protocol Purposes: 1. negotiate cipher suite to be used ClientHello message ServerHello message 2. authenticate I/D of server Certificate message ClientKeyExchange message 3. generate collection of shared secret information Premaster secret (ClientKeyExchange) Master secret Keying material MAC key Encryption key IV 39 Format of Handshake message Record Layer Header protocol = 22 In practice they are not! 40 20

41 42 21

ClientHello Record Layer Header protocol = 22 43 There are more of these in SSL; TLS removes some and adds others. 44 22

Secure Socket Layer TLSv1 Record Layer: Handshake Protocol: Client Hello Content Type: Handshake (22) Client can handle up Version: TLS 1.0 (0x0301) Length: 92 to TLS 1.0 (SSL 3.1) Handshake Protocol: Client Hello Handshake Type: Client Hello (1) Length: 88 Version: TLS 1.0 (0x0301) Random gmt_unix_time: Oct 10, 2008 10:54:18.000000000 random_bytes: 751AB9DCEBF3014D799038D27E24E6409C8397FE6E1A7553... Session ID Length: 0 Cipher Suites Length: 24 Cipher Suites (12 suites) Cipher Suite: TLS_DHE_RSA_WITH_AES_256_CBC_SHA (0x0039) Cipher Suite: TLS_DHE_DSS_WITH_AES_256_CBC_SHA (0x0038) Cipher Suite: TLS_RSA_WITH_AES_256_CBC_SHA (0x0035) Remarkable Cipher Suite: TLS_DHE_RSA_WITH_AES_128_CBC_SHA (0x0033) range of Cipher Suite: TLS_DHE_DSS_WITH_AES_128_CBC_SHA (0x0032) Cipher Suite: TLS_RSA_WITH_RC4_128_MD5 (0x0004) capabilities Cipher Suite: TLS_RSA_WITH_RC4_128_SHA (0x0005) in browser! Cipher Suite: TLS_RSA_WITH_AES_128_CBC_SHA (0x002f) Cipher Suite: TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA (0x0016) Cipher Suite: TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA (0x0013) Cipher Suite: SSL_RSA_FIPS_WITH_3DES_EDE_CBC_SHA (0xfeff) Cipher Suite: TLS_RSA_WITH_3DES_EDE_CBC_SHA (0x000a) Compression Methods Length: 1 45 Compression Methods (1 method) Compression Method: null (0) 46 23

ServerHello 47 Server to client: Secure Socket Layer TLSv1 Record Layer: Handshake Protocol: Server Hello Content Type: Handshake (22) Version: TLS 1.0 (0x0301) Length: 74 Handshake Protocol: Server Hello Handshake Type: Server Hello (2) Length: 70 Version: TLS 1.0 (0x0301) Random gmt_unix_time: Oct 10, 2008 11:00:13.000000000 random_bytes: C7B2A2F58454A2C2A0DE667781E2773544C86C8FF724069E... Session ID Length: 32 Session ID: 77987B601B5544C111C3FCB1DF96F7A8970D1EFD39630F3F... Cipher Suite: TLS_RSA_WITH_RC4_128_MD5 (0x0004) Compression Method: null (0) 48 24

Certificate 49 Server to client: Secure Socket Layer TLSv1 Record Layer: Handshake Protocol: Certificate Content Type: Handshake (22) Version: TLS 1.0 (0x0301) Length: 2468 Handshake Protocol: Certificate Handshake Type: Certificate (11) Length: 2464 Certificates Length: 2461 Certificates (2461 bytes) Certificate Length: 1271 Certificate (id-at-commonname=www.amazon.com, Certificate Length: 1184 Certificate (id-at-commonname=verisign Class 3 Secure Server CA Secure Socket Layer TLSv1 Record Layer: Handshake Protocol: Server Hello Done Content Type: Handshake (22) Version: TLS 1.0 (0x0301) Length: 4 Handshake Protocol: Server Hello Done Handshake Type: Server Hello Done (14) Length: 0 50 25

Example Certificate message from Amazon.com contains a chain of public key certificates: Certificate #1: Issued to: www.amazon.com Issuer: VeriSign Class 3 Secure Server CA Certificate #2: Issued to: VeriSign Class 3 Secure Server CA Issuer: VeriSign Class 3 Public Primary Certification Authority 51 52 ServerHelloDone 26

Both sides know algorithms, client generates pre-master secret and can use it to compute all necessary keys (session key, MAC key). Client encrypts pre-master secret with server public key and sends. Server has received encrypted pre-master secret, decrypts with its private key and uses pre-master secret to compute all necessary keys. Both sides know all keys. 53 ClientKeyExchange Chronologically, ChangeCipherSpec comes here, but it s not part of the Handshake Protocol. 54 27

Finished 55 The 3 messages from the client: Secure Socket Layer TLSv1 Record Layer: Handshake Protocol: Client Key Exchange Content Type: Handshake (22) Version: TLS 1.0 (0x0301) Length: 134 Handshake Protocol: Client Key Exchange Handshake Type: Client Key Exchange (16) Length: 130 TLSv1 Record Layer: Change Cipher Spec Protocol: Change Cipher Spec Content Type: Change Cipher Spec (20) Version: TLS 1.0 (0x0301) Length: 1 Change Cipher Spec Message TLSv1 Record Layer: Handshake Protocol: Encrypted Handshake Message Content Type: Handshake (22) Version: TLS 1.0 (0x0301) Length: 32 Handshake Protocol: Encrypted Handshake Message 56 28

57 Creating Cryptographic Parameters Where did the various keys come from? Calculation of the Master Secret: 48 bytes 58 29

We need this secret information Creation of the secret information (key material) TLS does this somewhat differently 30

61 Review: repeat of a previous slide: Both sides know algorithms, client generates pre-master secret and can use it to compute all necessary keys (session key, IV, MAC key). Client encrypts pre-master secret with server public key and sends. Server receives encrypted pre-master secret, decrypts with its private key and uses pre-master secret to compute all necessary keys. Then both sides have computed identical keys. We need to have an agreed test message. 62 31

Return to Finished Finished message carries the agreed test message, MD5 and SHA hashes of the previous handshake messages. Here s the SHA: Inner and outer hash remind us of HMAC TLS uses a slightly different hash calculation. Keyed, not signed 63 Finished 64 32

Handshake finally over! Ready to do useful work. Securing Messages (Application) 65 The inner and outer hash used here in SSL reminds us of HMAC (RFC 2104). This is slightly different, but TLS uses HMAC exactly. 66 33

Session Resumption Full handshake is expensive: CPU time and amount of communication If the client and server have already communicated once, they can skip handshake and proceed directly to data transfer For a given session, client and server store session_id, master_secret, negotiated ciphers Client sends session_id in ClientHello Server then agrees to resume in ServerHello New key_block computed from master_secret and client and server random numbers 67 Fun/Info bit: SSL Heartbleed 68 34

Further Reading SSL and TLS Essentials, Stephen Thomas Stallings Chapter 6 69 35