Download presentation
Presentation is loading. Please wait.
1
IP Security
2
IPSEC Objectives n Band-aid for IPv4 u Spoofing a problem u Not designed with security or authentication in mind n IP layer mechanism for IPv4 and IPv6 u Not all applications need to be security aware u Mandatory in IPv6, optional in IPv4 n Can be transparent to applications and users n Resistant to bypass
3
IPSec Uses
4
Security Associations n A one-way relationship between sender & receiver that affords security for traffic flow n Can be between u A pair of hosts u A host and a security gateway u A pair of security gateways n Two basic protocols u Authentication headers (AH) u Encapsulating security payload (ESP)
5
Architecture & Concepts n Tunnel vs. Transport mode n Security association (SA) u Security parameter index (SPI) u Security policy database (SPD) u SA database (SAD) n Authentication header (AH) n Encapsulating security payload (ESP) n Key management
6
AB Encrypted Tunnel Gateway 1Gateway 2 New IP Header AH or ESP Header TCPDataOrig IP Header Encrypted Unencrypted Transport Mode vs. Tunnel Mode n Transport mode: host -> host n Tunnel mode: host->gateway or gateway->gateway
7
Transport Mode n ESP protects higher layer payload only n AH can protect IP headers as well as higher layer payload IP header IP options IPSec header Higher layer protocol ESP AH Real IP destination
8
Tunnel Mode n ESP applies only to the tunneled packet n AH can be applied to portions of the outer header Outer IP header Inner IP header IPSec header Higher layer protocol ESP AH Real IP destination Destination IPSec entity
9
Security Association - SA n Defined by 3 parameters: u Security Parameters Index (SPI) u IP Destination Address u Security Protocol Identifier n Have a database of Security Associations n Determine IPSec processing for senders n Determine IPSec decoding for destination n SAs are not fixed! Generated and customized per traffic flows
10
Security Parameters Index - SPI n Can be up to 32 bits large n The SPI allows the destination to select the correct SA under which the received packet will be processed u According to the agreement with the sender u The SPI is sent with the packet by the sender n SPI + Dest IP address + IPSec Protocol (AH or ESP) uniquely identifies a SA
11
SA Database - SAD n Holds parameters for each SA u Lifetime of this SA u AH and ESP information u Tunnel or transport mode n Every host or gateway participating in IPSec has their own SA database
12
Security Policy Database - SPD n What traffic to protect? n Policy entries define which SA or SA bundles to use on IP traffic n Each host or gateway has their own SPD n Index into SPD by Selector fields u Dest IP, Source IP, Transport Protocol, IPSec Protocol, Source & Dest Ports, …
13
SPD Entry Actions n Discard u Do not let in or out n Bypass u Outbound: do not apply IPSec u Inbound: do not expect IPSec n Protect – will point to an SA or SA bundle u Outbound: apply security u Inbound: check that security must have been applied
14
SPD Protect Action n If the SA does not exist… u Outbound processing: use IKE to generate SA dynamically u Inbound processing: drop packet
15
Is it for IPSec? If so, which policy entry to select? … SPD (Policy) … SA Database IP Packet Outbound packet (on A) AB SPI & IPSec Packet Send to B Determine the SA and its SPI IPSec processing Outbound Processing
16
Use SPI to index the SAD … SA Database Original IP Packet SPI & Packet Inbound packet (on B) AB From A Inbound Processing … SPD (Policy) Was packet properly secured? “un-process”
17
Architecture & Concepts n Tunnel vs. Transport mode n Security association (SA) u Security parameter index (SPI) u Security policy database (SPD) u SA database (SAD) n Authentication header (AH) n Encapsulating security payload (ESP) n Key management
18
Authenticated Header n Data integrity u Entire packet has not been tampered with n Authentication u Can “trust” IP address source u Use keyed MAC to authenticate F Symmetric encryption, e.g, DES F One-way hash functions with a shared secret key, e.g, HMAC-MD5-96 or HMAC-SHA-1-96 n Anti-replay feature n Integrity check value
19
… SAD SPI Sequence Number ICV Next Header (TCP/UDP) Payload Length Reserved IPSec Authenticated Header Length of the authentication header
20
Integrity Check Value - ICV n Keyed Message authentication code (MAC) calculated over u IP header field that do not change or are predictable F Source IP address, destination IP, header length, etc. F Prevent spoofing F Mutable fields: time-to-live (TTL), IP header checksum, etc. u IPSec protocol header except the ICV value field u Upper-level data n Code may be truncated to first 96 bits
21
AH: Tunnel and Transport Mode n Original n Transport Mode u Cover most of the original packet n Tunnel Mode u Cover entire original packet
22
Encapsulating Security Payload (ESP) n Provide message content confidentiality n Provide limited traffic flow confidentiality n Can optionally provide the same authentication services as AH n Supports range of ciphers, modes, padding u Incl. DES, Triple-DES, RC5, IDEA, CAST etc u A variant of DES most common u Pad to meet blocksize, for traffic flow
23
ESP: Tunnel and Transport Mode n Original n Transport Mode u Good for host to host traffic n Tunnel Mode u Good for VPNs, gateway to gateway security
24
Outbound Packet Processing n Form ESP header u Security parameter index (SPI) u Sequence number n Pad as necessary n Encrypt result [payload, padding, pad length, next header] n Apply authentication (optional) u Allow rapid detection of replayed/bogus packets u Allow potential parallel processing - decryption & verifying authentication code u Integrity Check Value (ICV) includes whole ESP packet minus authentication data field
25
SPI Sequence Number Original IP Header Integrity Check Value Authentication coverage Encrypted Payload (TCP Header and Data) Variable Length Pad Length Padding (0-255 bytes) Next Header ESP Transport Example
26
Inbound Packet Processing... n Sequence number checking u Duplicates are rejected! n Packet decryption u Decrypt quantity [ESP payload,padding,pad length,next header] per SA specification u Processing (stripping) padding per encryption algorithm u Reconstruct the original IP datagram n Authentication verification (option)
27
Architecture & Concepts n Tunnel vs. Transport mode n Security association (SA) u Security parameter index (SPI) u Security policy database (SPD) u SA database (SAD) n Authentication header (AH) n Encapsulating security payload (ESP) n Key management
28
Key Management n Handles key generation & distribution n Typically need 2 pairs of keys u 2 per direction for AH & ESP n Manual key management u Sysadmin manually configures every system n Automated key management u Automated system for on demand creation of keys for SA’s in large systems
29
NATs n Network address translation = local, LAN-specific address space translated to small number of globally routable IP addresses n Motivation: u Scarce address space F cost: about $9k/year for up to 262,000 addresses u Security: prevent unsolicited inbound requests n Prevalence of NATs u Claim: 50% of broadband users are behind NATs u All Linksys/D-Link/Netgear home routers are NATs
30
NAT types n All use net-10/8 (10.*.*.*) or 192.168/16 n Address translation n Address-and-port translation (NAPT) u most common form today, still called NAT u one external (global) IP address n Change IP header and TCP/UDP headers n Will it work with IPSec?
31
NAT Example IAP’s Point of Presence Router with NAT External IP: 68.40.162.3 Internal IP: 192.168.0.0 Router assigns internal IPs to hosts on LAN : A: 192.168.0.100 B: 192.168.0.101 C: 192.168.0.102 ABC Messages sent between host B to another host on the Internet Host B original source socket: 192.168.0.101 port 1341 Host B translated socket: 68.40.162.3 port 5280
32
Backup Slides
33
SA Bundle n More than 1 SA can apply to a packet n Example: ESP does not authenticate new IP header. How to authenticate? u Use SA to apply ESP w/o authentication to original packet u Use 2 nd SA to apply AH
34
Outbound Packet Processing... n Integrity Check Value (ICV) calculation u ICV includes whole ESP packet minus authentication data field u Implicit padding of ‘0’s between next header and authentication data is used to satisfy block size requirement for ICV algorithm
35
Inbound Packet Processing n Sequence number checking u Anti-replay is used only if authentication is selected u Sequence number should be the first ESP check on a packet upon looking up an SA u Duplicates are rejected! 0 Sliding Window size >= 32 reject Check bitmap, verify if new verify
36
Anti-replay Feature n Optional n Information to enforce held in SA entry n Sequence number counter - 32 bit for outgoing IPSec packets n Anti-replay window u 32-bit u Bit-map for detecting replayed packets
37
Anti-replay Sliding Window n Window should not be advanced until the packet has been authenticated n Without authentication, malicious packets with large sequence numbers can advance window unnecessarily u Valid packets would be dropped!
38
ESP Processing - Header Location... n Tunnel mode IPv4 and IPv6 New IP hdr Orig IP hdr TCPData ESP trailer ESP Auth ESP hdr New ext hdr New IP hdr TCPData ESP trailer ESP Auth Orig IP hdr ESP hdr Orig ext hdr IPv4 IPv6
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.