KRACK Attack

Key Reinstallation Attack (KRACK)

Overview

The Key Reinstallation Attack (KRACK) is a critical vulnerability discovered in 2017 that exploits flaws in the implementation of the four-way handshake process in the WPA2 authentication protocol. This attack affects all secure Wi-Fi networks that use the four-way handshake to establish connections and generate encryption keys for network traffic protection.

Attack Methodology

Core Vulnerability

KRACK exploits the fact that WPA2 clients can be tricked into reinstalling an already-in-use encryption key, which resets the key's associated parameters like the packet counter (nonce).

WPA2

The 4-Way Handshake

WiFi Protected Access II-1758459780409.webp

WPA2's authentication relies on a 4-way handshake process (EAPOL-Key Frames are also exchanged):

Message 1 (AP → Client) - Handshake Initiation

  • AP sends ANonce (Authenticator Nonce) - a random number
  • Client now has both ANonce and SNonce to derive keys

Message 2 (Client → AP)

Message 3 (AP → Client) - Handshake Confirm

  • AP confirms it derived the same PTK
  • Sends encrypted GTK (Group Temporal Key) for multicast traffic
  • Includes MIC for authentication

Message 4 (Client → AP) - Handshake Completion

  • Client acknowledges GTK receipt
  • Final Confirmation
  • Handshake complete, encrypted communication begins

Four-Way Handshake Exploitation

The attacker exploits the four-way handshake of the WPA2 protocol by forcing Nonce reuse:

  1. Attack Setup: Attacker captures the victim's ANonce key that is already in use
  2. Manipulation: Attacker manipulates and replays cryptographic handshake messages
  3. Key Reinstallation: Forces the client to reinstall the same encryption key
  4. Nonce Reset: This resets the packet counter to zero, creating nonce reuse

Technical Attack Flow

Message 1: AP → Client (ANonce)
Message 2: Client → AP (SNonce, MIC)
Message 3: AP → Client (GTK, MIC) ← Attacker blocks/delays this message
Message 4: Client → AP (Acknowledgment) ← Gets blocked by attacker
Message 3: AP → Client (Retransmission) ← Triggers key reinstallation

Impact and Capabilities

Affected Networks and Protocols

This attack works against:

Data Theft Capabilities

KRACK allows attackers to steal sensitive information including:

Traffic Manipulation

Vulnerable Systems

Affected Operating Systems

All devices running the following operating systems are vulnerable to some variant of KRACK:

Implementation-Specific Impact

Operating System Vulnerability Level Impact Description
Linux/Android Severe Installs all-zero key, enables complete traffic decryption
Windows/macOS Moderate Reinstalls same key, allows some packet decryption
iOS Limited Reduced impact due to different implementation

Attack Execution

Prerequisites

Step-by-Step Attack Process

  1. Setup Phase

    • Attacker creates fake AP with same SSID as target network
    • Positions attack device within range of both victim and legitimate AP
  2. Positioning Phase

    • Establishes man-in-the-middle position between client and legitimate AP
  3. Handshake Manipulation

    • Forces client to connect through attacker's equipment
    • Manipulates 4-way handshake to cause key reinstallation
  4. Exploitation Phase

    • Captures and decrypts victim's network traffic
    • Can inject malicious content or steal sensitive data

Network Traffic Examples

HTTP Traffic Exploitation

HTTPS Limitations

Mitigation Strategies

Immediate Actions

Client-Side Fixes

Network-Level Protections

Long-Term Solutions

Industry Impact

Protocol Evolution

Security Response

Lessons Learned

Conclusion

KRACK demonstrated that even mature, widely-deployed security protocols like WPA2 can contain fundamental flaws that affect billions of devices worldwide. The attack highlighted the critical importance of:

The discovery of KRACK served as a wake-up call for the wireless security industry and accelerated the adoption of more robust Wi-Fi security standards.