Five forged packets, one per second, were enough. A Linux machine on a small test network had the correct hardware address for its gateway in its ARP table. Two seconds after a third machine started announcing itself as that gateway, the entry changed, and every ping the first machine sent to its gateway went through the impostor instead. The pings still came back. Nothing looked broken. The only visible signs were a changed line in the neighbor table and an ICMP redirect most systems never show anyone, and both were caught by a 20-line detection script running on the victim.
Why ARP trusts everyone
A 1982 design
The Address Resolution Protocol maps IP addresses to the hardware (MAC) addresses that Ethernet and Wi-Fi actually deliver frames to. RFC 826, written by David Plummer and published in November 1982, defines how a machine should handle an incoming ARP packet. If the sender’s address is already in its table, the machine should “update the sender hardware address field of the entry with the new information in the packet.” The RFC adds that the new hardware address “supersedes the old one.”
No proof required
Nothing in that rule asks whether the sender is telling the truth. MITRE’s ATT&CK knowledge base, in its entry on ARP cache poisoning, puts it bluntly: “The ARP protocol is stateless and does not require authentication.” Any device on the same local network can claim any IP address, and devices that already know that address will usually believe the latest claim.

The test network
Three machines and a switch
The lab ran inside Linux network namespaces, isolated virtual machines that share a kernel: a “gateway” at 10.0.0.1, a “victim” at 10.0.0.2 and an “attacker” at 10.0.0.66, all connected to a software bridge acting as a switch. Each got a fixed, easy-to-read MAC address ending in :01, :02 and :66.
Before
After one ping to the gateway, the victim’s neighbor table held the correct entry:
10.0.0.1 dev e0 lladdr 02:00:00:00:00:01 REACHABLE
The forged replies
The attacker then sent five unsolicited ARP replies to the victim, one per second, each claiming that 10.0.0.1 lived at 02:00:00:00:00:66. The victim had never asked. It updated its table anyway:
10.0.0.1 dev e0 lladdr 02:00:00:00:00:66 REACHABLE
Why the victim noticed nothing
Traffic still flowed
Three pings to the gateway afterward all came back, with zero loss. A packet capture on the attacker’s side showed why: the pings now arrived there first, and because packet forwarding was enabled on the attacker, its kernel quietly passed them on to the real gateway. The victim’s traffic took a detour through a third machine and the victim had no reason to suspect it.
The return path stayed honest
The replies came back with a time-to-live of 64, exactly as before. That surprised the obvious check. The attacker had poisoned only the victim’s table, not the gateway’s, so replies went straight back to the victim and never passed through the attacker. Only one direction was intercepted. Full interception requires poisoning both sides, which is what real attack tools typically do.
One small tell
The capture did catch the attacker’s own kernel sending an ICMP redirect to the victim, effectively saying the gateway could be reached directly. That’s a side effect of forwarding a packet back out the interface it came in on. It’s a real clue, though most desktop systems ignore redirects and log nothing about them.

A detector in 20 lines
The idea
The most reliable sign of ARP spoofing is the one MITRE lists as a detection analytic: “inconsistent IP-to-MAC mappings.” A detector needs two things: a trusted baseline of which MAC belongs to which IP, and a way to see every ARP packet on the wire.
The script
This Python script uses the Scapy library. It reads the current neighbor table as a baseline, then listens for ARP traffic and raises an alert whenever an IP address is claimed by a different MAC:
import sys, time, subprocess
from scapy.all import sniff, ARP
seen = {}
for line in subprocess.run(["ip", "neigh"], capture_output=True, text=True).stdout.splitlines():
f = line.split()
if "lladdr" in f:
seen[f[0]] = f[f.index("lladdr") + 1]
print("baseline", seen, flush=True)
t0 = time.time()
def check(p):
ip, mac = p[ARP].psrc, p[ARP].hwsrc
old = seen.get(ip)
if old and old != mac:
print(f"{time.time()-t0:6.2f}s ALERT {ip} claimed by {mac}, expected {old}", flush=True)
elif not old:
seen[ip] = mac
print(f"{time.time()-t0:6.2f}s learned {ip} at {mac}", flush=True)
sniff(iface="e0", filter="arp", prn=check, store=0, timeout=float(sys.argv[1]))What it caught
Run on the victim during a repeat of the attack, it printed one alert per forged packet, each about a second apart: “ALERT 10.0.0.1 claimed by 02:00:00:00:00:66, expected 02:00:00:00:00:01.” The first fired 2.08 seconds after the script started, matching the moment the forged replies began.
The baseline matters
A first version of the script learned addresses from traffic only, with no starting table. It started after the victim had already cached the gateway, saw no ARP for the real gateway, and recorded the attacker’s forged claim as the first and therefore trusted answer. It never raised an alert. A detector that starts after the attacker is already in place learns the lie. Seeding it from a known-good table, or from a list written by hand for the gateway and other key devices, fixes that.
Checking by hand
One MAC, two addresses
A detector isn’t the only way to spot trouble. After the attack, the victim’s table held a second line once the attacker’s own address had appeared on the wire:
10.0.0.66 dev e0 lladdr 02:00:00:00:00:66 STALE
10.0.0.1 dev e0 lladdr 02:00:00:00:00:66 REACHABLE
Two different IP addresses, one hardware address. On an ordinary home network, the router’s MAC showing up next to some other device’s IP is a strong hint that something is impersonating the router. The check works on any system: ip neigh on Linux, and arp -a on Windows and macOS print the same kind of table.
Knowing the real answer
The comparison only works if the router’s genuine MAC is known in advance. It’s usually printed on a label on the router itself and shown in its admin page. Writing it down once, while the network is known to be clean, turns every later look at the ARP table into a quick check.
Where it falls short
A careful attacker can use a MAC that never appears with any other address, and entries age out of the table after a few minutes of silence. A one-time manual look catches careless spoofing; continuous monitoring catches the rest.

Locking the gateway’s entry
Static entries
MITRE’s first listed mitigation is to “create static ARP entries for networked devices.” On Linux, one command pins the gateway:
ip neigh replace 10.0.0.1 lladdr 02:00:00:00:00:01 dev e0 nud permanent
Tested
With the entry pinned, the same five forged replies changed nothing. The table still read PERMANENT with the real gateway’s MAC, and pings went straight to the gateway. The catch is upkeep: if the router is replaced, the pinned entry silently breaks the connection until someone updates it. MITRE notes the approach may be impractical on large networks, and on a home network it is mainly worth doing for the gateway itself.
A kernel setting that doesn’t help here
The Linux kernel’s arp_accept setting controls gratuitous ARP handling. The kernel documentation describes value 0 as “don’t create new entries in the ARP table.” In the lab it was set to 0, and the poisoning still worked, because the attack didn’t create an entry. It overwrote one that already existed, exactly as RFC 826 says a host should.
Switch-level protection and what’s practical at home
Dynamic ARP Inspection
On managed switches, MITRE recommends to “consider enabling DHCP Snooping and Dynamic ARP Inspection.” The switch records which MAC received which IP address from the DHCP server, then drops ARP packets that contradict that record before they reach anyone. It’s the strongest fix because it stops forged packets at the port, but it’s a feature of business-class switches, not most home routers.
What a home network can do
Without that hardware, the practical layers are monitoring and encryption. A small always-on machine, a Raspberry Pi or a home server, can run a detector like the one above and send alerts. Pinning the gateway’s MAC on the most important machines blocks the most common target. And because a poisoned ARP table only moves traffic, it doesn’t break encryption: HTTPS, SSH and VPN connections that check certificates or host keys still protect the contents, even if the packets take a detour.
Where the attacker has to be
ARP doesn’t cross routers. Spoofing it requires a device already inside the same local network segment, on the same Wi-Fi or plugged into the same switch. On a home network, that makes the guest Wi-Fi network, unknown devices on the main network and old smart gadgets the places worth watching.
Sources
- RFC 826, “An Ethernet Address Resolution Protocol,” D. Plummer, November 1982: https://www.rfc-editor.org/rfc/rfc826
- MITRE ATT&CK, T1557.002 “Adversary-in-the-Middle: ARP Cache Poisoning”: https://attack.mitre.org/techniques/T1557/002/
- Linux kernel documentation, IP sysctl: https://docs.kernel.org/networking/ip-sysctl.html
