ProtoStackv0.1

Interactive Protocol Visualizer

Security & AuthProfessional trackAdvancedOSI: Network LayerDefault Port: UDP 500 / 4500 (IKE)Standard: RFC 4301

IPsec

— Internet Protocol Security

IPsec 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.

Read first: IPv4, IPv6Content reviewed 2026-11-18

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

Simulated

Defensive education. Every step runs in this page; no traffic is generated or sent.

Attack library

IKE aggressive-mode offline crack

Credential attack

A PSK hash captured from aggressive mode can be attacked offline, and a weak secret falls quickly.

Attackersimulated
IPsectarget
Attack step 1 of 3
Capture the exchange

The attacker records the aggressive-mode messages.

What a defender can see

Aggressive mode in use instead of IKEv2.

Impact if unmitigated

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)