In a man-in-the-middle attack (MitM, also on-path attack) the attacker inserts themselves unnoticed between two communication partners: both believe they are talking directly, while everything actually flows through the attacker — who can read, record or deliberately alter it.
Entry points are manifold: manipulated Wi-Fi, poisoned name resolution (ARP or DNS spoofing), compromised routers — or forged certificates when users click warnings away.
How MitM attacks work
On the local network ARP spoofing often suffices: the attacker poses as the gateway and all traffic flows through their device. In open Wi-Fi a malicious hotspot takes the same role. At internet level, DNS manipulation leads victims to look-alike servers without the address bar looking suspicious.
The defence is primarily cryptographic: end-to-end TLS makes eavesdropping worthless and manipulation detectable — provided certificate warnings are taken seriously. DNSSEC secures name resolution, encrypted DNS (DoH/DoT) the path to it; Zero Trust access replaces trust in the local network altogether.
Typical MitM scenarios
- Evil twin: fake Wi-Fi hotspot with a familiar name.
- ARP spoofing in the LAN: attacker plays gateway.
- DNS spoofing: manipulated resolution leads to look-alike services.
- TLS downgrade and certificate tricks against careless clients.