IPsec
— Internet Protocol SecurityIPsec secures communications across public IP networks by authenticating and encrypting each IP packet. Composed of Authentication Header (AH), Encapsulating Security Payload (ESP), and Internet Key Exchange (IKEv2), IPsec is the backbone of site-to-site corporate VPN tunnels.
Interactive Session: How IPsec Works
Step through the packet exchange sequence between nodes.
Interactive Execution Sandbox
Interact with a live or clearly-labelled simulated instance of IPsec.
Threat Model & Attack Simulation
How this protocol is attacked in practice, what defenders can see, and which control stops it.
Threat model & attack simulation
SimulatedDefensive education. Every step runs in this page; no traffic is generated or sent.
IKE aggressive-mode offline crack
Credential attackA PSK hash captured from aggressive mode can be attacked offline, and a weak secret falls quickly.
Capture the exchange
The attacker records the aggressive-mode messages.
Aggressive mode in use instead of IKEv2.
Unauthorised VPN access to the private network.
Defences that matter
- Use IKEv2 with certificates
- Long random PSKs where PSK is unavoidable
- Disable aggressive mode
This is a conceptual model for defenders, not an exploit toolkit. It contains no payloads, tooling or instructions for attacking systems you do not own.
Protocol Specification & Architecture
Key characteristics, real-world deployment patterns, and trade-offs.
Core Technical Features
- Two operating modes: Transport Mode (payload only) and Tunnel Mode (entire original IP packet encapsulated)
- Encapsulating Security Payload (ESP) for confidentiality and integrity
- Internet Key Exchange (IKEv2) for mutual authentication and Security Association (SA) negotiation
- Anti-replay protection via packet sequence numbering
Real-World Use Cases
- Branch office to headquarters site-to-site VPNs
- Enterprise remote worker corporate VPN client access
- Router-to-cloud VPC secure gateway connections
Advantages & Strengths
- Completely transparent to application protocols (HTTP, SSH, VoIP all inherit IPsec encryption)
- Hardware ASIC acceleration in enterprise routers
Limitations & Vulnerabilities
- Complex configuration and notorious issues with NAT traversal (requires UDP port 4500 NAT-T encapsulation)