Explore our new Cybersecurity Terms Glossary, explained by our experts.
Cybersecurity Terms Glossary
A man-in-the-middle attack is one in which an attacker secretly positions themselves between two parties to read or alter the traffic passing between them.

What Is a Man-in-the-Middle Attack?
In a man-in-the-middle (MitM) attack, an attacker quietly inserts themselves into a conversation between two parties, such as a user and a website or two servers exchanging data. Both sides believe they are talking directly to each other, while every message actually passes through the attacker, who can read it, record it, or change it before passing it on.
The idea is old, but it has survived every generation of networking because the underlying weakness never quite goes away: most protocols assume that the path between two endpoints can be trusted. Where that assumption is not backed up by strong encryption and proper identity checks, interception becomes possible.
Every MitM attack has two phases. First comes interception, where the attacker redirects traffic so that it flows through a system they control. Second comes manipulation or decryption, where they make sense of that traffic and, if they wish, alter it.
Common interception techniques include:
Once traffic is flowing through the attacker, they may try to strip encryption by downgrading a connection from HTTPS to HTTP, present a forged certificate, or simply harvest anything sent in clear text.
The prize is usually credentials and session tokens. A stolen session cookie can let an attacker step into an authenticated session without ever knowing the password, which is closely related to session hijacking. Other goals include altering payment details in transit, injecting malicious scripts into web pages, and quietly collecting confidential data over a long period.
A related variant, the man-in-the-browser attack, moves the interception point onto the victim’s own device. Malware inside the browser can change what the user sees and what the bank receives, even when the connection itself is properly encrypted.
Strong, correctly implemented encryption is what turns a successful interception into a useless one. TLS protects data in transit and, crucially, lets the client verify that the server holds a certificate issued for that domain. If an attacker presents a forged certificate, a properly configured client will refuse the connection.
Several controls strengthen this protection:
On internal networks, dynamic ARP inspection, DHCP snooping, and 802.1X port authentication make ARP spoofing and rogue devices far harder. Wireless networks should use WPA3 or WPA2-Enterprise rather than shared passphrases. When staff work from public Wi-Fi, a well-configured VPN adds another layer of protection.
Multi-factor authentication also limits the damage of stolen passwords, although phishing-resistant methods such as FIDO2 security keys are needed to defeat adversary-in-the-middle phishing kits that relay one-time codes in real time.
Signs of a MitM attack include certificate warnings that users are tempted to click through, duplicate IP-to-MAC mappings on a network segment, unexpected changes in DNS responses, and sudden protocol downgrades. Network monitoring and network detection and response tools can flag many of these patterns automatically.
At Privia Security, our Network Security Services test whether traffic on your internal and wireless networks can be intercepted, and our Mobile Application Security Services check that your apps validate certificates correctly.
HTTPS prevents most MitM attacks as long as certificates are validated correctly and users do not ignore warnings. Weaknesses appear when applications skip validation, when a malicious root certificate has been installed, or when malware runs inside the browser itself.
Public Wi-Fi makes interception easier because you cannot verify who controls the access point, and attackers can set up convincing “evil twin” networks in cafés, hotels, and airports. Using sites and apps that enforce TLS, never clicking through certificate warnings, and connecting through a trusted corporate VPN significantly reduce the risk for staff working on the move.
It is a modern phishing technique in which a proxy sits between the victim and the real login page, relaying credentials and one-time codes as they are entered and capturing the resulting session cookie. Phishing-resistant MFA, such as FIDO2 keys, is the most effective defence.
You May Be Interested In These
We use a few cookies that are needed to make this website work, and they are always on. We would also like to set analytics cookies, to see which pages are useful; functional cookies, so that our live chat works; and advertising cookies, to measure our campaigns. We will not set any of those until you say yes, and you can change your mind at any time from the Cookie Settings link in the footer.
Choose the cookies you are happy for us to use. Strictly necessary cookies are always on; everything else is off until you turn it on.
These cookies keep the website working: they hold your security checks, your form submissions and the choice you make here. The site cannot run without them, so they are always on.
These let our live chat open and remember your conversation, and let the newsletter sign-up work. Switch them off and the chat window will not appear.
These tell us which pages are read and how people find us, so that we can improve the site. The reports are about groups of visitors, never about you personally.
These let us measure our advertising and show you our adverts on other websites, such as LinkedIn, Google and Meta. Switch them off and you will still see adverts, but they will be less relevant.