Security & Privacy

Man-in-the-middle attack

Also known as: MITM attack, MITM, adversary-in-the-middle, AiTM, on-path attack

A man-in-the-middle (MITM) attack, also called an adversary-in-the-middle attack, happens when an attacker secretly positions themselves between two parties, such as you and a website, so they can read or change the data passing between you.

It can happen on fake Wi-Fi hotspots, compromised routers, or through phishing proxies that capture logins and MFA codes in real time. While HTTPS has made classic eavesdropping much harder, phishing-based MITM attacks have become a common way to bypass multi-factor authentication.

Man-in-the-middle attack, explained at three levels

At home

Imagine passing notes to a friend through a classmate who secretly reads each one, maybe changes it, and passes it on. A man-in-the-middle attack does that to your internet traffic: the attacker sits between you and a website, often through a fake Wi-Fi hotspot or a fake login page that relays everything. HTTPS works like a sealed envelope, which is why it blocks most of these.

At work

A man-in-the-middle attack happens when an attacker secretly relays traffic between an employee and a real service, reading or changing it along the way. Today it most often uses a fake login page that passes everything to the real site, capturing the password, MFA code, and signed-in session. Businesses care because it can bypass ordinary MFA, which is why passkeys and security keys matter.

Real-world examples

At home

Lena connected to 'Airport_Free_WiFi' while travelling. Her browser warned that a site's certificate wasn't valid, so she disconnected and used her phone's data instead.

At work

Thomas is security manager at a Montreal law firm. After an adversary-in-the-middle phishing attack stole an associate's session despite MFA, he moved the firm to passkeys for Microsoft 365.

How it compares

featureMan-in-the-middle attackPhishing
Attacker positionBetween you and the serviceTricks you into visiting a fake site
Can beat basic MFAYes, by relaying codesOnly if combined with MITM
Common settingFake Wi-Fi, phishing proxiesEmail, text, social media
Strong defencePasskeys and HTTPSAwareness and filtering

Modern MITM attacks often start as phishing and end by relaying your session.

For analysts

Because adversary-in-the-middle kits defeat code-based MFA, I'd prioritize passkeys or security keys for email and finance systems. It's the control that actually closes the gap.

History & origin

Interception attacks predate computers, but MITM became a networking concern as unencrypted protocols spread in the 1990s. Tools such as Ettercap, first released in 2001, made local network interception easy, and the 2010 Firesheep browser extension showed how easily logins could be hijacked on public Wi-Fi. In 2015, Lenovo was found to have shipped laptops with Superfish adware that installed its own root certificate, enabling MITM interception of HTTPS traffic. Widespread HTTPS adoption, HSTS, and certificate transparency reduced classic attacks. Attackers shifted to 'adversary-in-the-middle' phishing kits such as Evilginx, which proxy real login pages and steal session cookies. In my view, MITM is now less about sniffing Wi-Fi and more about fake login pages that relay everything you type.