ISO/OSI Model SSL: Security at Transport Layer
Total Page:16
File Type:pdf, Size:1020Kb
ISO/OSI Model SSL: Security at Transport Layer Peer-to-peer Application Layer Application Layer Presentation Layer Presentation Layer Network Security Session Layer Session Layer Assurance Transport Layer Transport Layer Network Layer Network Layer Network Layer Lecture 9 Data Link Layer Data Link Layer Data Link Layer Physical Layer Physical Layer Physical Layer October 30, 2003 Flow of bits Courtesy of Professors INFSCI 2935: Introduction of Computer Security 1 INFSCI 2935: Introduction to Computer Security 2 Chris Clifton & Matt Bishop 1 Security at the Transport Layer Secure Socket Layer (SSL) Secure Socket Layer (SSL) l Developed by Netscape to provide security in l Each party keeps session information ¡ Session identifier (unique) WWW browsers and servers ¡ The peer’s X.503(v3) certificate l SSL is the basis for the Internet standard ¡ Compression method used to reduce volume of data ¡ Cipher specification (parameters for cipher and MAC) protocol – Transport Layer Security (TLS) ¡ Master secret of 48 bits protocol (compatible with SSLv3) l Connection information ¡ Random data for the server & client l Key idea: Connections and Sessions ¡ Server and client keys (used for encryption) ¡A SSL session is an association between two peers ¡ Server and client MAC key ¡An SSL connection is the set of mechanisms used to ¡ Initialization vector for the cipher, if needed ¡ Server and client sequence numbers transport data in an SSL session l Provides a set of supported cryptographic mechanisms that are setup during negotiation (handshake protocol) INFSCI 2935: Introduction to Computer Security 3 INFSCI 2935: Introduction to Computer Security 4 2 SSL Architecture SSL Record Protocol Operation e.g., HTTP messages Provides a basis for Secure communication Confidentiality + Message authenticity Message type, version, length of block INFSCI 2935: Introduction to Computer Security 5 INFSCI 2935: Introduction to Computer Security 6 3 Handshake Protocol Other protocols lThe most complex part of SSL lSSL Change Cipher Spec Protocol lAllows the server and client to ¡A single byte is exchanged authenticate each other ¡After new cipher parameters have been ¡Based on interchange cryptosystem (e.g., RSA) negotiated (renegotiated) lNegotiate encryption, MAC algorithm and lSSL Alert Protocol cryptographic keys ¡Signals an unusual condition ¡Four rounds ¡Closure alert : sender will not send anymore lUsed before any application data are ¡Error alert: fatal error results in disconnect transmitted INFSCI 2935: Introduction to Computer Security 7 INFSCI 2935: Introduction to Computer Security 8 4 ISO/OSI Model IPSec IPSec: Security at Network Layer Peer-to-peer l Set of protocols/mechanisms Application Layer Application Layer ¡ Encrypts and authenticates all traffic at the IP level l Protects all messages sent along a path Presentation Layer Presentation Layer l Intermediate host with IPSec mechanism (firewall, gateway) is called a security gateway Session Layer Session Layer ¡ Use on LANs, WANs, public, and private networks l Application independent (Transparent to user) Transport Layer Transport Layer ¡ Web browsing, telnet, ftp… l Provides at the IP level Network Layer Network Layer Network Layer ¡ Access control ¡ Connectionless integrity Data Link Layer Data Link Layer Data Link Layer ¡ Data origin authentication Physical Layer Physical Layer Physical Layer ¡ Rejection of replayed packets ¡ Data confidentiality ¡ Limited traffic analysis confidentiality Flow of bits INFSCI 2935: Introduction to Computer Security 9 INFSCI 2935: Introduction to Computer Security 10 5 Cases where IPSec can be used Cases where IPSec can be used (2) SG Internet SG Internet/ Intranet Intranet Intranet End-to -end security between two hosts End-to -end security between two hosts + two gateways Internet SG SG Internet/ SG Intranet Intranet End-to -end security between two security gateways End-to -end security between two hosts during dial-up INFSCI 2935: Introduction to Computer Security 11 INFSCI 2935: Introduction to Computer Security 12 6 IPSec Protocols Security Association (SA) l Authentication header (AH) protocol l Unidirectional relationship between peers (a sender and ¡ Message integrity a receiver) ¡ Origin authentication l Specifies the security services provided to the traffic ¡ Anti-replay services carried on the SA l Encapsulating security payload (ESP) protocol ¡ Security enhancements to a channel along a path ¡ Confidentiality ¡ Message integrity l Identified by three parameters: ¡ Origin authentication ¡ IP Destination Address ¡ Anti-replay services ¡ Security Protocol Identifier l Internet Key Exchange (IKE) l Specifies whether AH or ESP is being used ¡ Exchanging keys between entities that need to communicate over the Internet ¡ Security Parameters Index (SPI) ¡ What authentication methods to use, how long to use the keys, etc. l Specifies the security parameters associated with the SA INFSCI 2935: Introduction to Computer Security 13 INFSCI 2935: Introduction to Computer Security 14 7 Security Association (2) Security Association Databases lEach SA uses AH or ESP (not both) l IP needs to know the SAs that exist in order to provide security services ¡If both required two are SAs are created l Security Policy Database (SPD) lMultiple security associations may be used ¡ IPSec uses SPD to handle messages ¡ For each IP packet, it decides whether an IPSec service is to provide required security services provided, bypassed, or if the packet is to be discarded ¡A sequence of security associations is called l Security Association Database (SAD) ¡ Keeps track of the sequence number SA bundle ¡ AH information (keys, algorithms, lifetimes) ¡Example: We can have an AH protocol followed ¡ ESP information (keys, IVs, algorithms, lifetimes) by ESP or vice versa ¡ Lifetime of the SA ¡ Protocol mode ¡ MTU INFSCI 2935: Introduction to Computer Security 15 INFSCI 2935: Introduction to Computer Security 16 8 IPSec Modes Authentication Header (AH) parameters lTwo modes l Next header ¡ Identifies what protocol header follows Next Header ¡Transport mode l Payload length lEncapsulates IP packet data area ¡ Indicates the number of 32-bit words in Payload length the authentication header lIP Header is not protected l Security Parameters Index Security Parameters • Protection is provided for the upper layers ¡ Specifies to the receiver the algorithms, Index • Usually used in host-to-host communications type of keys, and lifetime of the keys used Sequence ¡Tunnel mode l Sequence number Number ¡ Counter that increases with each IP lEncapsulates entire IP packet in an IPSec Authentication Data packet sent from the same host to the envelope same destination and SA • Helps against traffic analysis l Authentication Data • The original IP packet is untouched in the Internet INFSCI 2935: Introduction to Computer Security 17 INFSCI 2935: Introduction to Computer Security 18 9 Preventing replay Transport Mode AH l Using 32 bit sequence numbers helps detect Internet/ replay of IP packets Intranet l The sender initializes a sequence number for every SA ¡Each succeeding IP packet within a SA increments Original IP TCP Payload Data Without IPSec the sequence number Header Header l Receiver implements a window size of W to keep track of authenticated packets Original IP Auth TCP Payload Data Header Header Header l Receiver checks the MAC to see if the packet is authentic Next Payload Seq. SPI MAC Header Length No. INFSCI 2935: Introduction to Computer Security 19 INFSCI 2935: Introduction to Computer Security 20 10 ESP – Encapsulating Security Tunnel Mode AH Payload l Creates a new header Security Parameters Internet SG in addition to the IP Index (SPI) – 32 bits Intranet header Sequence Number 32 bits l Creates a new trailer Original IP TCP Payload Data Without IPSec Payload Data Header Header l Encrypts the payload data Padding/ Next Header New IP Auth Original IP TCP Payload Data l Authenticates the Header Header Header Header security association Authentication Data Next Payload Seq. l Prevents replay SPI MAC Header Length No. INFSCI 2935: Introduction to Computer Security 21 INFSCI 2935: Introduction to Computer Security 22 11 Details of ESP Transport mode ESP l Security Parameters Index (SPI) ¡ Specifies to the receiver the algorithms, type of keys, and lifetime of the keys used l Sequence number Original IP TCP ¡ Counter that increases with each IP packet sent from the same host to Payload Data Without IPSec the same destination and SA Header Header l Payload ¡ Application data carried in the TCP segment Original IP ESP TCP ESP ESP Payload Data l Padding Header Header Header Trailer Auth ¡ 0 to 255 bytes of data to enable encryption algorithms to operate properly Encrypted ¡ To mislead sniffers from estimating the amount of data transmitted l Authentication Data Authenticated ¡ MAC created over the packet INFSCI 2935: Introduction to Computer Security 23 INFSCI 2935: Introduction to Computer Security 24 12 Tunnel mode ESP Perimeter Defense Original IP TCP lOrganization system consists of a network Payload Data Without IPSec Header Header of many host machines – ¡the system is as secure as the weakest link New IP ESP Original IP TCP ESP ESP Payload Data Header Header Header Header Trailer Auth lUse perimeter defense Encrypted ¡Define a border and use gatekeeper (firewall) Authenticated lIf host machines are scattered and need to use public network, use encryption ¡Virtual Private Networks (VPNs) INFSCI 2935: Introduction to Computer Security 25 INFSCI 2935: Introduction to Computer