What Is a Man in the Middle Attack? How MITM Works and How to Stop It
A practitioner's guide to man in the middle attacks: how interception, downgrade, and session hijacking work, what telemetry exposes them, and how to reduce MITM-prone exposure.

What Is a Man in the Middle Attack? How MITM Works and How to Stop It
TL;DR
A man in the middle (MITM) attack is any technique where an adversary secretly positions themselves between two parties — a user and a website, two services, or a device and its gateway — to read, alter, or replay traffic. MITM is not one exploit; it is an outcome enabled by weak transport security, spoofable network protocols, misconfigured TLS, exposed admin interfaces, and unmanaged certificates. Detection depends on telemetry most teams under-collect: certificate anomalies, ARP/DNS behavior, TLS downgrades, and unexpected proxy paths. This article covers the mechanics, the signals that expose them, and the steps that reduce MITM-prone exposure.
What this is
A man in the middle attack occurs when an attacker gains a position in the communication path between two endpoints and can observe or manipulate the traffic without either side realizing it. The "man in the middle" can be a rogue Wi-Fi access point, a compromised router, a malicious browser extension, a poisoned DNS resolver, or an attacker who has already established a foothold and is now pivoting internally.
For practitioners, it helps to separate MITM into two layers:
- Positioning — how the attacker gets into the path (network-level spoofing, rogue infrastructure, BGP or DNS manipulation, compromised intermediaries).
- Exploitation — what they do once positioned (credential capture, session hijacking, content injection, downgrade to plaintext, certificate impersonation).
MITM is often confused with adjacent attacks. It is not the same as a replay attack (though replay is a common MITM follow-on), and it is not the same as a supply chain compromise (though a compromised dependency can enable MITM). The defining property is interception of a live communication channel.
Why it matters
MITM has been a known class of attack for decades, but the modern attack surface has made it more relevant, not less:
- Remote and hybrid work expanded the number of untrusted networks users connect from — home routers, hotels, co-working spaces, mobile hotspots.
- Cloud and SaaS sprawl means more traffic crosses third-party infrastructure, more certificates are issued, and more DNS records are managed by teams who do not talk to each other.
- Internal east-west traffic is often assumed trusted. Once an attacker lands on a flat internal network, ARP spoofing and DNS poisoning remain effective.
- TLS misconfigurations — expired certificates, weak cipher suites, missing HSTS, mixed content — create downgrade opportunities that attackers actively scan for.
- Regulatory and contractual pressure (PCI DSS, HIPAA, SOC 2, NIST guidance) increasingly expects evidence that transport security is monitored, not just configured once.
The business impact is direct: credential theft, session token hijacking, fraudulent transactions, data exfiltration, and lateral movement that is hard to attribute because the attacker never needed to exploit a memory-corruption bug.
How it works
Most MITM attacks follow a recognizable pattern. Understanding the mechanics is what makes detection possible.
1. Positioning techniques
- ARP spoofing — the attacker sends forged ARP replies on a local network, associating their MAC address with the gateway's IP. Traffic destined for the gateway flows through the attacker instead.
- DNS spoofing / cache poisoning — forged DNS responses redirect a victim to an attacker-controlled IP that impersonates the legitimate service.
- Rogue access points and evil twins — a wireless AP broadcasting a familiar SSID, sometimes with a captive portal that harvests credentials.
- BGP hijacking — at internet scale, a network announces routes it does not own, pulling traffic through attacker-controlled infrastructure.
- Compromised intermediaries — a malicious proxy, VPN concentrator, browser extension, or CI runner that sits in the path legitimately.
- On-path via existing foothold — after initial access, an attacker uses tools like responder or mitmproxy internally to intercept authentication traffic.
2. Exploitation techniques
- TLS stripping / downgrade — the attacker intercepts an HTTP request and prevents the upgrade to HTTPS, or forces a weaker protocol version.
- Certificate impersonation — presenting a self-signed or mis-issued certificate and relying on the victim ignoring warnings, or on a compromised CA.
- Session hijacking — capturing session cookies or tokens that are not bound to a device or IP, then replaying them.
- Credential capture — intercepting authentication flows, including NTLM hashes on internal networks.
- Content injection — modifying responses to inject malicious scripts, redirects, or fraudulent content.
3. Why it often succeeds
MITM succeeds when one of three conditions holds: the transport is not actually encrypted end-to-end, the encryption is present but not verified (no certificate pinning, users click through warnings), or the network path is assumed trusted when it is not. Attackers do not need a zero-day. They need a misconfiguration, an unmanaged certificate, or a flat network.
Detection and response
Hypothesis: if MITM conditions exist on your attack surface, telemetry will show certificate anomalies, ARP/DNS behavior, TLS downgrades, or unexpected proxy paths. The evidence that confirms or rejects it comes from correlating signals across layers.

Network layer
- ARP table anomalies: duplicate IP-to-MAC mappings, gratuitous ARP storms, MAC address changes for gateway IPs.
- DNS query/response mismatches: responses that do not match the queried domain, unusually short TTLs, resolver changes.
- Unexpected TLS inspection or proxy certificates appearing in traffic that should be end-to-end encrypted.
Transport layer
- Certificate transparency monitoring: new certificates issued for your domains that you did not request.
- TLS configuration drift: protocol version downgrades, cipher suite changes, HSTS header removal.
- Certificate expiry and chain validation failures on internet-facing services.
Endpoint and identity layer
- Authentication events from unexpected geographies or ASNs shortly after a user connects to a new network.
- Session tokens reused from different device fingerprints.
- Endpoint telemetry showing new root CA certificates installed without change-management approval.
Application layer
- Mixed content warnings, failed HSTS preload checks, and inconsistent redirect behavior between HTTP and HTTPS endpoints.
- API endpoints accepting plaintext where TLS is expected.
Good visibility means correlating these signals with asset ownership and business context. A certificate anomaly on a decommissioned host is not the same as one on a payment endpoint. That correlation is where most point tools stop and where CTEM workflows add value.

What to do
- Enforce TLS everywhere, including internally. Disable TLS 1.0/1.1, prefer 1.2+ with modern cipher suites, and enable HSTS with a long max-age on all public services.
- Inventory and monitor every certificate. Track issuance, expiry, and chain validity across all domains and subdomains. Certificate transparency logs are a free early-warning system.
- Segment internal networks. Flat networks make ARP spoofing trivial. Use VLANs, private VLANs, and dynamic ARP inspection where supported.
- Harden DNS. Use DNSSEC where feasible, monitor for resolver changes, and restrict who can modify DNS records.
- Bind sessions to more than a cookie. Use short-lived tokens, device binding, and re-authentication for sensitive actions.
- Deploy and monitor endpoint trust stores. Alert on new root CAs installed outside change management.
- Train users on certificate warnings and captive portals. The human click-through is still a primary MITM enabler.
- Continuously scan your external attack surface for exposed admin interfaces, outdated TLS, and services that should not be internet-facing.
- Validate findings before alerting. Not every TLS warning is an active MITM. Prioritize based on exploitability and business context.
- Integrate MITM-relevant signals into SOC triage. Certificate anomalies, ARP events, and DNS mismatches should route to analysts with context, not raw logs.
FAQ
Q: What is the difference between MITM and eavesdropping? Eavesdropping is passive observation. MITM implies an active position in the path where the attacker can also modify or replay traffic. Many MITM attacks begin as eavesdropping and escalate.
Q: Does HTTPS prevent man in the middle attacks? HTTPS prevents MITM only when certificates are properly validated and the client does not bypass warnings. TLS stripping, mis-issued certificates, and user click-through all defeat HTTPS in practice.
Q: How do I detect a MITM attack on my network? Look for ARP table anomalies, DNS response mismatches, unexpected proxy or root CA certificates, and authentication events from unusual locations. Correlate these with asset ownership to separate real incidents from noise.
Q: Is MITM only a concern on public Wi-Fi? No. Internal networks, cloud environments, and even CI/CD pipelines are MITM-relevant. Any path where traffic is assumed trusted is a candidate.
Q: What telemetry should I prioritize for MITM detection? Certificate transparency logs, TLS configuration drift, ARP and DNS anomalies, and authentication events tied to network changes. These four cover most MITM positioning and exploitation paths.
Q: What is the relationship between CTEM and MITM defense? CTEM (Continuous Threat Exposure Management) provides the continuous discovery, validation, and prioritization workflow that MITM defense needs. Instead of one-off TLS checks, CTEM keeps the exposure view current and routes actionable risk to the SOC.
Where this fits in a program
Sources
- Trusteed CTEM platform — continuous threat exposure management for external and internal attack surface.
- Trusteed app — operator workflow for scan plans, findings, and SOC prioritization.
- NIST SP 800-52 Rev. 2: Guidelines for TLS — transport security configuration guidance.
- CISA: Understanding and Mitigating MITM Attacks — federal guidance on network interception risks.
- OWASP Transport Layer Security Cheat Sheet — practical TLS hardening for web applications.
- Certificate Transparency — monitoring certificate issuance for your domains.