HomeInfosec Essentials

Man-in-the-Middle Attack: Examples, Types, and Prevention

May 5, 2026
•
1 min

|

Updated:

October 27, 2026

Man-in-the-Middle Attack hero illustration
In This Article
Key takeaways:
  • A man-in-the-middle (MITM) attack lets an adversary secretly intercept communications between two parties, reading or altering data without either party detecting the intrusion.
  • MITM attacks unfold in two phases: interception, which positions the attacker on the communication path, and decryption, which makes the traffic readable or modifiable.
  • Common techniques include ARP spoofing, DNS spoofing, SSL stripping, rogue Wi-Fi hotspots, and adversary-in-the-middle (AITM) phishing that steals session cookies after multi-factor authentication (MFA) completes.
  • "Adversary-in-the-middle" is the newer term used in frameworks such as MITRE ATT&CK because the intercepting entity is often automated tooling.
  • Strong encryption, phishing-resistant authentication, network-layer controls, and monitoring together close most of the attack surface.

What Is a Man-in-the-Middle Attack?

A man-in-the-middle (MITM) attack is a cyberattack in which an adversary secretly positions themselves between two communicating parties to intercept, read, and alter their data. Neither party knows the channel is compromised. The attacker can then steal credentials and session tokens, or forge responses to manipulate transactions. Security frameworks such as MITRE ATT&CK also call it an adversary-in-the-middle (AITM) attack.

A MITM attack subverts the communication channel itself. Unlike cyber attacks that target a single endpoint directly, the attacker sits on the path between a user and a server, or between two services, and handles every message in transit. A passive attacker eavesdrops on credentials, financial data, and intellectual property. An active attacker forges responses to manipulate transactions or inject malware.

Security teams often explain the concept with the "Alice, Bob, and Eve" model:

  • Alice believes she is talking to Bob.
  • Bob believes he is talking to Alice.
  • Eve sits between them, relaying and reading every message.

The same attack goes by several names: adversary-in-the-middle (AITM), machine-in-the-middle, on-path attack, and manipulator-in-the-middle. The AITM label, used in the MITRE ATT&CK framework, reflects that the intercepting entity is often automated tooling rather than a human operator.

MITM attacks remain relevant because encryption protects a connection only when both ends validate who they are talking to. HTTPS cannot stop SSL stripping, forged certificates, or reverse-proxy phishing when certificate validation is weak or users are tricked into accepting a fraudulent site.

How a Man-in-the-Middle Attack Works

A man-in-the-middle attack works in two phases: interception, which places the attacker on the communication path, and decryption, which makes the intercepted traffic readable or modifiable. The same two phases apply whether the technique is ARP spoofing, a rogue hotspot, or a reverse-proxy phishing kit.

Phase 1: Interception

In the interception phase, the attacker must position themselves between the two targets. Four methods are most common:

  1. Rogue Wi-Fi hotspot: The attacker broadcasts an access point that mimics a legitimate network, such as a coffee shop, hotel, or airport. Devices that auto-connect hand all their traffic to the attacker's machine.
  2. ARP spoofing: On a local area network, the attacker sends forged Address Resolution Protocol (ARP) messages that map their own MAC address to a legitimate IP address. Traffic meant for a router or host then flows through the attacker's device.
  3. DNS spoofing: The attacker poisons a DNS cache to return fraudulent IP addresses for legitimate domain names, which redirects users to attacker-controlled servers.
  4. IP spoofing: The attacker alters packet headers to impersonate a trusted host, so systems accept traffic from the attacker as if it came from the real source.

Phase 2: Decryption

Once traffic is diverted, encrypted data must become readable to be useful. The table below lists the main decryption techniques and what each one bypasses.

TechniqueMechanismWhat it bypasses
SSL strippingDowngrades HTTPS to HTTP by intercepting the initial redirectTransport-layer encryption
HTTPS spoofingServes a forged or fraudulently issued certificate so the attacker holds the real sessionCertificate trust
SSL hijackingPasses forged keys during the TLS handshake, splitting the session in twoSession integrity
SSL BEASTExploits a CBC vulnerability in TLS 1.0 to decrypt cookiesSymmetric encryption
Session hijackingSteals an active session token to impersonate a user without credentialsAuthentication
Reverse-proxy AITMProxies the real site to the victim and captures the session cookie after loginMulti-factor authentication that is not phishing-resistant

With readable traffic, the attacker can eavesdrop passively, alter data in transit, or inject malicious payloads.

Types of Man-in-the-Middle Attacks

Man-in-the-middle attacks are categorized by their interception vector and their objective. There are three main groups in enterprise environments: network-layer attacks, application-layer attacks, and physical or proximity attacks.

Network-Layer Attacks

  • ARP spoofing and DNS spoofing operate at the network layer. ARP spoofing is especially dangerous on corporate LANs because any device on the same broadcast domain can send forged ARP replies without credentials. DNS spoofing affects users enterprise-wide when a central resolver is compromised.
  • mDNS spoofing targets Multicast DNS, which printers, smart displays, and IoT devices use on trusted internal segments. A forged mDNS response can redirect internal service traffic to an attacker-controlled host.

Application-Layer Attacks

  • Email hijacking involves taking control of a corporate email account to monitor financial communications and, at the right moment, substitute fraudulent payment instructions. It is closely related to business email compromise (BEC).
  • Man-in-the-browser attacks use malware in the victim's browser to intercept and modify web transactions in real time, even over a legitimately encrypted connection.
  • AITM phishing combines a reverse proxy with credential-harvesting pages. The attacker proxies the real site to the victim and captures live session cookies along with credentials, which defeats standard MFA in real time.

Physical and Proximity Attacks

Evil-twin attacks use a rogue access point that mimics a legitimate Wi-Fi network. Physical proximity to the target is enough, so the attacker never needs network access beforehand.

Real-World Man-in-the-Middle Attack Examples

Real-world man-in-the-middle attack examples show how interception works at the certificate, device, and identity layers.

ExampleYearWhat happenedLesson for security teams
DigiNotar2011Attackers compromised the Dutch certificate authority DigiNotar and issued fraudulent certificates for domains including Google. The certificates were used to intercept encrypted traffic, primarily from users in Iran.One compromised certificate authority can undermine HTTPS trust for every user of the affected domains.
Lenovo Superfish2015Lenovo shipped consumer laptops with Superfish adware preinstalled. The adware installed its own root certificate, which let it intercept HTTPS traffic.Preinstalled software can add trusted certificates that weaken validation on every site a user visits.
Microsoft AiTM phishing campaign2021 to 2022Microsoft reported that attackers used reverse-proxy phishing sites to steal passwords and session cookies from more than 10,000 organizations, bypassing MFA (Microsoft Threat Intelligence, July 2022).Session cookies stolen after MFA completes give attackers account access without the password.

These three examples fail at different layers: a certificate authority, a preinstalled device component, and a user's authenticated session. Validating certificates, restricting trusted root certificates, and binding authentication to the legitimate origin address each of those layers.

Why Man-in-the-Middle Attacks Matter for Enterprise Data Security

Man-in-the-middle attacks matter for enterprise data security because the attacker sees whatever crosses the intercepted channel: login credentials, session tokens, source code, financial instructions, customer records, and confidential communications. In effect, a successful attack is a data breach in motion.

Credential and Session Theft

Credential theft through a MITM attack lets an adversary authenticate to corporate systems, SaaS applications, and cloud environments as the legitimate user. Stolen session cookies provide the same access without the password and bypass MFA, because authentication was already completed before the cookie was issued.

Data Integrity Violations

MITM attacks can alter data as well as steal it. A $10,000 payment instruction can become $100,000, and a software update can be replaced with a malicious binary. Integrity violations are often harder to detect than straightforward data exfiltration, because nothing appears to go missing.

Compliance and Regulatory Exposure

Any breach of data in transit carries regulatory consequences. GDPR requires appropriate technical measures to protect personal data during transmission, and PCI DSS requires strong cryptography for cardholder data sent over open, public networks. A successful MITM attack that exposes regulated data can trigger notification obligations and fines regardless of where the underlying vulnerability resided.

Supply Chain and Third-Party Risk

Supply chain risk arises when an attacker intercepts communications between a company and a trusted vendor, which compromises the enterprise indirectly. The 2011 DigiNotar breach shows the pattern: after attackers compromised a third-party certificate authority, forged certificates were issued for Google and other major services.

Common Challenges and Misconceptions

Man-in-the-middle defenses are well understood, yet five misconceptions reduce their effectiveness in practice.

  • "HTTPS means the connection is safe." HTTPS protects data in transit when the certificate chain is valid and the browser validates it. SSL stripping and forged certificates break that assumption. The padlock confirms a TLS session exists, and it says little about whether the other end is the intended server.
  • "We only need to worry about public Wi-Fi." MITM attacks work on corporate LANs as well. ARP spoofing, mDNS spoofing, and rogue access points succeed in wired and wireless enterprise environments.
  • "MFA stops MITM attacks." Traditional MFA stops credential replay, but AITM phishing proxies defeat it by capturing the live session cookie after MFA completes.
    Phishing-resistant standards such as FIDO2/WebAuthn counter this because authentication is bound to the legitimate origin URL.
  • "Encryption alone is enough." Attackers use SSL stripping and certificate spoofing to convert encrypted sessions into plaintext before data reaches the intended endpoint, so encryption must pair with certificate validation and HSTS.
  • "Detection is straightforward." MITM attacks are designed to be transparent to both parties. Without network monitoring, certificate transparency logging, or anomaly detection, a passive MITM can operate undetected for extended periods.

How to Prevent Man-in-the-Middle Attacks

Man-in-the-middle prevention requires layered controls. No single measure is sufficient, so defense in depth across the network, application, and endpoint layers is the appropriate model.

Enforce Strong Transport Encryption

  1. Deploy TLS 1.2 or TLS 1.3 on all servers, and disable SSL 3.0, TLS 1.0, and TLS 1.1.
  2. Implement HTTP Strict Transport Security (HSTS) with a long max-age directive that covers subdomains. HSTS instructs browsers to refuse HTTP connections, which prevents SSL stripping on repeat visits.
  3. Use certificate pinning in mobile apps and API clients where you control both ends of the connection.
  4. Monitor Certificate Transparency logs for high-value services to detect forged certificates before users trust them.

Harden Authentication

  1. Deploy phishing-resistant MFA using FIDO2/WebAuthn or hardware security keys. These standards bind authentication to the legitimate origin URL, which makes AITM proxy attacks ineffective.
  2. Enforce mutual TLS (mTLS) for service-to-service communications so both parties must present valid certificates, which eliminates service-layer impersonation.
  3. Shorten session lifetimes and require re-authentication for sensitive actions, which limits how long a stolen session cookie stays useful.

Secure the Network Layer

  1. Segment networks with VLANs and firewall rules to limit the blast radius of ARP spoofing.
  2. Enable Dynamic ARP Inspection (DAI) on managed switches to reject forged ARP messages before they poison caches.
  3. Require WPA3 or WPA2-Enterprise (802.1X) on wireless networks, and disable auto-connect to open networks on corporate devices.
  4. Deploy a wireless intrusion prevention system (WIPS) to detect rogue access points.
  5. Use DNSSEC and validate DNS responses on clients to limit DNS spoofing.

Endpoint and User Controls

  1. Keep operating systems, browsers, and certificate trust stores patched, because attackers exploit known flaws in certificate handling.
  2. Audit and restrict the trusted root certificates installed on managed devices.
  3. Train users to avoid unrecognized Wi-Fi networks and to report certificate warnings rather than click through them.
  4. Require a VPN for employees working on untrusted networks.

How to Detect a Man-in-the-Middle Attack

Signs of a man-in-the-middle attack include certificate warnings, downgraded connections, and unexpected network or login behavior:

  • Certificate warnings, or a changed certificate issuer on a familiar site
  • HTTPS padlocks that disappear on sites that normally use encryption
  • A changed gateway MAC address or duplicate MAC entries in ARP tables
  • Domains that resolve to unexpected IP addresses
  • Logins from new devices or locations shortly after a connection to a new network
  • The same session cookie used from two IP addresses at once

A well-executed MITM attack is transparent to both parties, so detection depends mostly on monitoring and logging rather than on what users notice.

Detection Controls for Security Teams

  1. Deploy network detection tools that flag ARP spoofing anomalies, unexpected certificate changes, and TLS downgrade attempts.
  2. Monitor Certificate Transparency logs for unauthorized certificates issued for your domains.
  3. Alert on session cookies reused from a second IP address or device, a common marker of AITM phishing.
  4. Conduct penetration tests that include network-layer MITM scenarios to verify controls are working.

How Cyberhaven Addresses Man-in-the-Middle Attacks

Cyberhaven addresses man-in-the-middle attacks through a unified data security platform that combines Data Lineage, data loss prevention (DLP), and insider risk management (IRM) to protect the data an interceptor is after. Cyberhaven traces the full lifecycle of your data, adapting protection to changing context. That visibility lets security teams catch the downstream data movement that follows a stolen credential or hijacked session. Network controls reduce how often interception succeeds, and Cyberhaven covers the data layer where the lasting damage occurs.

Data Lineage traces every piece of sensitive data from its origin through every copy, transformation, and transmission. When a MITM attack sends data to an unauthorized destination, Data Lineage provides the chain of custody that shows what was in transit, where it came from, and what happened to it, which compresses investigation timelines.

Cyberhaven DLP monitors and controls data movement at the endpoint and browser layer regardless of transport-layer encryption. When credential theft or session hijacking leads to anomalous data transfers, such as bulk downloads, uploads to external cloud storage, or forwarding of sensitive files, DLP triggers policy enforcement before exfiltration completes.

Cyberhaven IRM adds behavioral context. When an account behaves anomalously after a suspected MITM event, Linea AI identifies the deviation and surfaces it for investigation, which closes the gap between network-layer compromise and data-layer damage.