1 / 76


IPSec. Applications of IPSec. IPSec provides the capability to secure communications across a LAN, across private and public WANs, and across the Internet. Examples of its use include: Secure branch office connectivity over the Internet Secure remote access over the Internet .

Download Presentation


An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.


Presentation Transcript

  1. IPSec

  2. Applications of IPSec • IPSec provides the capability to secure communications across a LAN, across private and public WANs, and across the Internet. Examples of its use include: • Secure branch office connectivity over the Internet • Secure remote access over the Internet

  3. IPSec Explained With thanks to William Stallings and,

  4. Applications of IPSec • Establishment of extranet and intranet connectivity with partners • Enhancement of electronic commerce security • encrypt or authenticate all traffic at the IP level

  5. Applications of IPSec • Using IPSec all distributed applications can be secured, • Remote logon, • client/server, • e-mail, • file transfer, • Web access • etc.

  6. Applications of IPSec

  7. Where can IPSec be used • These protocols can operate in • networking devices, • such as a router or firewall • or they may operate directly on the workstation or server.

  8. How can IPSec be used • Secure Communications between devices • Workstation to Workstation • Protection against data changes • Accidental or Intentional • Contents can be hidden • Secure communicatoins through IPSec tunnels

  9. Benefits of IPSec • The benefits of IPSec include: • Strong security that can be applied to all traffic crossing the perimeter. • Transparent to applications. • No need to change software on a user or server system • When IPSec is implemented in a router or firewall

  10. Benefits of IPSec • The benefits of IPSec include: • IPSec can be transparent to end users. • There is no need to train users on security mechanisms • PSec can provide security for individual

  11. Is IPSec the Right Choice? • For transport level (personal) services IPSec must be a part of the network code deployed on all participating platforms. • Individual protocols may implement their own security: • E-Mail: PGP • Web: SSL • E-Commerce: SET • Etc. • As a tunnel protocol it is available to all services on the network.

  12. The Scope of IPSec • IPSec provides three main facilities • An authentication-only function, • Referred to as Authentication Header (AH) • Acombined authentication/ encryption function • Called Encapsulating Security Payload (ESP) • A key exchange function. • IKE (ISAKMP / Oakley)

  13. The Scope of IPSec • Both authentication and encryption are generally desired, • (1) assure that unauthorized users do not penetrate the virtual private network • (2) assure that eavesdroppers on the Internet cannot read messages sent over the virtual private network. • Because both features are generally desirable, most implementations are likely to use ESP rather than AH.

  14. Security Associations (SA) • Used for both the authentication (AH) and confidentiality (ESP) • A one-way relationship between a sender and a receiver that affords security services to the traffic carried on it. • If a peer relationship is needed, for two-way secure exchange, then two security associations are required. • Security services are afforded to an SA for the use of AH or ESP, but not both.

  15. Security Associations (SA) • Each SA is uniquely identified by three parameters: • Security Parameters Index (SPI) • IP destination address • Security protocol identifier

  16. Security Associations (SA) • Security Parameters Index (SPI) • The SPI is a bit string assigned to the SA that has local significance only. • The SPI is carried in AH and ESP headers to enable the receiving system to select the SA under which a received packet will be processed.

  17. Security Associations (SA) • IP destination address • The IP address of the destination endpoint of the SA • May be an end-user system • Or, a network system such as a firewall or router. • Currently, only unicast addresses are allowed

  18. Security Associations (SA) • Security Protocol Identifier • Indicates which IPSec protocol is in use on the SA • AH (Authentication only) • ESP (complete encryption and possibly Authentication)

  19. Security Associations (SA) • For any IP packet, the security association is uniquely identified by • the destination address • SPI in the enclosed extension header (AH or ESP).

  20. Security Associations (SA) • IPSec includes a security association database • The database defines the parameters associated with each SA

  21. Security Associations (SA) • Each SA is defined by (contains): • Sequence number counter • Sequence counter overflow • Anti-replay window • AH information • ESP information • Lifetime of this security association • IPSec protocol mode • Path MTU

  22. Security Associations (SA) • Sequence number counter • A 32-bit value used to generate the sequence number field in AH or ESP headers • Sequence counter overflow • A flag indicating whether overflow of the sequence number counter should generate an auditable event and prevent further transmission of packets on this SA • Anti-replay window • Used to determine whether an inbound AH or ESP packet is a replay, by defining a sliding window within which the sequence number must fall

  23. Security Associations (SA) • AH information • Authentication algorithm, keys, key lifetimes, and related parameters being used with AH • ESP information • Encryption and authentication algorithm, keys, initialization values, key lifetimes, and related parameters being used with ESP • IPSec protocol mode • Tunnel, transport, or wildcard (required for all implementations)

  24. Security Associations (SA) • Lifetime of this security association • A time interval or byte count after which an SA must be replaced with a new SA (and new SPI) or terminated, plus an indication of which of these actions should occur • Path MTU • Any observed path maximum transmission unit (maximum size of a packet that can be transmitted without fragmentation) and aging variables (required for all implementations)

  25. Security Associations (SA) • The key management mechanism that is used to distribute keys is coupled to the authentication and privacy mechanisms only by way of the Security Parameters Index. • Therefore, authentication and privacy are specified independent of any specific key management mechanism.

  26. Authentication Header (AH) • Provides support for data integrity and authentication of IP packets • Ensures that content changes of a packet in transit can be detected • Enables an end system or network device to authenticate the user or application and filter traffic accordingly • Prevents the address spoofing attacks • Guards against the replay attack

  27. IPSec Authentication Header

  28. Authentication Header (AH) • Authentication is based on the use of a Message Authentication Code (MAC) • The two parties must share a secret key. • Uses the following elements to guarantee data integrity • Payload length • SPI • Sequence number • Integrity Check Value (ICV) or Message Authentication Code (MAC)

  29. Anti-Replay Service • A replay attack is one in which an attacker obtains a copy of an authenticated packet and later transmits it to the intended destination. • The receipt of duplicate, authenticated IP packets may disrupt service in some way or may have some other undesired consequence. • The Sequence Number field is designed to thwart such attacks.

  30. Anti-Replay Service • When a new SA is established, the sender initializes a sequence number counter to 0 • Each time that a packet is sent on this SA, the sender increments the counter and places the value in the Sequence Number field • Thus, the first value to be used is 1 • If anti-replay is enabled (the default), the sender must not allow the sequence number to cycle past 232 – 1 back to zero • Otherwise, there would be multiple valid packets with the same sequence number • If the limit of 232 – 1 is reached, the sender should terminate this SA, and negotiate a new SA with a new key

  31. Anti-Replay Service • Because IP is a connectionless, unreliable service, the protocol does not guarantee that packets will be delivered in order and does not guarantee that all packets will be delivered • Therefore, the IPSec authentication document dictates that the receiver should implement a window of size W, with a default of W = 64 • The protocol describes means to determine that a sequence number is correct in respect to it's position in or above the window

  32. Message Authentication Code • Uses an algorithm known as HMAC • HMAC takes as input a portion of the message and a secret key and produces a MAC as output • This MAC value is stored in the Authentication Data field of the AH header • The calculation takes place over the entire enclosed TCP segment plus the authentication header • When this IP packet is received at the destination, the same calculation is performed using the same key • If the calculated MAC equals the value of the received MAC, then the packet is assumed to be authentic

  33. Message Authentication Code • The authentication data field is calculated over: • IP header fields that either do not change in transit (immutable) or that are predictable in value upon arrival at the endpoint for the AH SA • The AH header other than the Authentication Data field • The entire upper-level protocol data, which is assumed to be immutable in transit (for instance, a TCP segment or an inner IP packet in tunnel mode)

  34. Message Authentication Code • For IPv4, examples of immutable fields are • Internet Header Length • Source Address. • An example of a mutable but predictable field is the Destination Address

  35. Encapsulating Security Payload (ESP) • Provides confidentiality service, including • message contents and limited traffic flow confidentiality • As an optional feature, ESP can also provide a authentication services like AH

  36. IPSec ESP Format

  37. Encapsulating Security Payload (ESP) • Security Prameters Index (32bits) • Sequence Number (32 bits) • Payload Data (variable) • Padding (0–255 bytes) • Pad Length (8 bits) • Next Header (8 bits) • Authentication Data (variable

  38. Encapsulating Security Payload (ESP) • Security Prameters Index (32bits) • Identifies a security association • Sequence Number (32 bits) • A monotonically increasing counter value. • Payload Data (variable) • A transport-level segment (transport mode) or IP packet (tunnel mode) that is protected by encryption.

  39. Encapsulating Security Payload (ESP) • Padding (0–255 bytes) • Extra bytes that may be required if the encryption algorithm requires the plaintext to be a multiple of some number of octets • Pad Length (8 bits) • Indicates the number of pad bytes immediately preceding this field

  40. Encapsulating Security Payload (ESP) • Next Header (8 bits) • Identifies the type of data contained in the payload data field by identifying the first header in that payload (for example, an upper-layer protocol such as TCP) • Authentication Data (variable) • A variable-length field (must be an integral number of 32-bit words) that contains the integrity check value computed over the ESP packet minus the Authentication Data field

  41. Encryption and Authentication Algorithms • The Payload Data, Padding, Pad Length, and Next Header fields are encrypted by the ESP service. • The current IPSec specification dictates that a compliant implementation must support the Data Encryption Standard (DES).

  42. Encryption and Authentication Algorithms • A number of other algorithms have been assigned identifiers and could, therefore, be used for encryption; • These include • Three-key Triple DES • RC5 • International Data Encryption Algorithm (IDEA) • Three-key Triple IDEA • CAST • Blowfish

  43. Transport and Tunnel Modes • AH and ESP each support two modes of use • Transport mode • Tunnel mode

  44. Transport and Tunnel Modes Orig IP Header Original IP Packet IPv4 TCP Data Authenticated Encrypted ESP Trlr Orig IP Header ESP Auth ESP Hdr IPv4 Data TCP Transport Mode Authenticated Encrypted Orig IP Header New IP Header ESP Trlr ESP Auth ESP Hdr IPv4 TCP Data Tunnel Mode

  45. Transport Mode Authenticated Encrypted ESP Trlr Orig IP Header ESP Auth ESP Hdr IPv4 Data TCP Transport Mode • Provides protection primarily for upper-layer protocols. • Extends to the payload of an IP packet. • TCP • UDP • (ICMP), etc.

  46. Transport Mode Authenticated Encrypted ESP Trlr Orig IP Header ESP Auth ESP Hdr IPv4 Data TCP Transport Mode • Typically used for end-to-end communication between two hosts • for example, between a workstation and a server, or between two servers • When a host runs AH or ESP over IPv4, the payload is the data that normally follows the IP header

  47. Transport Mode Authenticated Encrypted ESP Trlr Orig IP Header ESP Auth ESP Hdr IPv4 Data TCP Transport Mode • ESP in transport mode encrypts and optionally authenticates the IP payload but not the IP header • AH in transport mode authenticates the IP payload and selected portions of the IP header

  48. Transport Mode • As an example, consider a Telnet session within an ESP packet in transport mode • The IP header would contain 51 in the Next Header field • In the ESP header, the Next Header field would be 6 for TCP • Within the TCP header, Telnet would be identified as port 23

  49. Transport Mode • Transport mode operation may be summarized for ESP as follows: • At the source, the block of data consisting of the ESP trailer plus the entire transport-layer segment is encrypted • The plaintext of this block is replaced with its ciphertext to form the IP packet for transmission • Authentication is added if this option is selected

  50. Transport Mode • The packet is then routed to the destination • Each intermediate router needs to examine and process the IP header plus any plaintext IP extension headers but will not need to examine the ciphertext • The destination node examines and processes the IP header plus any plaintext IP extension headers

More Related