← Networks

Network capture the flag

Four flags hidden in the club's own network traffic, each found with an idea from this course: which packets anyone on the Wi-Fi could read, putting packets back in number order, which packet TCP must ask for again, and the quickest route round an overloaded router. Then fix every device that still sends readable data.

The club's network is sending its secrets where anyone can pick them up. Find four of them before someone else does.

A capture the flag (CTF) is a security challenge: you look for what a system gives away, with permission, and each find is a flag, a secret like WP{…} to type in. This is the club's own network, and you're checking it for the club. Each flag needs one idea from this course.

EngageCommit to a prediction before you test anything. A wrong guess is fine: it shows you what to look for.

Engage: who can see it?

A device on the club Wi-Fi sends a message without HTTPS. Who could read it?

ExploreTry it on the board and compare what happens with your prediction.

Explore: four flags

Need a hint?

Open every packet.

Another hint

Scrambled packets were encrypted. Which ones can you read?

Need a hint?

The packets took different routes, so they arrived out of order.

Another hint

Each packet carries its number. Put them back from 1 up.

Need a hint?

Check the numbers from 1 to 16 one at a time.

Another hint

Which number isn't there?

Need a hint?

Try a few routes from A to H and compare their delays.

Another hint

The quickest routes go through E, which loses packets. Avoid it.

Another hint

Add up the delays for every route that avoids E.

Try it yourselfYour edits are saved in this browser.

Flag 1 (who can see your data?). This capture shows what anyone on the club Wi-Fi could pick up. One readable packet holds the flag.

Flag 2 (packets). A message from the club server arrived out of order. Put the packets back in order and read it.

Flag 3 (TCP). One packet of the backup never arrived. Which one must TCP ask for again? The flag is WP{resend- then its number, then }.

Flag 4 (routes). Find the quickest route from A to H that avoids the overloaded router E. The flag is WP{ then the routers' letters in order, then }.

ExplainPut a name to what you saw, and why it works.

Explain: what the flags show

Worked exampleBefore each step, say what you think comes next.
  1. Flag 1\text{Flag 1}Data sent without encryption can be read by anyone who picks it up.

Find the mistake

Sam checks the club network. Click the line where it first goes wrong.

ElaborateUse the idea in a new situation.

Elaborate: fix the network

Try it yourselfYour edits are saved in this browser.
Need a hint?

Which devices sent readable packets?

Another hint

Ask of each fix: after it, can someone who captures the packet read it?

Fix every club device that sends readable data.

Use the board. This ticks when you get there.

EvaluateLook back at your first ideas and what changed.

Evaluate: look back

You're on a café's free Wi-Fi. Which is safe to do?

For teachers

The Networks challenge. Students find four flags in the club's own (made-up) network traffic, each with one idea from the course (readable unencrypted packets, packet numbers to reorder a message, the packet TCP must resend, and the quickest route round an overloaded router), then fix every device that sends readable data (AC9TDI8K02 nodes 2 and 5). Defensive throughout. A 5E mission lesson. About 45 minutes.

Open the teacher guide: answers, solutions, slides and a worksheet.

Students will be able to

Before class

Try each flag yourself. Everything is made up and runs on the board.

Flags (for you, not students): 1 WP{plain-text-is-public} (the Room 12 display's packet), 2 WP{numbers-put-it-back} (packets in number order), 3 WP{resend-11}, 4 WP{ABDGH} (19 ms; through E is 12 ms but loses packets).

Format: like most capture-the-flag events (picoCTF among them), each student works alone and only the score is shared. To run it as a class event, pairs race to four flags and you keep score.

Rules of the game: only capture traffic on a network you own or have permission to check, as here. Real tools (such as Wireshark) capture packets the same way; using them on networks you don't own is against school rules and the law.

Simplifications: the capture shows one packet per device; real captures show thousands. A Wi-Fi password does encrypt the radio link from each device to the router (WPA2/WPA3), but others with the password are on the same network, and past the router the data crosses the internet, so HTTPS is what protects it end to end.

Running the lesson

  1. Engage: ask what the Wi-Fi password protects, and from whom.
  2. Explore: circulate; ask which lesson's idea each flag needs before giving a hint.
  3. Explain: name the idea behind each flag together.
  4. Elaborate: ask why sending updates at night isn't a fix.
  5. Evaluate: discuss what to check before using a café's Wi-Fi.

The hard part (on purpose)

Flag 4: students take the first route that reaches H. Ask them to list every route that avoids E and add up each one.

When students get stuck

Stretch and support

Stretch: Change the map: if the link from D to G became 15 ms, which route would you use? Work it out, then design your own map with a busy router and a unique best route.

Support: A card with the four ideas: encryption, packet numbers, TCP resends, routes.

Where it leads

End of the course. Capture the flag (Digital systems) and Security and privacy have more.

What each step is for

Now you can
You reached the endBack to Networks