Skip to content
Cyber Unboxed
Network Attacks

Man-in-the-Middle Attacks: Why Public Wi-Fi Advice Exists

A man-in-the-middle attack puts an attacker between you and the site you are using, so they can read or change the traffic. Here is how it works.

4 min readIntermediate Nov 27, 2026

Explain Like I'm Not a Hacker

Two people talk through an interpreter who quietly records everything and changes a few words, while each believes they are speaking directly to the other.

The 30-second explanation

Imagine two people talking through an interpreter who quietly records everything and changes a few words here and there, while each side believes they are speaking directly to the other. That is a man-in-the-middle attack. The attacker sits in the path between you and the service you are using. The classic place to do it is a free Wi-Fi network, where the attacker runs a hotspot with a familiar name and everything you send passes through their equipment first. Modern encryption makes this much harder than it used to be, but it still works on people who ignore warnings or log in through a fake sign-in page.

How it works

  1. 1

    1. Get in the path

    The attacker sets up a lookalike hotspot, or manipulates a local network so traffic passes through their device.

  2. 2

    2. Intercept

    Your requests and the site's replies now travel through the attacker's equipment.

  3. 3

    3. Try to read or change

    Without encryption they can read and alter the traffic. With HTTPS they see scrambled data unless they can trick you.

  4. 4

    4. Trick the user

    A fake sign-in page, a prompt to install a certificate, or a warning you click through gives them what encryption denied them.

For an attacker to get between you and a website, they first need to be in the path your traffic takes. On a public network that is easy. They set up a hotspot called something like the cafe's name, and your phone joins it. Other routes exist too. On a shared network an attacker can trick devices into sending traffic through their machine, or they can tamper with the answers to name lookups so that a real address points to a copy. Once they are in the path, what they can do depends on encryption. Almost every site now uses HTTPS, which scrambles the traffic and lets your browser check the site's certificate. An attacker in the middle sees only scrambled data, and if they try to impersonate the site your browser shows a warning. That is why those warnings matter. The attacks that still succeed work around the protection. They show a fake page that asks you to sign in to 'connect to the Wi-Fi', they hope you will click through a warning, or they relay a live login in real time using a lookalike address. The advice about public Wi-Fi comes down to this: treat any unexpected page or prompt on a network you do not control with suspicion.

Real-world example

At an airport a traveller sees two networks with almost the same name and joins the stronger one. A page appears asking them to sign in with their email and password to get online. It is a fake portal run by the attacker, and the credentials are captured on the spot. The connection to the real email site was encrypted all along. The weakness was the portal that asked for a password it never needed. Using mobile data for anything sensitive, and ignoring the portal's request, would have avoided it.

How to spot it

  • Two networks with near-identical names

    A hotspot that looks like the venue's but has a slightly different name, or an open network where a secured one is expected.

  • A sign-in page for 'free Wi-Fi' asking for real accounts

    A captive portal that asks for your email password or social login.

  • Certificate warnings

    Your browser says the connection is not private or the certificate does not match the site.

  • Prompts to install something

    A request to install a certificate, profile or app before you can get online.

What to do

  1. 1Avoid sensitive logins on networks you do not control. Use mobile data, or a VPN you trust, when you must.
  2. 2Never click through a certificate warning, and never install a certificate or profile because a network asks you to.
  3. 3Use passkeys or a security key where you can, because they work only on the real site, and keep your devices updated.

Stay curious. Stay safer.

This is one piece of a bigger picture. Explore more real-world examples, concepts and tips to build your cybersecurity awareness.

Explore More

Keep reading