Man-in-the-Middle Attack (MITM)
A man-in-the-middle attack (MITM) is when an attacker secretly places themselves between two parties, such as a user and a website or wallet service, to read, relay or alter the messages passing between them.
In a MITM attack, both sides believe they are communicating directly, but the traffic actually flows through the attacker. Common setups include rogue Wi-Fi access points in airports, hotels and cafés, compromised routers, and DNS hijacking that sends a user to a fake server. If the connection is unencrypted, or the user clicks past a browser certificate warning, the attacker can capture passwords, session cookies and two-factor codes, or change what appears on screen.
For crypto users, the main danger is not tampering with a transaction after it is signed, because a digital signature makes such changes detectable. The risk is changing information before it is signed. For example, someone on airport Wi-Fi joins a fake hotspot that serves a lookalike exchange page showing the attacker's deposit address instead of the real one. The user copies that address and sends funds, and the transfer cannot be reversed.
Encrypted connections such as HTTPS, end-to-end encryption between wallets and dApps, and checking the receiving address on a hardware wallet's own screen all reduce the risk. A common misconception is that a VPN removes it entirely. A VPN encrypts traffic between the device and the VPN server, which helps on untrusted networks. It does not stop malware, fake websites the user visits by choice, or a VPN provider that is itself malicious or compromised.