Written by: Mio Kanzaki(Security Analyst (AI))Reviewed by: 千葉圭介Updated
A man-in-the-middle attack intercepts the communication between two parties and allows the attacker to read or alter the content while it passes through. OWASP describes it as an attack where the attacker captures a communication between two systems, positions themselves as the relay, and reads, inserts, or changes the content. The abbreviation MITM is common; OWASP also uses the term manipulator-in-the-middle.
How does a man-in-the-middle attack work?
Imagine a letter being opened on its way through the post, read, and then resealed and delivered as if nothing had happened. Neither the sender nor the recipient would know. MITRE's attack-pattern catalog CAPEC describes the same dynamic: the exchange passes through the attacker once before reaching its destination, and both sides have difficulty noticing.
According to OWASP, the attacker splits the original connection into two: one between themselves and the user, and another between themselves and the server. Over unencrypted HTTP, the content is fully visible, which makes the attack particularly straightforward. Over HTTPS, the attacker can establish the same two-connection arrangement. For guidance on protecting app and form traffic, see the insecure communication page.
Why does a man-in-the-middle attack matter?
Interception leads directly to data exposure. Beyond reading the content, the attacker can also modify it, which means values such as a transfer amount could be changed without the sender knowing. CAPEC notes that unlike pure eavesdropping attacks, most man-in-the-middle attacks alter the content and then deliver it to the recipient.
HTTPS does not make a site immune. OWASP explains that browsers issue a warning when an untrusted certificate appears, but some users proceed without understanding the warning. If the attacker obtains the server's certificate or uses a certificate signed by a compromised certificate authority, no warning appears at all.
CAPEC lists encryption of communication and mutual authentication — including verifying that a public key carries a signature from a certificate authority — as the core technical defenses. For site operators, running the whole site over HTTPS and considering HSTS to prevent unencrypted connections are the standard measures. Users should close the browser when a certificate warning appears rather than continuing.
The free URL check shows how your site's encryption configuration looks from outside. For reviewing the design of your communication channels, contact us.
Related terms
- HSTS: a mechanism that tells the browser to use only encrypted connections.
- AiTM phishing: a technique that intercepts authentication, including two-factor codes, through a proxy site.
- DNS spoofing: a technique that sends users to a fake site by manipulating DNS address records.
- Replay attack: an attack that retransmits captured traffic to impersonate the original sender.
Frequently asked questions
Does HTTPS prevent a man-in-the-middle attack?
Not completely. OWASP explains that even over HTTPS, the same form of attack can succeed if the user ignores a certificate warning.
What should a user watch for?
If the browser shows a certificate warning, close the page rather than continuing. OWASP lists users who ignore warnings without understanding them as one reason these attacks succeed.
Next step
For protecting app and form traffic, see the insecure communication page. The free URL check shows how your encryption configuration appears from outside. To review the design of your communication setup, contact us.
Frequently asked questions
Does HTTPS prevent a man-in-the-middle attack?
Not completely. OWASP explains that even over HTTPS, the same form of attack can succeed if the user ignores a certificate warning.
What should a user watch for?
If the browser shows a certificate warning, close the page rather than continuing. OWASP lists users who ignore warnings without understanding them as one reason these attacks succeed.