Skip to content

Lesson 9 of 13 · 11m

KRACK and FragAttacks: When the Protocol Itself Broke

KRACK replayed handshake message 3 to reinstall keys and reuse nonces; FragAttacks broke aggregation — both patched, both instructive about where Wi-Fi's durable weakness lives.

WPA2's handshake was formally verified. The proof covered a model, and the model didn't cover replaying message 3. In October 2017 Mathy Vanhoef published KRACK — Key Reinstallation Attacks — and the verified protocol broke anyway.

KRACK: replaying frame 3

The handshake had been formally verified years earlier, which made the October 2017 disclosure land harder: Mathy Vanhoef's KRACK — Key Reinstallation Attacks — showed the verified model never covered what happens when a frame shows up twice.

In the 4-way handshake, message 3 tells the client to install the PTK and GTK. If an attacker replays message 3, vulnerable clients reinstall the same key — and reset the packet nonce that AES-CCMP uses as its per-message IV. Same key + same nonce = identical keystream; two encrypted packets under one keystream is the classical condition for keystream-recovery decryption, and in some configurations injection and forgery too.

The ugliest variant was wpa_supplicant 2.4/2.5 — which is Linux, and Android 6.0+. Following the letter of the standard, a retransmitted message 3 made it install an all-zero encryption key — the spec says clear the key from memory after first install, and wpa_supplicant did exactly that, then reinstalled the cleared buffer on replay. An attacker replaying at the right moment got a client encrypting with a key of all zeros. Ten CVEs (CVE-2017-13077 through -13088) covered the protocol attack across implementations; vendors patched by refusing key reinstallation and by not resetting nonces.

FragAttacks

Vanhoef again, May 2021: a family of twelve flaws — three in protocol design, the rest implementation bugs covering essentially every Wi-Fi device ever shipped. The headline design flaw: the A-MSDU "is aggregated" flag in frame headers was never authenticated, so an attacker could flip it and split a victim's packet into attacker-chosen pieces — practical consequences ranging from DNS poisoning tricks to injecting frames against clients behind NAT. The implementation bugs were the usual suspects in drivers and stacks, patched vendor by vendor.

Neither needed your passphrase

Both papers broke WPA2 without touching the PSK at all — no dictionary attack, no capture, nothing to grind. KRACK turned data confidentiality into a math problem of known plaintext; FragAttacks broke frame handling at the layer below the cipher entirely. They are the counterexample to "just pick a long password": the protocol itself was the hole, and the fix was a patch, not entropy.

What these prove

KRACK and FragAttacks got fixed everywhere in months — that's what protocol bugs are for: a CVE, a patch, an end date. The durable lesson is about where Wi-Fi's weaknesses live:

  • Protocol bugs arrive with a CVE number, a patch, and an end date. PSK guessing has no CVE and never ends.
  • The verify-then-ship process for standards doesn't cover replay/reassembly edge cases — a model of the handshake proved the handshake, and real deployments run frames on real radios.
  • AP firmware is infrastructure firmware: it sits on an old kernel, gets patches on vendor cadence, and the day after EOL it is unpatchable forever afterward.

What to do

  • Firmware cadence is a security control. Inventory every AP and bridge, track advisories, and EOL hardware is a removal ticket not a purchase-order discussion.
  • Patch clients too — KRACK's worst variant was a client-side bug, and your laptop's supplicant is in scope.
  • Keep perspective when writing the report: the exploit you can demo live is still deauth + handshake crack, because passphrases don't get patched — but protocol CVEs are the reason "is firmware current" is always the first question on a wireless audit.

Was this lesson helpful?

Sign in to rate

Keep reading

Related articles from the SudoSecurity blog.