Network Security Chapter 4 IP Security Slides by
Network Security Chapter 4 IP Security Slides by H. Johnson & S. Malladi- Modified & Translated by Sukchatri P.
2 University of Phayao 01/03/2021 Outline • Need for Internet Security • Internetworking and Internet Protocols (Appendix 6 A) • IP Security Overview • IP Security Architecture • Authentication Header • Encapsulating Security Payload • Combinations of Security Associations • Key Management
3 University of Phayao Need for Internet Security 01/03/2021 • Based on public-domain standards ▫ Potential intruders know how things work • The Internet is ever-increasingly pervasive ▫ No need for specialist tools to get access • Applications (e. g. web servers and browsers) are extensible ▫ Now used for much more than protocol designers envisaged originally • TCP/IP weaknesses ▫ e. g. easy to masquerade as someone else
4 University of Phayao 01/03/2021 Why secure at the IP layer? • Can put security in place once, in a consistent manner, for multiple applications • All applications are secured, without the need for the user to be involved • Central management of security, including access policy, keys, algorithms, etc.
5 University of Phayao 01/03/2021 Independent of Applications and Transport Diverse Apps Email Web TCP Game DB queries SNMP UDP Secured IP FTP IM Other Transport
6 University of Phayao 01/03/2021 Internet Protocols • Internet Protocol (IP)provides functionality for interconnecting end systems across multiple networks. • IPv 4 and IPv 6 • Routers provide connections between networks • Data is encapsulated in an IP Protocol Data Unit (PDU) for transmission
7 University of Phayao 01/03/2021 Uses of IPsec • Virtual Private Network (VPN) establishment ▫ For connecting remote offices and users using public Internet • Low-cost remote access ▫ e. g. teleworker gains secure access to company network via local call to ISP • Extranet connectivity ▫ Secure communication with partners, suppliers, etc.
8 OSI 7 Layer Model University of Phayao 01/03/2021 • 7 Application. HTTP, SMTP, SNMP, FTP, Telnet, SIP, SSH, NFS, , Whois, • 6 Presentation. XDR, ASN. 1, SMB, AFP, NCP • 5 Session ASAP, TLS, SSH, ISO 8327 / CCITT X. 225, RPC, Net. BIOS, ASP, Winsock, BSD sockets • 4 Transport TCP, UDP, RTP, SCTP, SPX, ATP, IL • 3 Network IP, ICMP, IPX, BGP, OSPF, RIP, ARP, X. 25 • 2 Data Link Ethernet, Token ring, HDLC, Frame relay, ISDN, ATM, 802. 11 Wi. Fi, FDDI, PPP • 1 Physical wire, radio, fiber optic • (Please Do Not Throw Sausage Pizza Away…)
9 University of Phayao 01/03/2021 5 Layer Internet Protocol Model 5. Application 4. Transport 3. Internet 2. Network Interface (like Data Link) 1. Physical TCP, UDP IP Logical Link Control (LLC) Media Access Control (MAC)
10 TCP/IP Example University of Phayao 01/03/2021
11 University of Phayao 01/03/2021 IP Security Overview • Application–specific security mechanisms ▫ E-mail (S/MIME, PGP) ▫ Client-server (Kerberos) ▫ Web Access ( Secure sockets) • IP level security (IPSec) ▫ Authentication (received unaltered from source in header) ▫ Confidentiality (encrypted to prevent eavesdropping) ▫ Key Management (secure exchange of keys)
12 University of Phayao 01/03/2021 IP Security Overview IPSec is not a single protocol. Instead, IPSec provides a set of security algorithms plus a general framework that allows a pair of communicating entities to use whichever algorithms provide security appropriate for the communication.
13 University of Phayao 01/03/2021 IP Security Overview • Applications of IPSec ▫ Secure branch office connectivity over the Internet ▫ Secure remote access over the Internet ▫ Establishing extranet and intranet connectivity with partners ▫ Enhancing electronic commerce security
14 University of Phayao IP Security Scenario 01/03/2021
15 University of Phayao 01/03/2021 IP Security Overview • Benefits of IPSec ▫ Transparent to applications (below transport layer (TCP, UDP) ▫ Provide security for individual users • IPSec can assure that: ▫ A router or neighbor advertisement comes from an authorized router ▫ A redirect message comes from the router to which the initial packet was sent ▫ A routing update is not forged
16 University of Phayao 01/03/2021 IP Security Architecture • IPSec documents: ▫ RFC 2401: An overview of security architecture ▫ RFC 2402: Description of a packet encryption extension to IPv 4 and IPv 6 ▫ RFC 2406: Description of a packet emcryption extension to IPv 4 and IPv 6 ▫ RFC 2408: Specification of key managament capabilities
17 University of Phayao 01/03/2021 IPsec Architecture • Two alternative protocols: ▫ Authentication Header (AH) Provides authentication but not confidentiality Adds extra field to traditional IP packet; used to verify authenticity of the packet ▫ Encapsulating Security Payload (ESP) Provides packet encryption and, optionally, authentication Content of IP packet is encrypted and encapsulated between header and trailer fields
18 University of Phayao 01/03/2021 IPSec Document Overview
19 University of Phayao 01/03/2021 IPSec Services • IPSec provides security services at the IP layer by enabling a system to select required protocols, determine the algorithm(s) to use, and to put in place the cryptographic keys. • Two protocols are needed: ▫ Authentication Header (AH) ▫ Encapsulating Security Payload (ESP)
20 University of Phayao IPSec Services • • • Access Control Connectionless integrity Data origin authentication Rejection of replayed packets Confidentiality (encryption) Limited traffic flow confidentiallity 01/03/2021
21 University of Phayao 01/03/2021 Security Association (SA) • In order to communicate, each pair of hosts must set up SA with each other • Acts as virtual connection for which various parameters are set: ▫ Type of protection ▫ Algorithms ▫ Keys ▫ … • Specifies one-way relationship • For either AH or ESP, but not both
22 University of Phayao 01/03/2021 Security Associations (SA) • A one way relationship between a sender and a receiver. • Identified by three parameters: ▫ Security Parameter Index (SPI) ▫ IP Destination address ▫ Security Protocol Identifier
23 University of Phayao 01/03/2021 Security Association (SA) • Each SA uniquely identified by: ▫ Security Parameters Index (SPI) 32 -bit string assigned to this SA (local meaning only) ▫ IP destination address of packets May be end user system, or firewall or router ▫ Choice of AH or ESP • For each IP packet, governing SA is identified by: ▫ Destination IP address in packet header ▫ SPI in extension header (AH or ESP)
24 University of Phayao Before applying AH 01/03/2021
25 University of Phayao 01/03/2021 IPsec modes • Transport Mode: ▫ Protects payload only i. e. protects original data and upper-level protocols ▫ Typically used for end-to-end communication
26 University of Phayao 01/03/2021 Transport Mode Security
27 University of Phayao Transport Mode (AH Authentication) 01/03/2021
28 University of Phayao 01/03/2021 IPsec modes • Tunnel Mode: ▫ Protects entire IP packet Including the IP header ▫ Typically used for connecting secure gateways (firewalls or routers that implement IPsec) ▫ Hosts don’t need to be IPsec-enabled
29 Tunnel Mode Security University of Phayao 01/03/2021
30 University of Phayao Tunnel Mode (AH Authentication) 01/03/2021
31 Authentication Header (AH) University of Phayao 01/03/2021 • Adds extra field to traditional IP packet • This is used to verify authenticity & integrity of the packet Before applying AH: Authenticated (Data + parts of IP header) Transport Mode: Ø data is authenticated, as well as parts of IP header Tunnel Mode: Ø entire original packet is authenticated + parts of new header Authenticated (Data + orig IP header + parts of new header)
32 University of Phayao 01/03/2021 Authentication Header • Provides support for data integrity and authentication (MAC code) of IP packets. • Guards against replay attacks. • Parties share a secret key, K
33 University of Phayao 01/03/2021 Authentication Header (AH) • Protection against replay attack with use of sequence number • Why have an Authentication-only protocol (AH)? ▫ May be used where export/import/use of encryption is restricted ▫ Faster implementation ▫ Receiver can choose whether to expend the effort to verify authenticity/integrity
34 University of Phayao 01/03/2021 Encapsulating Security Payload (ESP) • Content of IP packet is encrypted and encapsulated between header and trailer fields. • Authentication data optionally added
35 University of Phayao 01/03/2021 Encapsulating Security Payload (ESP) Original IP packet: Transport Mode: Ø only data is encrypted & authenticated Tunnel Mode: Ø entire packet encrypted & authenticated Encrypted Authenticated (optionally)
36 ESP Format University of Phayao 01/03/2021
37 University of Phayao 01/03/2021 Transport Mode Tunnel Mode SA SA AH Authenticates IP payload and selected portions of IP header and IPv 6 extension headers Authenticates entire inner IP packet plus selected portions of outer IP header ESP Encrypts IP payload any IPv 6 extesion header Encrypts inner IP packet ESP with authentication Encrypts IP payload and Encrypts inner IP any IPv 6 extesion packet. Authenticates header. Authenticates IP inner IP packet. payload but no IP header Main difference is that Tunnel mode secures the IP header as well as the payload
38 University of Phayao 01/03/2021 End-to-end versus End-to-Intermediate Authentication
39 University of Phayao 01/03/2021 Encapsulating Security Payload • ESP provides confidentiality services
40 University of Phayao 01/03/2021 Encryption and Authentication Algorithms • Encryption: ▫ ▫ ▫ Three-key triple DES RC 5 IDEA Three-key triple IDEA CAST Blowfish • Authentication: ▫ HMAC-MD 5 -96 ▫ HMAC-SHA-1 -96
41 University of Phayao 01/03/2021 ESP Encryption and Authentication
42 University of Phayao 01/03/2021 ESP Encryption and Authentication
43 University of Phayao 01/03/2021 Combinations of Security Associations
44 University of Phayao 01/03/2021 Combinations of Security Associations
45 University of Phayao 01/03/2021 Combinations of Security Associations
46 University of Phayao 01/03/2021 Combinations of Security Associations
47 University of Phayao 01/03/2021 Key Management • Two types: ▫ Manual ▫ Automated Oakley Key Determination Protocol( a refinement of the Difffie-Hell. Project Objectives and Plans man exchange algorithm) Internet Security Association and Key Management Protocol (ISAKMP)
48 University of Phayao 01/03/2021 Key Management in IPsec • Generation and distribution of secret keys • Manual ▫ System admin configures keys (doesn’t scale well) • Automated ▫ Oakley Key Determination Protocol based on Diffie-Hellman ▫ ISAKMP & IKE – Internet Security Association and Key Management Protocol & Internet Key Exchange ▫ Default is referred to as ISAKMP/Oakley
49 University of Phayao 01/03/2021 Oakley • Key determination protocol, based on Diffie-Hellman algorithm with added security • Secret keys are created only when needed • Key exchange requires no pre-exisitng structure, only an agreement on global parameters • Three authentication methods: ▫ Digital signatures ▫ Public-key encryption ▫ Symmetric-key encryption
50 University of Phayao 01/03/2021 Oakley Algorithm • Characteristics: ▫ uses a method known as cookies to thwart clogging attacks (See next slide) ▫ enables two parties to negotiate a group ▫ uses nonces to ensure against replay attacks ▫ enables the exchange of Diffie-Hellman public key values ▫ authenticates Diffie-Hellman exchange to thwart “man-in-the-middle” attack
51 University of Phayao 01/03/2021 Clogging Attacks • An opponent forges the source address of a legitimate user and send a public key to the victim. • The victim computes the secret key. • Repeated messages can clog the victim’s system with useless work. • Cookie exchange requires that each side send a pseudorandom number (cookie) in the initial message, which the other side acknowledges and repeats in the first message of the Diffie-Hellman key exchange. • If the source address was forged, the opponent gets no answer.
52 University of Phayao 01/03/2021 ISAKMP • Internet Security Association and Key Management Protocol (ISAKMP) ▫ provides framework for key management and specific protocol supports ▫ defines procedures and packet formats to establish, modify and delete security associations. ▫ Provides consistent independent of the key exchange protocol, encryption algorithm and authentication mechanism
53 ISAKMP University of Phayao 01/03/2021
54 University of Phayao 01/03/2021 IPsec Benefits • Provides a level of security for all applications. ▫ Allows deployment of new/emerging applications that may not have their own security. • Transparent to transport layer • Transparent to end-users ▫ No need for training, key issue, key revocation, etc. • Can be provided to individual users where needed (e. g. offsite workers) • Extensible to new, stronger, cryptographic methods as these become available
55 University of Phayao 01/03/2021 IPsec Drawbacks • Processing performance overhead ▫ Protection is applied to all traffic, though only a small portion may be security-sensitive • Blocks access to non-IPsec hosts • Hosts must have security association ▫ Not great for short-lived connections • Requirement for pair-wise SA limits usefulness for arbitrary Internet-based transactions • Not practical for broadcast
56 University of Phayao 01/03/2021 Note on VPN concept • Private Network ▫ A set of computers connected together and protected from the Internet (usually with a firewall) ▫ Traditionally made up of LAN(s) within individual locations. If needed, wide area (e. g. inter-branch) connection is made by secure leased telecommunications lines.
57 University of Phayao 01/03/2021 Virtual Private Networks (a) A leased-line private network. (b) A virtual private
58 University of Phayao 01/03/2021 IPv 4 Overview • IP header is at least 20 octets (160 bits) • Uses 32 bit source and destination addressesinsufficient to accommodate today’s demand • Not well suited to today’s high speeds, video and multimedia
59 University of Phayao IPv 4 Header 01/03/2021
60 University of Phayao 01/03/2021 IPv 6 Overview • New enhanced version of Internet Protocol ▫ Current dominant version is IPv 4 ▫ Transition is under way but slow, maybe decades • Expands addresses to 128 bits ▫ 430, 000, 000 for every square inch of earth’s surface! ▫ Solves IPv 4 problem of insufficient address space • Quality of Service Typing • Autoconfiguration • Dynamic address renumbering, tunnelling, translation • Accomodates higher speeds, mix of data streams, multimedia and new technologies
61 University of Phayao 01/03/2021 IPv 6 Security – IPsec mandated • IPsec is mandated in IPv 6 ▫ This means that all implementations (i. e. hosts, routers, etc) must have IPsec capability to be considered as IPv 6 -conformant • When (If? ) IPv 6 is in widespread use, this means that IPsec will be installed everywhere ▫ At the moment, IPsec is more common in network devices (routers, etc) than user hosts, but this would change with IPv 6 • All hosts having IPsec => real end-to-end security possible
62 University of Phayao IPv 6 Header 01/03/2021
63 University of Phayao 01/03/2021 IPv 6 Security • Enough IP addressess for every imaginable device + Real end-to-end security = Ability to securely communicate from anything to anything … and hopefully avoid the following:
64 University of Phayao 01/03/2021
65 University of Phayao 01/03/2021 Recommended Reading • Comer, D. Internetworking with TCP/IP, Volume I: Principles, Protocols and Architecture. Prentic Hall, 1995 • Stevens, W. TCP/IP Illustrated, Volume 1: The Protocols. Addison-Wesley, 1994
- Slides: 65