Chapter 4 · Network Security·Intermediate·~14 min

Wireless Security

WPA2's 4-way handshake and the PMKID attack, WPA3 SAE, 802.1X Enterprise flow, and Bluetooth LE pairing modes.

You will learn

  • What the WPA2 4-way handshake exchanges and why captured handshakes can be cracked offline
  • The PMKID attack that skips needing a real handshake
  • How WPA3's SAE handshake defeats offline guessing
  • The 802.1X EAP framework and why Enterprise Wi-Fi is much stronger than Personal
  • Bluetooth LE's four pairing methods and which one to use

WPA2 4-way handshake

After authentication, the client and AP derive a Pairwise Transient Key (PTK) from the Pre-Shared Key (PSK) plus two nonces (one each from client and AP). The four messages exchange the nonces and a Message Integrity Check (MIC) computed under the derived key.

A passive observer of the four messages knows both nonces and both MACs. Given a candidate PSK, the observer can recompute the PTK and check whether the MIC matches. That is offline brute force at billions of guesses per second per GPU. A weak passphrase (anything in a wordlist) falls in minutes.

The defense for WPA2-Personal is a long, random passphrase. Anything memorable and dictionary-derived is crackable.

PMKID: no handshake required

2018 attack (Steube). Many APs include a PMKID (a hash of the PMK, AP MAC, and client MAC) in the first message of the four-way handshake's EAPOL frame, even when no client is connected, in response to specific probe requests. An attacker can extract the PMKID from a single frame and brute-force the passphrase offline, without waiting for an actual client connection.

WPA2-Personal is essentially dead against a determined attacker. Use a 20+ character random passphrase, or move to WPA3.

WPA3 SAE

WPA3 replaces the PSK-with-MIC handshake with Simultaneous Authentication of Equals (SAE), a Password-Authenticated Key Exchange (PAKE) based on Dragonfly. Each guess at the password requires an active interaction with the AP. The attacker cannot brute-force offline from a passive capture; they have to send each guess and wait for a response, which is rate-limited.

WPA3-SAE also provides forward secrecy: capturing today's traffic and the PSK tomorrow does not let the attacker decrypt today's session. Two attacks (Dragonblood) have weakened specific implementations, but the protocol itself, properly implemented, is much stronger than WPA2.

802.1X / EAP for Enterprise Wi-Fi

WPA2-Enterprise and WPA3-Enterprise use 802.1X for per-user authentication via the Extensible Authentication Protocol (EAP). Common EAP methods:

  • EAP-TLS: mutual TLS with client certificates. The gold standard; no passwords on the wire.
  • EAP-TTLS / EAP-PEAP: TLS tunnel established with server cert, then password authentication inside. Server certificate validation matters: if the client does not verify, an attacker with a fake AP and a valid certificate for any domain can phish the password.
  • EAP-PWD: PAKE-based, similar to SAE in spirit.

RADIUS sits behind the AP, doing the actual authentication and returning the per-session keys. Compromise of the RADIUS server compromises all sessions.

Bluetooth LE pairing

BLE has four pairing methods, picked based on the device's capabilities:

  • Just Works: no authentication. Vulnerable to active MITM during pairing. Used by simple devices (headphones, beacons).
  • Passkey Entry: one side displays a 6-digit code, the other types it. Resists MITM if both sides display and type.
  • Numeric Comparison: both sides display a 6-digit code derived from the exchange; the user confirms they match. The right default for phone-to-phone or phone-to-laptop pairing.
  • Out of Band (OOB): pairing material exchanged via a separate channel (NFC, QR). Resists wireless MITM entirely.

BLE Secure Connections (4.2+) added ECDH for the key exchange. Older "LE Legacy" pairing is still common in cheap IoT and is breakable in minutes with the right tools.