Lesson 1 of 13 · 12m
What Your Laptop Actually Does When It Joins a Network
Beacons, probes, Open System authentication and association — the four exchanges before any key material moves, and which fields matter in each frame.
A laptop joining HomeNet does not send a password to the router. It listens for beacon frames, optionally sends a probe request, runs an "Open System" authentication exchange that authenticates nothing, associates, and only then runs the 4-way handshake that proves it knows the key. Four exchanges before a single byte of key material moves, and three of them happen in plaintext.
The beacon stream
Every AP broadcasts beacon frames roughly every 102.4 ms — 100 time units, each TU being 1024 µs. The beacon is the advertisement: SSID, BSSID, supported rates, channel, capability flags, and the RSN information element that announces which cipher suites the AP will accept (AES-CCMP for WPA2, SAE groups for WPA3). Passive discovery is just listening. airodump-ng wlan0mon with no options shows you every beacon in range — BSSID, channel, encryption, client count, signal power.
The distinction that matters: the SSID is a name, a 0–32 byte string any AP may claim. The BSSID is the AP's MAC address, and it isn't authenticated either. Nothing in the beacon proves the AP is who it says it is. That is the entire basis of the evil twin attack, and it is not a bug — it is the protocol.
Probe, authenticate, associate
Active discovery is a probe request: the client broadcasts "is anyone named X?" and matching APs answer with a probe response carrying the same data a beacon would. Clients also send wildcard probes asking who is out there at all. Both directions are plaintext. Your phone announcing every network it has ever joined — "Starbucks WiFi", "Hilton Honors", your home SSID — is the preferred network list leaking over the air, which is the hook KARMA-style attacks pull on.
Then comes a step named misleadingly: 802.11 authentication. In every network you'll meet, this is Open System authentication — two frames, request and response, that always succeed. It authenticates nothing. The name is a leftover from WEP-era Shared Key authentication, which died because it literally handed attackers keystream. The real proof of key possession is the 4-way handshake, which runs after association.
Association is where the AP accepts the client into the BSS and hands back an Association ID. The client sends its capabilities and the RSN IE declaring what it can speak. From this point the client is "on the network" but has established nothing cryptographic.
Three addresses per frame
Ethernet frames carry two MACs. 802.11 data frames carry three, sometimes four, because the frame has three parties: the sender, the receiver, and the radio doing the forwarding. ToDS/FromDS bits in the frame control field say which direction the frame is moving — client-to-AP, AP-to-client, or AP-to-AP in a wireless distribution system, which is when the fourth address appears. When you read a capture, DA, SA, and BSSID are three separate fields, and the BSSID is the AP regardless of direction.
Channels
2.4 GHz gives you channels 1–11 in the US (14 in Japan), and only 1, 6, and 11 are non-overlapping — each channel is 20 MHz wide on 5 MHz centers, so channel 3 bleeds into both 1 and 6. 5 GHz adds DFS: on radar-shared frequencies the AP must listen before transmitting and must vacate the channel if radar appears — this is why APs sometimes "randomly" change channels. 6 GHz, added with Wi-Fi 6E, is WPA3-only: WPA2 is not permitted there at all.
The wrong mental model
The model to discard is "connecting = logging in." Association is not authentication. Everything before the 4-way handshake is cleartext, unauthenticated broadcast, and an attacker with a $30 Alfa adapter hears all of it and can forge most of it.
What to do
Run sudo airmon-ng start wlan0 then sudo airodump-ng wlan0mon on any lab machine and read the columns until they're boring: BSSID, beacon count, channel, ENC (WPA2, WPA3, OPN), ESSID. Everything above was visible in that table. Wireshark on a monitor-mode interface shows the raw frames — look at wlan.fc.type_subtype values 0x08 (beacon), 0x04/0x05 (probe), 0x0b/0x0c (authentication), 0x00/0x01 (association).
Was this lesson helpful?
Keep reading
Related articles from the SudoSecurity blog.
The Same Researcher Broke apt the Same Way Twice, Seven Years Apart
In 2019 Max Justicz showed apt would install a package an attacker swapped in over a redirect. In November 2026 he did it again, CVE-2026-109518, through a different door that ends in the same place: code as root from a man in the middle. The fix shows how apt reuses files on disk.
A 257-Byte Password Is the Key: Inside the OpenSSH musl Bypass
CVE-2026-123158 lets an attacker log into a locked account on musl-based systems like Alpine by sending a password nobody set. The trigger is one number, 257, and the reason is a C library returning a single asterisk. I reproduced the exact boundary against musl 1.2.4 and read the fix.
Zero-Trust Access for Homelabbers: Teleport vs. Tailscale vs. WireGuard vs. Cloudflare Tunnel
Four tools solve four different problems that all get pitched as the same problem. Here's what each one does, where each one breaks, and the combination that covers a real homelab without paying an SSO tax you didn't see coming.
Zero Trust Everything: The Complete Guide to Self-Hosting Teleport for Secure Infrastructure Access
SudoSecurity runs Teleport internally for everything — admin panel access, secure database connections, Kubernetes, and zero-trust philosophy across our entire team. This is the complete technical guide to installing, configuring, and running your own self-hosted Teleport cluster from scratch.