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 VPN n n Application-level VPN u u E.g., tunnel through ssh u u Analogous to app-level gateways n n IPSec-based VPN u u Analogous to packet-filtering firewalls

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

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

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 IPSec Pros n n Hides the identity of your network n n Provides secure channel: confidentiality, authenticity, and integrity n n Connects sites (e.g., branch offices) with a cost- effective secure network compared with leased lines n n Allows user to work from home and mobile hosts

12 IPSec Cons n n A single failure in the path disconnect the entire network. Also cause performance bottlenecks. n n Incompatible with NAT/PAT depending on the architecture n n Tunneled traffic is undetected by IDS n n VPN gateways might be compromised which leads to uncovering protected data

13 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

14 Authentication Header n Data integrity u Entire packet has not been tampered with n Authentication u Can “trust” IP address source n Anti-replay feature n Integrity check value

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

16 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

17 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

18 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 Pad to meet blocksize, for traffic flow

19 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

20 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

21 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

22 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

23 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

24 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

25 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

26 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

27 Will IPSec Work with NAT ? n Consider both AH and ESP protocols. n For NAT, only source IP changes (no port # change) 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 with port # translation? n n Practical solutions for NAT to work w/ IPSec u u IPSec – NAC Compatibility Requirements: RFC 3715 u u UDP Encapsulation of IPsec ESP Packets: RFC 3948

28 Backup Slides

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 Security Association - SA 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

31 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

32 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

33 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, IPSec Protocol, Transport Protocol, Source & Dest Ports, …

34 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, IPSec Protocol, Transport Protocol, Source & Dest Ports, …

35 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

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

37 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

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

39 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

40 Combining Security Associations

41 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

42 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

43 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

44 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

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

46 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

47 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