Octet

How does ARP spoofing work, and what are the defenses?

Show the answer

Say this first

ARP has no authentication, and hosts accept ARP replies they never asked for. The attacker sends forged replies, often gratuitous ARPs, telling victims "the gateway's IP is at my MAC" and telling the gateway "the victim's IP is at my MAC". Both caches are poisoned, so traffic flows through the attacker, who can read or change it (man in the middle) or drop it (denial of service). The switch defense is Dynamic ARP Inspection backed by DHCP snooping, which drops ARPs whose IP and MAC pair does not match the binding table. Encryption such as TLS, SSH and IPsec limits what a man in the middle can read.

Go deeper

What it looks like

  • On a victim, arp -a shows the gateway 10.10.10.1 mapped to a workstation's MAC, often the same MAC as another IP in the table.
  • Users see certificate warnings when the attacker tries to intercept TLS.
  • DAI, if enabled, logs %SW_DAI-4-DHCP_SNOOPING_DENY with the attacker's MAC and the claimed IP.

Defenses, in order of value

  1. Dynamic ARP Inspection with DHCP snooping on access VLANs.
  2. 802.1X so only known devices get a port at all.
  3. Port isolation or private VLANs where hosts never need to talk to each other.
  4. Static ARP entries for a few critical devices. Does not scale.
  5. Encryption everywhere, so interception gains little.
  6. Detection: tools that alert on IP to MAC changes, and IDS signatures for gratuitous ARP storms.

Traps

  • Saying port security stops ARP spoofing. The attacker uses its own real MAC; only the ARP contents lie.
How did you do?Book 3.3 Internet (IP)