Skip to content
Pwnversity
NET-ARPintermediate · 7 min · upd. 2026-10

ARP Spoofing

T1557.002

ARP (Address Resolution Protocol) maps IP addresses to MAC addresses within a single local network segment. Its design flaw is that it has no authentication: any machine can claim “I am IP X” and the others believe it without verification. ARP spoofing (or ARP poisoning) abuses this so that a victim’s traffic flows through the attacker, who sits in the middle (man-in-the-middle) of the communication between the victim and its gateway.

On a switched LAN, each host keeps an ARP table (IP→MAC) that it fills dynamically and trustingly. If the attacker sends forged ARP replies —to the victim: “the gateway’s MAC is me”; and to the gateway: “the victim’s MAC is me”— both ends send their traffic to the attacker. This is a layer 2 attack (RFC 826): it requires being in the same broadcast domain as the victim (physical access, WiFi, or an already-compromised host on that segment). It is not possible from outside that segment.

flowchart LR
    V[Victim] -->|"traffic"| A["Attacker (MITM)"]
    A -->|"forwards"| G[Gateway]
    A -. "forged ARP replies<br/>(impersonates gateway)" .-> V
    A -. "forged ARP replies<br/>(impersonates victim)" .-> G

When a host needs to send a packet to an IP on its subnet, it first broadcasts an ARP request (“who has 10.0.0.1? tell me your MAC”). The owner answers with a unicast ARP reply. The problem: most implementations accept replies that nobody asked for (unsolicited) and update their cache, and even process gratuitous ARP (unsolicited announcements legitimately used for failover). The attacker exploits that behaviour by injecting continuous replies to keep the cache poisoned.

sequenceDiagram
    participant V as Victim
    participant A as Attacker
    participant G as Gateway
    A->>V: ARP reply: 10.0.0.1 is at MAC_attacker
    A->>G: ARP reply: 10.0.0.5 is at MAC_attacker
    V->>A: traffic destined for the gateway
    A->>G: forward (ip_forward)
    G->>A: reply destined for the victim
    A->>V: forward
  1. Confirm you are in the same L2 broadcast domain as the victim. Sharing a subnet, switch or AP does not guarantee it: VLANs or client/AP isolation can separate you even if the IP looks adjacent (check whether you receive their broadcast ARP frames).
  2. Enable packet forwarding so you don’t cut off the victim’s connection:
Ventana de terminal
echo 1 > /proc/sys/net/ipv4/ip_forward
# or, persistently for the session:
sysctl -w net.ipv4.ip_forward=1
  1. Poison in both directions: tell the victim you are the gateway, and tell the gateway you are the victim.
  2. All victim↔gateway traffic now flows through you, ready to capture (see Network Sniffing).
Ventana de terminal
# bettercap (modern standard)
bettercap -iface eth0
# inside the interactive console:
# net.probe on discover hosts on the segment
# set arp.spoof.targets 10.0.0.5 set the victim
# arp.spoof on start poisoning
# net.sniff on capture the intercepted traffic
# dsniff suite classics
# arpspoof poisons one direction per command; run both (victim and gateway):
arpspoof -i eth0 -t 10.0.0.5 10.0.0.1 # tell the victim you are the gateway
arpspoof -i eth0 -t 10.0.0.1 10.0.0.5 # and the gateway you are the victim
# ettercap text mode, ARP MITM between two targets
ettercap -T -M arp /10.0.0.5// /10.0.0.1//
  • Sniffing of the victim’s traffic: credentials, cookies and tokens travelling unencrypted (see Network Sniffing).
  • SSL stripping (downgrading HTTPS→HTTP where there is no HSTS) and DNS spoofing to redirect to fake hosts (DNS Attacks, Man-in-the-Middle).
  • Injection of content into unencrypted HTTP traffic.
  • Capture of Net-NTLMv2 hashes by forcing Windows client authentications.

It only works on your L2 segment. HTTPS with HSTS, certificate validation and encrypted protocols sharply reduce what you see (metadata yes, content no). It is also noisy: it duplicates traffic and alters ARP tables in a detectable way.

  • Changes in ARP tables: a MAC suddenly tied to the gateway’s IP, or a single MAC claiming several IPs.
  • Anomalous ARP traffic: many unsolicited replies or a burst of gratuitous ARP.
  • Tools: arpwatch (alerts on IP↔MAC changes), XArp, and IDS such as Suricata with ARP spoofing rules.
  • Dynamic ARP Inspection (DAI) on managed switches: validates every ARP against the DHCP snooping table.
  • Port security (limit MACs per port) and 802.1X (authenticate before granting network access).
  • Static ARP entries for critical hosts (gateway, key servers).
  • End-to-end encryption (HTTPS/HSTS, SSH, VPN): even if intercepted, the content stays private.
  • L2 segmentation: fewer hosts per broadcast domain = fewer reachable victims.

Identify the attacker’s MAC (physical switch port), isolate it, flush the affected ARP tables and review what traffic may have been captured; rotate any credentials that could have travelled in the clear.

ARP spoofing is not a single CVE: it is a protocol design weakness, catalogued as technique T1557.002 (ARP Cache Poisoning) in MITRE ATT&CK. It is the basis of countless MITM attacks on LANs, corporate WiFi and internal pentests. Combined with DNS spoofing and SSL stripping it was historically used for mass credential theft on open networks (tools such as Ettercap and bettercap).

  • Confirm you are in the same L2 segment as the victim
  • Enable ip_forward so you don’t cut the connection
  • Poison victim↔gateway (bettercap/arpspoof)
  • Capture the intercepted traffic (sniffing)
  • Try DNS spoofing / SSL stripping over the MITM
  • Force and capture Net-NTLMv2 hashes
  • Blue: check for DAI / port security / arpwatch
  • Verify what content stays protected by encryption