Home › Guides › Man-in-the-middle attacks: what they are and how to protect yourself
GUIDE · NETWORK SAFETY

Man-in-the-middle attacks: what they are and how to protect yourself

Imagine someone secretly standing between you and your bank, passing your messages back and forth and quietly reading or changing them. That is a man-in-the-middle attack. The good news is that modern websites make it hard, and a few habits make it harder.

Published October 13, 2026 · Written and maintained by the cyberhygiene.tools team

The quick version

  1. A man-in-the-middle (MITM) attack means someone secretly sits between you and the site or person you are talking to.
  2. Common routes are fake Wi-Fi networks, tampered website lookups and stolen login sessions.
  3. Never click past a browser certificate warning on a site you use for money or email.
  4. On public Wi-Fi, check the network name, switch off auto-connect, and use mobile data for anything sensitive.
  5. Two-factor sign-in with an app or passkey limits the damage if a password is captured.

In this guide

  • What a man-in-the-middle attack is
  • The common ways it happens
  • Warning signs
  • How to protect yourself
  • How defenders look for it (in plain terms)
  • An illustrative example
  • Public Wi-Fi at a glance
  • If you think you have been targeted
  • Frequently asked questions
  • Sources

What a man-in-the-middle attack is

In a normal connection, your device talks directly to a website, with only the network in between. In a man-in-the-middle (MITM) attack, someone slips into that path. They can watch what passes through, steal what is useful, such as passwords or card numbers, and in some cases change messages on the way. Both ends think they are talking to each other, so nothing looks wrong.

A common picture is a fake bank chat. The victim thinks they are talking to the bank, and the bank thinks it is talking to the customer, while an attacker in between collects everything and makes use of it. The pattern appears wherever people trust a connection they cannot see.

This kind of attack used to be easy because most of the web was unencrypted. Today most sites use HTTPS, which scrambles the traffic between you and the site, so a MITM attacker usually has to trick you into something first: joining their network, accepting a bad certificate, or typing details into a lookalike page. That is why the habits at the end of this guide matter more than any special software.

The common ways it happens

Warning signs

None of these proves an attack, but together they are a reason to stop, disconnect and use a different network.

How to protect yourself

  1. Never click through certificate warnings on sites where you log in, pay or read email. The warning is the browser telling you the identity of the site cannot be trusted.
  2. Look for HTTPS and the right address. Check the web address carefully. Our link safety checker flags lookalike names.
  3. Be careful with public Wi-Fi. Check the exact network name with staff, and turn off “auto-connect” for public networks. For banking or anything sensitive, use your phone’s mobile data instead.
  4. Use a VPN on untrusted networks if you want an extra layer. A reputable VPN encrypts traffic between your device and the VPN company, which helps on shared Wi-Fi. It is not a cure-all, and you are trusting the VPN company instead, so choose carefully.
  5. Turn on two-factor authentication. Even if a password is captured, the attacker still needs the second step. Passkeys and security keys are the strongest, because they are tied to the real site and cannot be handed over to a fake one. See our two-factor walkthrough.
  6. Log out of sensitive accounts when you finish, especially on a shared computer.
  7. Keep devices updated and free of malware, since malware can steal session data directly. See our malware guide.
  8. Secure your own network. A weak home router is an easy place to tamper with lookups. Follow our router security checklist.
  9. Do not log in through links in messages. Type the address yourself or use your saved bookmark or app.

How defenders look for it (in plain terms)

People who run networks use more technical checks, but the ideas are worth knowing because they show what an attack leaves behind:

If you manage a small business network, ask your IT provider whether they do these checks, and whether staff laptops are set up to warn about unsafe networks.

An illustrative example

This is a made-up scenario to show how it could go. It is not a real case.

Priya is at an airport and sees a Wi-Fi network called “Airport_Free_WiFi”. Her phone connects automatically, because last time she used the same name in another airport. A pop-up asks her to “verify” her email address and password to get online. She types them in, and then checks her bank. The page loads slowly and shows a login screen she does not remember, so she logs in again.

What went wrong: the network was a lookalike, her phone joined it automatically, and a fake page collected her details twice. What would have helped: turning off auto-connect, checking the exact network name with airport staff, never entering her email password to join Wi-Fi, using mobile data for banking, and having two-factor sign-in so a captured password alone would not have been enough.

Public Wi-Fi at a glance

Reasonable to do:

Better to avoid, or to do on mobile data:

If you think you have been targeted

  1. Disconnect from the network and switch to mobile data or another trusted network.
  2. Do not log in to anything further on the suspect network.
  3. Change your passwords from a trusted connection, starting with email and banking, and turn on two-factor sign-in.
  4. Check your accounts for activity you do not recognise, and tell your bank if you entered card or banking details.
  5. Forget the network on your devices so they do not reconnect automatically.
  6. Report it. Tell the venue if it was public Wi-Fi, and find the right agency in your country on our Report a Scam page if money was lost.
What this means for you
  • Browsers and HTTPS already do most of the work. Your job is to notice warnings and not click past them.
  • Use mobile data or your own network for anything sensitive, and use two-factor sign-in everywhere it is offered.

Sources

Published October 13, 2026. We check every claim against the sources above and say clearly when something is advice rather than fact. This guide is general information, not legal or financial advice. Dollar amounts are in US dollars, as reported.


Frequently asked questions

Can someone read my messages on public Wi-Fi?

Most apps and sites encrypt traffic, so ordinary reading is much harder than it used to be. The risk is mostly from fake networks, fake pages and anything that is not properly encrypted, which is why you should avoid sensitive tasks on public Wi-Fi.

Does a padlock mean I am safe?

It means your connection to that site is encrypted. It does not prove the site is the one you meant, because scammers can get padlocks on lookalike sites. Check the address too.

Does a VPN stop man-in-the-middle attacks?

It helps on untrusted networks because it encrypts traffic between you and the VPN company. It does not stop phishing, and it does not protect you if your device has malware.

How is this different from phishing?

Phishing tricks you into giving details to a fake page. A man-in-the-middle attack positions the attacker inside the connection. In practice they often overlap, and the same habits help against both.