Labs / Red Team / MITM: ARP, DNS & public Wi-Fi

Lab 3 of 3 · MITM: ARP, DNS & public Wi-Fi

Hotel Wi-Fi: who is on your path

Someone is on your path on a hotel network: HTTP read and rewritten, HTTPS warns.

Open this lab Pro 6 steps

The idea

On hotel or café Wi-Fi the way out runs through machines you do not control — an on-path attacker can sit there: plain HTTP is readable and changeable, HTTPS warns instead, and the warning is the thing protecting you.

Your default gateway sees every packet
Your default gateway sees every packet
Caught by the answer, not the page
Caught by the answer, not the page

Steps

  1. Two devices, two paths

    The laptop and the phone share one Wi-Fi, but not one first hop. Find each device's gateway, then trace the path to the same web server. Whoever runs your first hop sees everything you send off the network.

    laptop:~# ip route
    laptop:~# traceroute -q3 -w2 webServer.lab
    phone:~# traceroute -q3 -w2 webServer.lab
  2. Plain HTTP is readable

    Plain HTTP sends the whole request as readable text. Both devices "log in" over HTTP while the proxy records port 80. The password is in the clear for whoever carries it — but only the laptop's path crosses the proxy.

    laptop:~# curl -sS -d 'user=guest&password=hunter2' http://webServer.lab/login -o /dev/null -w '%{http_code}\n'
    phone:~# curl -sS -d 'user=you&password=correcthorse' http://webServer.lab/login -o /dev/null -w '%{http_code}\n'

Pro

4 more steps in the app

  1. The attacker changes the page
  2. HTTPS notices
  3. Clicking through the warning
  4. Before you sign in
Get Pro

Learn it on real machines.

Every lab is a small network of real Linux machines in your browser. Start with a free account: Google or email, no card.

Open this lab