Skip to content

What is a man-in-the-middle attack?

An attacker positions themselves between two communicating parties, reading or altering traffic without either side noticing.

A man-in-the-middle attack (MitM) is a technique in which an outside party positions itself between two communicating parties, a user and a service, two devices on a network, without either side noticing, and from that position reads the traffic, alters it, or selectively forwards it. The name describes the position, not the technique: ending up "in the middle" can happen on a Wi-Fi network, by abusing how a local network resolves addresses, or by tampering with domain name resolution. MITRE ATT&CK classifies it as technique T1557, Adversary-in-the-Middle, the name under which the same family of attacks appears in recent threat intelligence reports. The concrete damage depends on what travels through that intercepted channel: credentials, already authenticated sessions, payment data, or commands the attacker quietly alters in transit before they reach their intended destination.

See also: Phishing-resistant MFAPhishing-resistant MFA binds authentication to the legitimate service, helping prevent attackers from using credentials captured on fake sign-in pages.

The most common forms

The easiest to set up is untrustworthy Wi-Fi: a compromised public hotspot, or a rogue access point with the same name as a legitimate one, puts the attacker on the path of all traffic from anyone who connects to it. On a local network the same position is reached with ARP spoofing, forging the replies that map IP addresses to devices' physical addresses, or with DNS spoofing, which redirects the resolution of a name toward a server the attacker controls. TLS stripping and fake certificates instead act on the encryption layer, downgrading a connection from HTTPS to HTTP or presenting an invalid certificate in the hope the browser's warning gets clicked through. The variant most common against businesses today is the reverse-proxy phishing kit: a login page identical to the original that forwards credentials to the real service in real time and captures the session cookie. That same mechanism makes classic MFA insufficient, as the entry on phishing-resistant MFA explains: only a second factor cryptographically bound to the service's domain, such as a passkey, resists a proxy that simply forwards whatever the user types.

What defends against it

The first defense is TLS that is actually validated: no client that ignores certificate errors, no permanent exceptions granted for convenience. HSTS (RFC 6797) makes the browser, after a first successful visit, reach the site only over HTTPS even when the user types the address without "https://", and turns certificate errors into ones that cannot be clicked through: it closes the window TLS stripping exploits, except on the first visit when the domain is not on the browsers' preload list. On the network side, segmentation limits how much an attacker already positioned on one segment can see or reach elsewhere.

A concrete example

A small company's administrator connects from an airport waiting area to a Wi-Fi network named like the terminal's official one, actually a clone hotspot set up by whoever is monitoring it. The attacker then intercepts access to the company's banking portal: if the connection to that portal were not protected by correctly validated TLS, credentials would pass unencrypted. HSTS and a phishing-resistant second factor exist for exactly this: they take away the two things the attacker is after, plaintext traffic and a session to reuse.

Why it matters for decision makers

A man-in-the-middle attack does not require a breach of company systems: an untrustworthy network or a convincing clone page is enough. That is why protection cannot depend only on the caution of whoever connects, it has to be built into the infrastructure (TLS validated everywhere, HSTS active, internal network segmentation) and into authentication, with a second factor a proxy cannot bypass. It is the same principle behind Zero Trust: no network, not even one that looks like your own, should be trusted by default.

  • Phishing-resistant MFAPhishing-resistant MFA binds authentication to the legitimate service, helping prevent attackers from using credentials captured on fake sign-in pages.
  • SSL/TLS certificateThe digital file that encrypts a site's traffic and authenticates its domain, but does not certify the site is trustworthy.
  • Network segmentationNetwork segmentation divides systems and services into zones with controlled connections, limiting the spread of attacks and protecting business operations.
  • PhishingDeception that pushes a person into handing over credentials, data or money by faking a legitimate sender.
  • HSTS (HTTP Strict Transport Security)The header that forces a browser to talk to a site only over HTTPS, closing the window a plain redirect leaves open.

See it in the universe

If it is a risk for your company, I will tell you where to start without selling you fear.

See security and compliance

Or write to me.