1.4c - Other Useful Protocols: Professor Messer
ICMP: Reachability, Diagnostics, and Messages
- ICMP stands for Internet Control Message Protocol.
- It is carried by IP, but it does not use TCP or UDP; ICMP is its own protocol.
- Primary purpose: check if a device is on the network and operating (a diagnostic ping).
- Ping command uses ICMP to send a request and wait for a reply, verifying reachability.
- ICMP can provide various messages beyond simple reachability, including:
- Network that is not reachable (destination not reachable).
- Time to Live (TTL) exceeded: the TTL value in the data has expired during transit, triggering an ICMP time-exceeded message.
- Analogy: ICMP is like sending a text message to see if you get a response.
GRE: Generic Routing Encapsulation
- GRE stands for Generic Routing Encapsulation.
- Used to create tunnels between two endpoints (commonly in VPN scenarios).
- Mechanism: encapsulates information inside an IP packet, sends it across a GRE tunnel, and decapsulates on the other end.
- Important limitation: GRE does not provide encryption of the encapsulated payload.
- Therefore, if you need confidentiality, you must pair GRE with additional VPN encryption protocols.
VPN Concentrators: Purpose and Deployment
- A VPN concentrator is a device that performs encryption and decryption for VPN traffic at a central point.
- Often hardware with specialized encryption hardware to improve efficiency and throughput.
- Sometimes deployed as standalone hardware; more commonly integrated into an existing firewall or router.
- In smaller deployments or limited user scenarios, a VPN concentrator can be software-based on an operating system.
- Typical use: site-to-site VPN configurations connecting a corporate network to a remote site over the public Internet.
- All traffic across the public Internet in these VPN tunnels is encrypted using VPN technology.
IPSec: Encryption for VPNs
- IPSec stands for Internet Protocol Security.
- It is a widely used protocol suite to provide encryption for data sent across VPN tunnels.
- Benefits of IPSec:
- Confidentiality: encryption of the payload.
- Integrity and anti-replay: digital signatures ensure data integrity and protect against replay attacks.
- Interoperability: standard protocol allowing devices from different manufacturers to connect via IPSec tunnels.
- IPSec commonly used with two sub-protocols:
- Authentication Header (AH)
- Encapsulation Security Payload (ESP)
AH and ESP: Roles and Differences
- AH (Authentication Header):
- Used to validate the information received over an IPSec tunnel via hashing (integrity).
- Data is not encrypted when using AH alone; information may be transmitted in the clear, but with integrity protection.
- ESP (Encapsulation Security Payload):
- Encrypts the original data and the ESP trailer.
- Adds a new IP header and an ESP header, plus an Integrity Check Value (ICV) at the end for authentication.
- Provides both confidentiality and authentication.
- In practice, ESP is the commonly used mechanism when encryption is required; AH provides integrity without encryption.
IKE, ISAKMP, and Security Associations (SA)
Key terms:
- IKE: Internet Key Exchange – the process used to negotiate and establish keys for IPSec.
- ISAKMP: Internet Security Association and Key Management Protocol – framework used for establishing SA and performing the key exchange; commonly associated with Phase 1 of IPSec.
- SA: Security Association – a unidirectional establishment that defines the cryptographic parameters (encryption, integrity) for the IPSec tunnel.
IKE enables both sides of a VPN to agree on keys and algorithms for the duration of the tunnel via a Security Association.
Phase 1: ISAKMP/IKE establishes a shared secret key using Diffie-Hellman to allow both sides to trust each other and exchange further keys.
- Typically operates over UDP port 500.
- This phase is also described as the Diffie-Hellman exchange to create the shared secret: K{shared} = ext{DH}( ext{private}A, ext{public}_B ) (conceptual representation).
- Commonly referred to as ISAKMP, or Internet Security Association and Key Management Protocol.
Phase 2: Negotiates which ciphers and key sizes will be used for the actual IPSec tunnel and establishes both inbound and outbound SAs.
- Purpose: ensure both sides agree on how encryption and integrity will be performed for data passing through the tunnel.
Visual intuition:
- Phase 1 builds the ISAKMP tunnel over UDP 500.
- Phase 2 encrypts the data over the ESP tunnel, enabling encrypted data transmission through the IPSec tunnel.
IPSec Modes: Transport vs Tunnel
- Transport mode:
- An IPSec header is inserted between the IP header and the original data.
- The original IP header is kept in the clear; the data inside the IP packet is encrypted.
- IPSec trailer is appended at the end of the packet.
- If the packet is captured, the destination and routing information (original IP header) can be observed, even if the payload is encrypted.
- Tunnel mode:
- The entire original IP packet (header and data) is encrypted.
- A new IP header is added to the packet, indicating the IPSec tunnel endpoints (destination of the IPSec concentrator).
- The packet includes IPSec headers and trailers around the encrypted payload.
- Most implementations favor tunnel mode for the highest level of protection of the original data.
Practical Considerations and Interoperability
- IPSec is designed to work across devices from different manufacturers, enabling interoperability in multinational or heterogeneous networks.
- A VPN concentrator, often a firewall or router, sits at the central point to manage encryption/decryption for traffic crossing the VPN.
- For small deployments with a limited number of users, a VPN concentrator can be implemented as software on an operating system instead of dedicated hardware.
- Site-to-site VPNs connect corporate networks to remote sites over the Internet, with traffic encrypted by IPSec.
- Encryption direction: IPSec supports inbound and outbound security associations (SAs) that are established during Phase 2 negotiations.
Real-World Relevance and Implications
- Security and privacy: IPSec provides confidentiality and integrity for data traversing untrusted networks (e.g., the Internet).
- Interoperability: Standardization (AH/ESP) enables devices from different vendors to establish VPN tunnels reliably.
- Performance considerations: VPN concentrators with specialized hardware enable higher throughput and more efficient encryption/decryption operations.
- Deployment choices:
- Hardware-based VPN concentrators for large-scale deployments and higher throughput.
- Software-based VPN solutions for smaller scale or limited numbers of users.
- Ethical and practical implications: encryption protects sensitive corporate data and user privacy, but can complicate lawful interception and monitoring; design choices should balance security, compliance, and operational needs.
Summary of Key Concepts
- ICMP is used to check device reachability and can report errors like "not reachable" or "time to live expired".
- GRE encapsulates data for tunneling but provides no encryption; encryption must be provided by additional VPN protocols.
- VPN concentrators manage encryption/decryption, often as hardware integrated with firewalls/routers; they enable site-to-site VPNs across the Internet.
- IPSec is a standard suite for VPN encryption, offering confidentiality and integrity via ESP (encryption + authentication) and AH (authentication only).
- IKE/ISAKMP establish and manage cryptographic keys and Security Associations; Phase 1 (DH/IKE) creates a shared secret over UDP 500; Phase 2 negotiates encryption algorithms and key sizes for the tunnel.
- Transport mode preserves the original IP header (encryption confines to payload), while Tunnel mode encrypts the entire original packet and adds a new IP header for the tunnel.
- Most deployments favor Tunnel mode for stronger security; AH provides integrity without encryption, ESP provides both.
ext{SA} = igl( ext{Encryption}, ext{Key}, ext{Integrity}, ext{Key}_{I}igr)
- The Security Association defines the cryptographic parameters for IPSec security on a per-direction basis.