IPSec and SSL Virtual Private Networks



Similar documents
APNIC elearning: IPSec Basics. Contact: esec03_v1.0

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

Network Security. Lecture 3

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

Internet Protocol Security IPSec

Network Security Part II: Standards

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

CS 356 Lecture 27 Internet Security Protocols. Spring 2013

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

Communication Systems SSL

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

Web Security Considerations

IP Security. Ola Flygt Växjö University, Sweden

Application Note: Onsight Device VPN Configuration V1.1

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

Lecture 10: Communications Security

Computer and Network Security

Chapter 10. Network Security

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

CSC Network Security

CSC 474 Information Systems Security

Security Engineering Part III Network Security. Security Protocols (II): IPsec

Internetwork Security

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

Security in IPv6. Basic Security Requirements and Techniques. Confidentiality. Integrity

Chapter 17. Transport-Level Security

Chapter 7 Transport-Level Security

Communication Security for Applications

Transport Level Security

Transport Layer Security Protocols

Chapter 5: Network Layer Security

Secure Sockets Layer

Network Security Essentials Chapter 5

Introduction to Security and PIX Firewall

13 Virtual Private Networks 13.1 Point-to-Point Protocol (PPP) 13.2 Layer 2/3/4 VPNs 13.3 Multi-Protocol Label Switching 13.4 IPsec Transport Mode

Príprava štúdia matematiky a informatiky na FMFI UK v anglickom jazyku

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

CCNA Security 1.1 Instructional Resource

Securing IP Networks with Implementation of IPv6

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.

CSCI 454/554 Computer and Network Security. Topic 8.1 IPsec

Lecture 17 - Network Security

Security Protocols/Standards

SonicOS Enhanced 3.2 IKE Version 2 Support

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

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

Network Security. Abusayeed Saifullah. CS 5600 Computer Networks. These slides are adapted from Kurose and Ross 8-1

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

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

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

The BANDIT Products in Virtual Private Networks

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

SECURE SOCKETS LAYER (SSL)

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

APNIC elearning: Network Security Fundamentals. 20 March :30 pm Brisbane Time (GMT+10)

IPsec Details 1 / 43. IPsec Details

VPN VPN requirements Encryption VPN-Types Protocols VPN and Firewalls

Web Security (SSL) Tecniche di Sicurezza dei Sistemi 1

Network Security Fundamentals

Chapter 4 Virtual Private Networking

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

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

Overview. Protocols. VPN and Firewalls

Secure Socket Layer. Security Threat Classifications

VPNs. Palo Alto Networks. PAN-OS Administrator s Guide Version 6.0. Copyright Palo Alto Networks

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

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

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

Introduction to Computer Security

Overview. SSL Cryptography Overview CHAPTER 1

IPsec VPN Security between Aruba Remote Access Points and Mobility Controllers

CPS Computer Security Lecture 9: Introduction to Network Security. Xiaowei Yang

Branch Office VPN Tunnels and Mobile VPN

Network Security. Marcus Bendtsen Institutionen för Datavetenskap (IDA) Avdelningen för Databas- och Informationsteknik (ADIT)

Internet Security Architecture

Protocol Security Where?

Computer security Lecture 9

Security vulnerabilities in the Internet and possible solutions

Lab Configure a PIX Firewall VPN

CS 4803 Computer and Network Security

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

VPN Solutions. Lesson 10. etoken Certification Course. April 2004

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

Site to Site Virtual Private Networks (VPNs):

Laboratory Exercises V: IP Security Protocol (IPSec)

Configuring IPSec VPN Tunnel between NetScreen Remote Client and RN300

Case Study for Layer 3 Authentication and Encryption

Cisco Site-to-Site VPN Lab 3 / GRE over IPSec VPNs by Michael T. Durham

Introduction to Computer Security

Chapter 32 Internet Security

SSL Secure Socket Layer

Configuring Internet Key Exchange Security Protocol

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

Cryptography and Network Security IPSEC

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

Overview. Securing TCP/IP. Introduction to TCP/IP (cont d) Introduction to TCP/IP

VPN SECURITY. February The Government of the Hong Kong Special Administrative Region

Viewing VPN Status, page 335. Configuring a Site-to-Site VPN, page 340. Configuring IPsec Remote Access, page 355

Transcription:

IPSec and SSL Virtual Private Networks ISP Workshops Last updated 29 June 2014 1

Acknowledgment p Content sourced from n Merike Kaeo of Double Shot Security n Contact: merike@doubleshotsecurity.com

Virtual Private Networks p Creates a secure tunnel over a public network p Any VPN is not automagically secure n You need to add security functionality to create secure VPNs n That means using firewalls for access control n And probably IPsec or SSL/TLS for confidentiality and data origin authentication 3

VPN Protocols p IPsec (Internet Protocol Security) n Open standard for VPN implementation n Operates on the network layer

Other VPN Implementations p MPLS VPN n Used for large and small enterprises n Pseudowire, VPLS, VPRN p GRE Tunnel n Packet encapsulation protocol developed by Cisco n Not encrypted n Implemented with IPsec p L2TP IPsec n Uses L2TP protocol n Usually implemented along with IPsec n IPsec provides the secure channel, while L2TP provides the tunnel

What is IPSec? Internet! IPSec! p IETF standard that enables encrypted communication between peers: n Consists of open standards for securing private communications n Network layer encryption ensuring data confidentiality, integrity, and authentication n Scales from small to very large networks

What Does IPsec Provide? p p p p Confidentiality.many algorithms to choose from Data integrity and source authentication n Data signed by sender and signature verified by the recipient n Modification of data can be detected by signature verification n Because signature based on a shared secret, it gives source authentication Anti-replay protection n Optional: the sender must provide it but the recipient may ignore Key Management n IKE session negotiation and establishment n n Sessions are rekeyed or deleted automatically Secret keys are securely established and authenticated n Remote peer is authenticated through varying options 7

Different Layers of Encryption Application Layer SSL, PGP, SSH, HTTPS Source Destination Network Layer - IPsec Link Layer Encryption

Relevant Standard(s) p IETF specific n rfc2409: IKEv1 n rfc4301: IPsec Architecture (updated) n rfc4303: IPsec ESP (updated) n rfc4306: IKEv2 n rfc4718: IKEv2 Clarifications n rfc4945: IPsec PKI Profile p IPv6 and IPsec n rfc4294: IPv6 Node Requirements n rfc4552: Authentication/Confidentiality for OSPFv3 n rfc4877: Mobile IPv6 Using IPsec (updated) n rfc4891: Using IPsec to secure IPv6-in-IPv4 Tunnels 9

IPsec Modes p Tunnel Mode n Entire IP packet is encrypted and becomes the data component of a new (and larger) IP packet. n Frequently used in an IPsec site-to-site VPN p Transport Mode n IPsec header is inserted into the IP packet n No new packet is created n Works well in networks where increasing a packet s size could cause an issue n Frequently used for remote-access VPNs

Tunnel vs. Transport Mode IPsec IP Header TCP Header Payload Without IPsec IP Header IPsec Header TCP Header Payload Transport Mode IPsec New IP Header IPsec Header IP Header TCP Header Payload Tunnel Mode IPsec

Transport vs Tunnel Mode TFTP Routing Update File Transfer File Transfer Transport Mode: End systems are the initiator and recipient of protected traffic Tunnel Mode: Gateways act on behalf of hosts to protect traffic 12

IPsec Components p AH (Authentication Header) n Authentication is applied to the entire packet, with the mutable fields in the IP header zeroed out n If both ESP and AH are applied to a packet, AH follows ESP n Standard requires HMAC-MD5-96 and HMAC- SHA1-96.older implementations also support keyed MD5 13

IPsec Components p ESP (Encapsulating Security Payload) n Must encrypt and/or authenticate in each packet n Encryption occurs before authentication n Authentication is applied to data in the IPsec header as well as the data contained as payload n Standard requires DES 56-bit CBC and Triple DES. Can also use RC5, IDEA, Blowfish, CAST, RC4, NULL p IKE (Internet Key Exchange) n Automated SA (Security Association) creation and key management 14

IPsec Architecture AH Authentication Header IPsec Security Policy ESP Encapsulating Security Payload IKE The Internet Key Exchange

Security Associations (SA) p A collection of parameters required to establish a secure session p Uniquely identified by three parameters consisting of n Security Parameter Index (SPI) n IP destination address n Security protocol (AH or ESP) identifier p An SA is unidirectional n Two SAs required for a bidirectional communication p A single SA can be used for AH or ESP, but not both n must create two (or more) SAs for each direction if using both AH and ESP

Authentication Header (AH) p Provides source authentication and data integrity n Protection against source spoofing and replay attacks p Authentication is applied to the entire packet, with the mutable fields in the IP header zeroed out p If both AH and ESP are applied to a packet, AH follows ESP p Operates on top of IP using protocol 51 p In IPv4, AH protects the payload and all header fields except mutable fields and IP options (such as IPsec option)

Encapsulating Security Payload (ESP) p Uses IP protocol 50 p Provides all that is offered by AH, plus data confidentiality n It uses symmetric key encryption p Must encrypt and/or authenticate in each packet n Encryption occurs before authentication p Authentication is applied to data in the IPsec header as well as the data contained as payload

Internet Key Exchange (IKE) p An IPsec component used for performing mutual authentication and establishing and maintaining Security Associations. (RFC 5996) p Typically used for establishing IPsec sessions p A key exchange mechanism p Five variations of an IKE negotiation: n Two modes (aggressive and main modes) n Three authentication methods (pre-shared, public key encryption, and public key signature) p Uses UDP port 500

IKE Modes Mode Main Mode Description 1. Three exchanges of information between IPsec peers. 2. Initiator sends one or more proposals to the other peer (responder), responder selects a proposal 3. Diffie-Hellman (DH) key exchange 4. Establish ISAKMP session Aggressive Mode 1. Achieves same result as main mode using only 3 packets 2. First packet sent by initiator containing all info to establish SA 3. Second packet by responder with all security parameters selected 4. Third packet finalizes authentication of the ISAKMP session Quick Mode 1. Negotiates the parameters for the IPsec session. 2. Entire negotiation occurs within the protection of ISAKMP session 20

Internet Key Exchange (IKE) p Phase I n Establish a secure channel (ISAKMP SA) n Using either main mode or aggressive mode n Authenticate computer identity using certificates or pre-shared secret p Phase II n Establishes a secure channel between computers intended for the transmission of data (IPsec SA) n Using quick mode

IPsec with IKE 1 IPsec Peer 2 Peers Authenticate using: - Pre-shared key - Digital Certificate IPsec Peer Traffic which needs to be protected is recognized as requiring IPsec protection IKE Phase 1 Secure communication channel 3 IKE Phase 2 IPsec Tunnel Secured traffic exchange 4 Secured Communications 22

IPsec IKE Phase 1 Uses DH Exchange p First public key algorithm (1976) p Diffie-Hellman is a key establishment algorithm n Two parties in a DF exchange can generate a shared secret n There can even be N-party DF changes where N peers can all establish the same secret key p Diffie-Hellman can be done over an insecure channel p IKE authenticates a Diffie-Hellman exchange n Pre-shared secret n Nonce (RSA signature) n Digital signature 23

IKE Phase 1 Main Mode Initiator 3 Compute DH shared secret and derive keying material Responder Internet 1 Negotiate IKE Policy IKE Message 1 (SA proposal) IKE Message 2 (accepted SA) 2 Authenticated DH Exchange IKE Message 3 (DH public value, nonce) IKE Message 4 (DH public value, nonce) 4 Protect IKE Peer Identity IKE Message 5 (Authentication material, ID) IKE Message 6 (Authentication material, ID) (Encrypted) 24

IKE Phase 2 Quick Mode 4 Validate message 2 1 Initiator 7 Compute keying material Internet Responder Message 1 (authentication/keying material and SA proposal) 2 Validate message 1 6 Validate message 3 Message 2 (authentication/keying material and accepted SA) 3 5 Message 3 (hash for proof of integrity/authentication) 25

IKE v2: Replacement for Current IKE Specification p Feature Preservation n Most features and characteristics of baseline IKE v1 protocol are being preserved in v2 p Compilation of Features and Extensions n Quite a few features that were added on top of the baseline IKE protocol functionality in v1 are being reconciled into the mainline v2 framework p Some New Features

IKE v2: What Is Not Changing p Features in v1 that have been debated but are ultimately being preserved in v2 n Most payloads reused n Use of nonces to ensure uniqueness of keys p v1 extensions and enhancements being merged into mainline v2 specification n Use of a configuration payload similar to MODECFG for address assignment n X-auth type functionality retained through EAP n Use of NAT Discovery and NAT Traversal techniques

IKE v2: What Is Changing p Significant Changes Being to the Baseline Functionality of IKE n EAP adopted as the method to provide legacy authentication integration with IKE n Public signature keys and pre-shared keys, the only methods of IKE authentication n Use of stateless cookie to avoid certain types of DOS attacks on IKE n Continuous phase of negotiation

How Does IKE v2 Work? IKE_SA_INIT (Two Messages) IKE_SA Authentication Parameters Negotiated IKE_AUTH (Two Messages) IKE Authentication Occurs and One CHILD_SA Created CREATE_CHILD_SA (Two Messages) Second CHILD_SA Created Protected Data

IPv4 IPsec AH Before applying AH: IPv4 AH Transport Mode: After applying AH: Original IP Header TCP/UDP Original IP Header Data AH Header TCP/UDP Data Authenticated except for mutable fields in IP header Mutable Fields: - ToS - TTL - Hdr Checksum - Offset - Flags IPv4 AH Tunnel Mode: Before applying AH: After applying AH: Original IP Header TCP/UDP New IP Header AH Header Original IP Header Data Data Mutable Fields: - ToS - TTL - Hdr Checksum - Offset - Flags Authenticated except for mutable fields in new IP header 30

IPv4 IPsec ESP Before applying ESP: Original IP Header TCP/UDP Data IPv4 ESP Transport Mode: After applying ESP: Original IP Header ESP Header TCP/UDP Data ESP Trailer ESP Auth Encrypted Authenticated Before applying ESP: IPv4 ESP Tunnel Mode: After applying ESP: Original IP Header TCP/UDP New IP Header ESP Header Data Original ESP IP Header TCP/UDP Data Trailer ESP Auth Encrypted Authenticated 31

ESP Header Format 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Security Parameter Index (SPI) Sequence Number ENCRYPTED Initialization Vector (IV) Payload Data (Variable) Padding (0-255 bytes) Padding Length Authentication Data (ICV) Next Header SPI: Arbitrary 32-bit number that specifies SA to the receiving device Seq #: Start at 1 and must never repeat; receiver may choose to ignore IV: Used to initialize CBC mode of an encryption algorithm Payload Data: Encrypted IP header, TCP or UDP header and data Padding: Used for encryption algorithms which operate in CBC mode Padding Length: Number of bytes added to the data stream (may be 0) Next Header: The type of protocol from the original header which appears in the encrypted part of the packet Auth Data: ICV is a digital signature over the packet and it varies in length depending on the algorithm used (SHA-1, MD5) 32

Considerations For Using IPsec p Security Services n Data origin authentication n Data integrity n Replay protection n Confidentiality p Size of network p How trusted are end hosts can a-priori communication policies be created? p Vendor support p What other mechanisms can accomplish similar attack risk mitigation 33

Non-Vendor Specific Deployment Issues p Historical Perception n Configuration nightmare n Not interoperable p Performance Perception n Need empirical data n Where is the real performance hit? p Standards Need Cohesion 34

Vendor Specific Deployment Issues p Lack of interoperable defaults n A default does NOT mandate a specific security policy n Defaults can be modified by end users p Configuration complexity n Too many knobs n Vendor-specific terminology p Good News: IPv6 support in most current implementations 35

IPsec Concerns p Are enough people aware that IKEv2 is not backwards compatible with IKEv1? n IKEv1 is used in most IPsec implementations n Will IKEv2 implementations first try IKEv2 and then revert to IKEv1? p Is IPsec implemented for IPv6? n Some implementations ship IPv6 capable devices without IPsec capability and host requirements is changed from MUST to SHOULD implement p OSPFv3 n All vendors IF they implement IPsec used AH n Latest standard to describe how to use IPsec says MUST use ESP w/null encryption and MAY use AH 36

IPsec Concerns (cont) p What is transport mode interoperability status? n Will end user authentication be interoperable? p PKI Issues n Which certificates do you trust? n How does IKEv1 and/or IKEv2 handle proposals with certificates? n Should common trusted roots be shipped by default? n Who is following and implementing pki4ipsec-ikecertprofile (rfc4945) p Have mobility scenarios been tested? n Mobility standards rely heavily on IKEv2 p ESP how to determine if ESP-Null vs Encrypted 37

Default Issues Vendor A Vendor B Vendor C IKE Phase 1 SHA1 RSA-SIG Group 1 Lifetime 86400 Sec Main Mode IKE Phase 2 PFS Group 1 IKE Phase 1 MD5 Pre-Share Key Group 5 Lifetime 86400 Sec Main Mode IKE Phase 2 PFS Group 5 IKE Phase 1 SHA1 Pre-Share Key Group 2 Lifetime 86400 Sec Aggressive Mode IKE Phase 2 PFS Group 2 38

Terminology Issues IKE Phase 1 DH Key Length IKE Phase 2 IKE Phase 1 SA IKE SA ISAKMP SA Main Mode DH Group Modp # Group # IKE Phase 2 SA IPsec SA Quick Mode Configuration complexity increased with vendor specific configuration terms 39

Potentially Easy Configuration 2001:DB8:6665:AF75::3B RNOC- Srvc Router_Z 2001:DB8:8888:BAD::66 2001:DB8:6665:FAD::99 Router_M 2001:DB8:6665:AF75::3D RNOC- Mgmt Syslog server 2001:DB8:6665:AF75::3D authenticate esp-null sha1 pre-share secret4syslog TFTP server 2001:DB8:6665:AF75::3D authenticate esp-null aes128 pre-share secret4tftp BGP peer 2001:DB8:8888:BAD::66 authenticate esp-null aes128 pre-share secret4as#xxx 40

Interoperable Defaults For SAs p Security Association groups elements of a conversation together How Do We Communicate Securely? n n n n n ESP encryption algorithm and key(s) Cryptographic synchronization SA lifetime SA source address Mode (transport or tunnel) Do we want integrity protection of data? Do we want to keep data confidential? Which algorithms do we use? What are the key lengths? When do we want to create new keys? Are we providing security end-to-end? 41

Pretty Good IPsec Policy p IKE Phase 1 (aka ISAKMP SA or IKE SA or Main Mode) n 3DES (AES-192 if both ends support it) n Lifetime (8 hours = 480 min = 28800 sec) n SHA-2 (256 bit keys) n DH Group 14 (aka MODP# 14) p IKE Phase 2 (aka IPsec SA or Quick Mode) n 3DES (AES-192 if both ends support it) n Lifetime (1 hour = 60 min = 3600 sec) n SHA-2 (256 bit keys) n PFS 2 n DH Group 14 (aka MODP# 14) 42

Sample Router Configuration crypto isakmp policy 1 authentication pre-share encryption aes hash sha group 5 crypto isakmp key Training123 address 172.16.11.66! crypto ipsec transform-set ESP-AES-SHA esp-aes esp-sha-hmac! crypto map LAB-VPN 10 ipsec-isakmp match address 101 set transform-set ESP-AES-SHA set peer 172.16.11.66 Phase 1 SA Phase 2 SA Encryption and Authentication

Sample Router Configuration interface FastEthernet 0/1 crypto map LAB-VPN exit! Apply on outbound interface access-list 101 permit ip 172.16.16.0 0.0.0.255 172.16.20.0 0.0.0.255 Define interesting VPN traffic

Help With Configuring IPsec p Documentation Profiles for IPsec Interoperability n http://www.vpnc.org/interopprofiles/ p Documents for Cisco IPsec configuration: n http://www.cisco.com/en/us/tech/tk583/tk372/ technologies_configuration_example09186a0080093f73. shtml n http://www.cisco.com/en/us/tech/tk583/tk372/ technologies_configuration_example09186a0080093f86. shtml p Document for Juniper IPsec configuration: n http://kb.juniper.net/infocenter/index? page=content&id=kb10128 45

Capture: Telnet 46

Capture: Telnet + IPsec 47

SSL/TLS p p p p Most widely-used protocol for security Encrypts the segments of network connections above the Transport Layer SSL and TLS n SSL v3.0 specified in an I-D in 1996 (draft-freier-sslversion3-02.txt) n TLS v1.0 specified in RFC 2246 in 1999 n TLS v1.0 = SSL v3.1 SSL v3.0 n TLS v1.1 in 2006 n TLS v1.2 in 2008 Goals of protocol n n n n n Secure communication between applications Data encryption Server authentication Message integrity Client authentication (optional)

Some Applications Using TLS/SSL p Securing WWW traffic (HTTPS) p Browsers Apache n Apache_mod_ssl p DNSSEC requires SSL p Postfix, Sendmail, SMTP p stelnet p OpenSSH p SFTP p SSL VPNs such as OpenVPN and OpenConnect p VoIP and SIP signaling p EAP-TLS for WiFi h"p://www.openssl.org/related/apps.html 49

Benefits of TLS p Application-layer independent n can be implemented with any applications n a wide range of applications supporting it p SSL makes use of both asymmetric and symmetric key cryptography. n performance reasons. n Only the initial "client key exchange message" is encrypted with asymmetric encryption. n Symmetric encryption is better in terms of performance/ speed 50

Benefits of TLS (cont) p Uses X.509 certificates n Certificates and Public Key Infrastructure p SSL protocol layers comes on top of TCP (transport Layer), and is below application layer. n no network infrastructure changes are required to deploy SSL p Each and every connection that's made, through SSL has got one session information. n Session can also be reused or resumed for other connections to the server 51

SSL/TLS Properties p Connection is private n Encryption is used after an initial handshake to define a secret key. n Symmetric cryptography used for data encryption p Peer s identity can be authenticated n Asymmetric cryptography is used (RSA or DSS) p Connection is reliable n Message transport includes a message integrity check using a keyed MAC. n Secure hash functions (such as SHA and MD5) are used for MAC computations.

SSL Protocol Building Blocks SSL is a Combination of a Primary Record Protocol with Four Client Protocols SSL Handshake Protocol SSL Alert Protocol SSL Change Cipher Spec Protocol Application Data Protocol SSL Record Protocol

SSL Protocol Building Block Functions SSL Handshake Protocol Negotiates crypto algorithms and keys SSL Alert Protocol Indicates error or the end of a session SSL Change Cipher Spec Protocol Used to Signal Transition to New Cipher and Keys Generally Towards the End of a Handshake Negotiation SSL Record Protocol Indicates which encryption and integrity protection is applied to the data

SSL Record Layer p Provides fragmentation, compression, integrity protection, and encryption for data objects exchanged between clients and servers p Maintains a current and a pending connection state p Upper Layer TLSPlaintext TLSCompressed TLSCiphertext (send to transport) 55

The SSL Handshake Process SSL Client Internet SSL Server ClientHello 4 5 6 1 ClientKeyExchange 3 ChangeCipherSpec Finished Client initiates SSL connection / sends supported cipher suites Server returns digital certificate to client and selected cipher suite Client sends shared secret encrypted with server s public key Message encryption and integrity algorithms are negotiated Session keys are generated Secure session tunnel is established ServerHello 2 Certificate ServerKeyExchange ClientCertReq (opt) ServerDone ChangeCipherSpec Finished SSL version, Random data (ClientHello.random), sessionid, cipher suits, compression algorithm <- Application Data -> Client computes the premaster key SSL version, Cipher suits, Random data ( ServerHello.random), session 56 ID

SSL Client Authentication p Client authentication (certificate based) is optional and not often used p Many application protocols incorporate their own client authentication mechanism such as username/password or S/Key p These authentication mechanisms are more secure when run over SSL 57

SSL/TLS IANA Assigned Port #s Protocol Defined Port Number HTTP 80 443 NNTP 119 563 POP 110 995 FTP-Data 20 989 FTP-Control 21 990 Telnet 23 992 SSL/TLS Port Number 58

Capture: SSL Decryption (easy) Using stolen key file 59

Attacks on SSL (a little harder ) p BEAST Attack (2011) n Browser Exploit Against SSL/TLS n CBC vulnerability discovered in 2002 n Fixed in TLS 1.1 p CRIME Attack (2012) n Compression Ratio Info-leak Made Easy n Exploit against TLS compression n fixed by disabling TLS Compression p BREACH Attack (2013) n Browser Reconnaissance and Exfiltration via Adaptive Compression of Hypertext n Presented at BlackHat 2013 (Aug) n Attacks HTTP responses using HTTP Compression 60

Encrypted Communications p Use encrypted communications whenever you need to keep information confidential p Verify via network sniffer (e.g. wireshark) that your communication is indeed encrypted p An important aspect is credential management (creating, distributing, storing, revoking, renewing) p Understand if/when credentials are lost that you may not be able to recover the data p Have a plan in place in case you forget your password that protects your private keys 61

Thank You. Questions? 62

IPSec and SSL Virtual Private Networks ISP Workshops 63