Presentation is loading. Please wait.

Presentation is loading. Please wait.

IP Security. n Have a range of application specific security mechanisms u eg. S/MIME, PGP, Kerberos, SSL/HTTPS n However there are security concerns that.

Similar presentations


Presentation on theme: "IP Security. n Have a range of application specific security mechanisms u eg. S/MIME, PGP, Kerberos, SSL/HTTPS n However there are security concerns that."— Presentation transcript:

1 IP Security

2 n Have a range of application specific security mechanisms u eg. S/MIME, PGP, Kerberos, SSL/HTTPS n However there are security concerns that cut across protocol layers n Would like security implemented by the network for all applications

3 IPSec n General IP Security mechanisms n Provides u authentication u confidentiality u key management n Applicable to use over LANs, across public & private WANs, & for the Internet

4 IPSec Uses Transparency

5 Benefits of IPSec n In a firewall/router provides strong security to all traffic crossing the perimeter n In a firewall/router is resistant to bypass n Is below transport layer, hence transparent to applications n Can be transparent to end users n Can provide security for individual users n Secures routing architecture

6 IP Security Architecture n Specification is quite complex n Defined in numerous RFC’s u incl. RFC 2401/2402/2406/2408 u many others, grouped by category n Mandatory in IPv6, optional in IPv4 n Have two security header extensions:  Authentication Header (AH)  Encapsulating Security Payload (ESP)

7 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 Practical Issues w/ NAT

8 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

9 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

10 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

11 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

12 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

13 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

14 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, …

15 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

16 SPD Protect Action n If the SA does not exist… u Outbound processing: use IKE to generate SA dynamically u Inbound processing: drop packet

17 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

18 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”

19 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 Practical Issues w/ NAT

20 Authenticated Header n Data integrity u Entire packet has not been tampered with n Authentication u Can “trust” IP address source u Use MAC to authenticate F Symmetric encryption, e.g, DES F One-way hash functions, e.g, HMAC-MD5-96 or HMAC- SHA-1-96 n Anti-replay feature n Integrity check value

21 … SAD SPI Sequence Number ICV Next Header (TCP/UDP) Payload Length Reserved IPSec Authenticated Header Length of the authentication header

22 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 excluded: e.g., 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

23 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

24 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

25 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

26 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 Integrity Check Value (ICV) includes whole ESP packet minus authentication data field

27 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

28 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 (optional) u Allow potential parallel processing - decryption & verifying authentication code

29 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 Practical Issues w/ NAT

30 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 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

31 NAT types n All use net-10/8 (10.*.*.*) or /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

32 NAT Example IAP’s Point of Presence Router with NAT External IP: Internal IP: Router assigns internal IPs to hosts on LAN : A: B: C: ABC Messages sent between host B to another host on the Internet Host B original source socket: port 1341 Host B translated socket: port 5280

33 Will IPSec Work with NAT ? n Consider both AH and ESP protocols. n Consider both transport and tunnel modes. For tunnel mode, consider the following two cases u Sender – NAT – IPSec Gateway 1 – IPSec Gateway 2 – Receiver u Sender – IPSec Gateway 1 – NAT – IPSec Gateway 2 – Receiver n What about w/o port # translation?

34 Backup Slides

35 Combining Security Associations n SA’s can implement either AH or ESP n to implement both need to combine SA’s  form a security association bundle  may terminate at different or same endpoints  combined by  transport adjacency  iterated tunneling n issue of authentication & encryption order

36 Combining Security Associations

37 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

38 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

39 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

40 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

41 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!

42 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

43 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


Download ppt "IP Security. n Have a range of application specific security mechanisms u eg. S/MIME, PGP, Kerberos, SSL/HTTPS n However there are security concerns that."

Similar presentations


Ads by Google