Why Weak Passphrases Fall: Offline Guessing as a Concept
The previous lesson showed that an access point checks a WPA2 client by recomputing one MIC. Anyone who recorded M1 and M2 can run that same check on their own computer, as often as their hardware allows, and the network never notices. This is offline guessing, and it is why the strength of a WPA2-Personal network is exactly the strength of its passphrase. This lesson explains the mechanism as a concept, without a capture-and-crack walkthrough, and turns it into numbers a defender can use: which passphrases survive, how to generate and check them, and what makes the whole problem disappear.
Online versus offline guessing
| Online guessing | Offline guessing | |
|---|---|---|
| where guesses are tested | against the live AP, one handshake per guess | on the attacker's hardware, against a recorded M1 + M2 (or a PMKID) |
| speed | a few guesses per second at most | limited only by computing power and money |
| visible to the defender | yes: PSK-mismatch events in the AP log | no: nothing reaches the network |
| defences | lockouts, alerts, WIDS | only the passphrase's unpredictability, or a protocol without an offline test (SAE) |
An attacker needs one recording of a successful handshake. It happens every time a client joins, and before PMF a forged deauthentication could make it happen on demand (PMF). After that, the attacker can leave.
How much is one guess?
One guess costs about 8,192 HMAC-SHA1 computations (the key chain). On current graphics cards that gives roughly a million guesses per second per GPU, as an order of magnitude; rented clusters scale it by a thousand. The lab below uses the custom-rate setting as "WPA2 guesses per second": is one GPU, a large cluster. The symbol set "7776 Diceware words" counts words instead of characters.
Try 8 lowercase letters (set "26 a–z", length 8) at : under two minutes. Then 6 Diceware words: still millions of years at . And 20 characters from the 62-symbol set: longer than the age of the universe at any rate the lab offers.
The same comparison as a table, for passphrase policies you meet in real configurations. Search spaces assume each choice is made uniformly at random; a passphrase a human invents is far weaker than its length suggests, because guessing programs try words, names, dates and common patterns first.
import math
RATES = {"1 GPU, 10^6/s": 1e6, "cluster, 10^9/s": 1e9} # orders of magnitude, not benchmarks
policies = [ # (description, number of equally likely choices)
("8 lowercase letters", 26 ** 8),
("dictionary word (50k) + 2 digits + '!'", 50_000 * 100),
("12 chars from a-z A-Z 0-9", 62 ** 12),
("5 Diceware words (7776 list)", 7776 ** 5),
("20 chars from a-z A-Z 0-9", 62 ** 20),
]
def human(seconds):
for unit, s in (("years", 31_557_600), ("days", 86_400), ("hours", 3600), ("minutes", 60)):
if seconds >= s:
v = seconds / s
return f"{v:.1e} {unit}" if v >= 1e4 else f"{v:,.1f} {unit}"
return f"{seconds:.1f} seconds" if seconds >= 0.1 else "under 0.1 s"
print(f"{'passphrase policy':46} {'bits':>5} " + " ".join(f"{k:>16}" for k in RATES))
for name, space in policies:
bits = math.log2(space)
times = [human(space / 2 / r) for r in RATES.values()]
print(f"{name:46} {bits:5.1f} " + " ".join(f"{t:>16}" for t in times))passphrase policy bits 1 GPU, 10^6/s cluster, 10^9/s
8 lowercase letters 37.6 1.2 days 1.7 minutes
dictionary word (50k) + 2 digits + '!' 22.3 2.5 seconds under 0.1 s
12 chars from a-z A-Z 0-9 71.5 5.1e+07 years 5.1e+04 years
5 Diceware words (7776 list) 64.6 4.5e+05 years 450.5 years
20 chars from a-z A-Z 0-9 119.1 1.1e+22 years 1.1e+19 years
The second row is the important one. "A word, two digits and an exclamation mark" looks like 11 characters, but an attacker who guesses in that pattern faces only about five million candidates: seconds on one GPU. Patterns, not length, decide the real search space.
What this lesson deliberately doesn't show
Tools that test recorded handshakes against word lists exist and are widely documented. Their command lines are not part of this course: running them against networks you don't own is illegal in most countries, and a defender doesn't need them. The defender's questions are "can our passphrase be guessed?", answered by the table above at configuration time, and "can we remove the offline test?", answered by WPA3-SAE.
How the risk is detected
Offline guessing itself is invisible, so detection targets the conditions that make it possible:
- Configuration review: networks offering only AKM 2 (PSK) and no SAE; passphrases shorter than 20 characters or following a pattern; default SSIDs; the same passphrase at several sites.
- Passphrase checks at configuration time (below), never by attacking your own captures with shared tooling on uncontrolled machines.
- WIDS signals that a capture is being forced: deauthentication bursts against PSK networks without PMF (Rogue APs and WIDS).
- Exposure: passphrases on stickers in meeting rooms, in chat history, in old onboarding documents.
How it is fixed
- Move to WPA3-SAE (or WPA3 transition mode as a step): a recording no longer allows offline tests (WPA3-SAE).
- For organisations, use Enterprise (802.1X): per-user credentials, revocable per person.
- Where WPA2-PSK must stay: a generated passphrase of at least 20 characters from letters and digits (about 119 bits), or 6+ Diceware words, never invented by a person; a unique SSID; PMF on; rotation when staff leave or the passphrase leaks.
- Per-device or per-group PSKs where the controller supports them, so one leak exposes one device class.
An administration tool should generate the passphrase from a cryptographically secure source and check any passphrase typed in by a person. The program prints the generated passphrase's length and strength, not the passphrase:
import math, secrets, string
ALPHABET = string.ascii_letters + string.digits # 62 symbols, easy to type on phones
def new_psk(length=22): # what an admin tool should do
return "".join(secrets.choice(ALPHABET) for _ in range(length))
def check_psk(psk, ssid):
problems = []
if not 8 <= len(psk) <= 63: problems.append("length must be 8-63 characters")
if len(psk) < 20: problems.append("shorter than 20 characters")
if psk.lower() in {"password", "password123", "letmein123", "qwertyuiop"}: problems.append("on a common-password list")
if ssid.lower().replace("-", "") in psk.lower().replace("-", ""): problems.append("contains the SSID")
if psk.isdigit(): problems.append("digits only (phone numbers, dates)")
return problems or ["ok"]
psk = new_psk()
print("generated:", len(psk), "characters,", f"{len(psk) * math.log2(len(ALPHABET)):.0f} bits")
for candidate in ("password123", "LabNet2026!", "0912345678", psk):
shown = candidate if candidate != psk else "<the generated PSK>"
print(f"{shown:20} -> {'; '.join(check_psk(candidate, 'LabNet'))}")generated: 22 characters, 131 bits
password123 -> shorter than 20 characters; on a common-password list
LabNet2026! -> shorter than 20 characters; contains the SSID
0912345678 -> shorter than 20 characters; digits only (phone numbers, dates)
<the generated PSK> -> ok
secrets.choice draws from the operating system's secure generator, which is what makes the 131-bit figure true. The checker's list of common passwords is a stand-in for a real breached-password list.
Pitfalls
- Counting characters instead of choices:
LabNet2026!has 11 characters but almost no unpredictability. - Believing a passphrase change protects past traffic: with WPA2-PSK, anyone who recorded old handshakes and later learns the passphrase can decrypt those old sessions. There is no forward secrecy; SAE has it.
- Keeping a weak passphrase "because only staff know it": every former employee and every guest who was ever given it knows it too.
Practice
1. A café uses Coffee2024! as its WPA2 passphrase. Explain the risk to a customer and to the café.
It follows a guessable pattern (word + year + symbol) and is shared with every customer, so anyone could guess it offline from a recorded handshake or simply ask for it. Everyone who knows it can decrypt other customers' traffic from recorded handshakes (WPA2-PSK has no per-user secrecy) and run an evil twin. For a public network, Enhanced Open (OWE) or WPA3-SAE is better, and customers should rely on TLS and VPNs.
2. Using the table, how many Diceware words does a passphrase need to beat the cluster for at least a million years?
Each word adds about 12.9 bits (a factor of 7,776). Five words take about 450 years on the cluster; six take million years. So six words.
3. Why does moving to SAE help even if the passphrase stays the same?
SAE gives no value that can be tested offline; every guess needs a live exchange with the AP, which is slow and logged. It also adds forward secrecy. A weak passphrase is still guessable online, so it should be improved too.
Test yourself
Why can't a defender detect offline guessing of a WPA2 passphrase?
- It uses encrypted traffic
- Guesses are tested on the attacker's own hardware against a recording, without touching the network
- APs don't log anything
- It happens only at night
About how many bits does a 20-character passphrase from 62 symbols, chosen by a generator, have?
- 20
- 62
- About 119
- About 1,240
What is the strongest fix for offline guessing on a home network?
- Hiding the SSID
- MAC filtering
- WPA3-SAE (plus a good passphrase)
- Lowering transmit power
With WPA2-PSK, what can someone who learns the passphrase later do with old recorded sessions?
- Nothing
- Decrypt them, if they recorded the handshakes
- Only see packet sizes
- Only change the SSID