Breaking & Disrupting WPA2/3 Networks by Abusing Sleep Mode

Mathy Vanhoef

BruCON 0x0F · Day 2

Overview

In a compelling presentation at BruCON, Mathy Vanhoef, a renowned Wi-Fi security researcher, unveiled a series of novel attacks that exploit fundamental weaknesses and ambiguities in the Wi-Fi standard, particularly concerning power save mode and security context management. This research, conducted in collaboration with Domien Schepers of Northeastern University, demonstrates how adversaries can reliably leak plaintext frames, bypass critical protections like Management Frame Protection (MFP), and circumvent client isolation mechanisms, even in modern WPA2 and WPA3 networks. Vanhoef, known for his previous groundbreaking work on vulnerabilities such as CRACK, FragAttacks, and DragonBlood, continues to push the boundaries of Wi-Fi security research, highlighting the persistent challenges in standardizing and implementing secure wireless communication.

Watch on YouTube · Slides

Visual summary for Breaking & Disrupting WPA2/3 Networks by Abusing Sleep Mode by Mathy Vanhoef
Visual summary for Breaking & Disrupting WPA2/3 Networks by Abusing Sleep Mode by Mathy Vanhoef

Key moments

  1. 0:00 Speaker's introduction and Wi-Fi security background
  2. 4:00 Crook attack: leaking plaintext frames (research inspiration)
  3. 7:00 Attack #1: Reliably leaking plaintext frames via sleep mode
  4. 14:40 Attack #2: Bypassing WPA3 Management Frame Protection (MFP)
  5. 24:00 Attack #3: Bypassing client isolation for traffic interception
  6. 37:30 Client isolation bypass: root cause and defense challenges
  7. 43:00 Q&A: Fuzzing, formal modeling, and AI in security research

Breaking & Disrupting WPA2/3 Networks by Abusing Sleep Mode

Speakers: Mathy Vanhoef

Conference: BruCON

YouTube: https://www.youtube.com/watch?v=B3MUAy45TYc

Overview

In a compelling presentation at BruCON, Mathy Vanhoef, a renowned Wi-Fi security researcher, unveiled a series of novel attacks that exploit fundamental weaknesses and ambiguities in the Wi-Fi standard, particularly concerning power save mode and security context management. This research, conducted in collaboration with Domien Schepers of Northeastern University, demonstrates how adversaries can reliably leak plaintext frames, bypass critical protections like Management Frame Protection (MFP), and circumvent client isolation mechanisms, even in modern WPA2 and WPA3 networks. Vanhoef, known for his previous groundbreaking work on vulnerabilities such as CRACK, FragAttacks, and DragonBlood, continues to push the boundaries of Wi-Fi security research, highlighting the persistent challenges in standardizing and implementing secure wireless communication.

The core of Vanhoef's findings revolves around the idea that Wi-Fi access points (APs) and clients often manage buffered frames and security contexts inconsistently, especially when devices transition between active and sleep states, or when their association status changes. By carefully manipulating control frames, an attacker can trick an AP into transmitting sensitive data under an unencrypted or weakly encrypted context, or into mismanaging client states. This research not only exposes new attack vectors but also underscores the critical importance of explicit and precise specifications in the IEEE 802.11 standard to prevent security oversights by developers.

The talk detailed three distinct attacks: a generalized and more reliable method for leaking plaintext frames from APs, a technique to forcibly disconnect clients by bypassing WPA3's Management Frame Protection, and a sophisticated bypass for client isolation that allows malicious insiders to intercept traffic. These vulnerabilities affect a wide range of devices, from open-source implementations on Linux and FreeBSD to commercial wireless dongles and professional access points, posing significant implications for network defenders.

Background

▶ Watch: Speaker's introduction and Wi-Fi security background (0:00)

The journey of Wi-Fi security has been marked by a continuous cat-and-mouse game between attackers and defenders. When Wi-Fi was first introduced over two decades ago, it relied on the WEP (Wired Equivalent Privacy) protocol, which was quickly and thoroughly broken due to fundamental cryptographic flaws. In response, WPA (Wi-Fi Protected Access) versions 1 and 2 were introduced, offering significantly stronger security. WPA2 was considered robust for many years until 2017, when Mathy Vanhoef himself discovered the Key Reinstallation Attack (KRACK), a fundamental flaw that allowed attackers to reinstall an all-zero encryption key, leading to traffic interception. While KRACK was patchable, WPA2 still suffered from issues like susceptibility to offline dictionary attacks against its four-way handshake.

To address these lingering weaknesses and enhance overall security, the Wi-Fi Alliance and IEEE introduced WPA3 in 2018. WPA3 aimed to prevent offline dictionary attacks by using Simultaneous Authentication of Equals (SAE), and mandated Management Frame Protection (MFP) to secure control and management frames, thereby preventing common denial-of-service (DoS) attacks. While WPA3 had its initial teething problems, these have largely been resolved, making it the current recommended standard.

A crucial inspiration for Vanhoef's latest research was the CROOK attack. Discovered by other researchers, CROOK targeted access points by exploiting their frame buffering mechanisms. The attack worked by observing that APs often buffer frames in plaintext when the wireless medium is busy. If an attacker then spoofed a disassociation frame (trivial in WPA2) to make the AP believe a client was leaving, the AP would delete the client's encryption keys but might fail to clear its internal buffers. When the medium became free, these buffered frames would then be transmitted in plaintext, effectively leaking sensitive data. The challenge with CROOK was its reliance on luck – the attacker needed to send the disassociation frame precisely when the AP was buffering data. Vanhoef's research aimed to generalize and improve upon this concept, asking a broader question: "How are security contexts managed, and what happens to buffered frames when a key is deleted or a security association is refreshed, especially when a client enters or exits power save mode?" This fundamental question became the springboard for discovering the new vulnerabilities.

Key Findings

▶ Watch: Attack #1: Reliably leaking plaintext frames via sleep mode (7:00)

The research uncovered three significant categories of vulnerabilities that exploit the ambiguous management of security contexts and buffered frames in Wi-Fi implementations:

  1. Reliable Plaintext Frame Leakage from Access Points: This attack is a generalization and significant improvement over the CROOK attack. By leveraging spoofed power save frames, attackers can reliably induce an AP to buffer frames. Subsequently, by sending spoofed authentication or association frames, the attacker can force the AP to delete the victim's encryption keys. When the AP then attempts to transmit the buffered frames (believing the client has "woken up"), these frames are sent under an undefined security context. This often results in plaintext leakage, WEP encryption with an all-zero key, or encryption with the group key, which can still be decrypted by malicious insiders. This attack makes the leakage of sensitive data much more consistent and controllable than previous methods.
  1. Bypassing Management Frame Protection (MFP) for Denial-of-Service (DoS): This finding demonstrates that even WPA3 networks, which mandate MFP to prevent trivial deauthentication and disassociation attacks, are susceptible to forced client disconnections. The attack exploits a subtle interaction between the AP's user-space handling of management frames and its kernel/hardware handling of power save states. By sending a spoofed Association Request that includes the sleep bit, an attacker can trick the AP into believing the victim is asleep. The AP's MFP logic attempts to challenge the "sleeping" client with a protected SA Query frame, but the kernel/hardware component prevents this challenge from being sent, leading to a timeout and eventual disconnection of the legitimate client. This effectively renders MFP ineffective against a new class of DoS attacks.
  1. Bypassing Client Isolation: This vulnerability allows a malicious insider, possessing valid credentials for a Wi-Fi network, to intercept traffic destined for other clients on the same network, even when client isolation is enabled. The attacker spoofs the MAC address of a victim client and reconnects to the network. The AP, now associating the victim's MAC with the attacker's newly negotiated encryption keys, will then forward incoming traffic (from the internet to the victim) to the attacker. This is a critical design flaw, as client isolation is often deployed in enterprise, public hotspot (e.g., Eduroam, Hotspot 2.0), and smart home networks to prevent clients from attacking each other. The core problem lies in the weak correlation between identities at different layers of the network stack – while an attacker cannot spoof another user's Wi-Fi authentication credentials, they can easily spoof their MAC and IP addresses once connected.

These findings collectively highlight that despite decades of development, fundamental aspects of Wi-Fi protocol design and implementation remain vulnerable, particularly where standards are vague or where different layers of the network stack interact in unexpected ways. The research impacts a wide range of operating systems (FreeBSD, Linux, NetBSD), wireless hardware, and both home and professional access points.

Technical Deep Dive

▶ Watch: Attack #2: Bypassing WPA3 Management Frame Protection (MFP) (14:40)

The three attacks presented by Mathy Vanhoef each leverage distinct, yet related, architectural and specification weaknesses within Wi-Fi networks.

Attack 1: Reliable Plaintext Frame Leakage

This attack is a refined version of the CROOK vulnerability, focusing on making the frame leakage more reliable and controllable. It targets the access point's handling of buffered frames and key management.

  1. Victim Connection: A legitimate client connects to a WPA2 network, and encrypted traffic flows between the client and the AP.
  2. Inducing Buffering: The attacker spoofs a power save frame (specifically, an 802.11 Data frame with the Power Management bit set) using the victim's MAC address. This frame tells the AP, "I am the client, and I am going into sleep mode; please buffer any frames destined for me." This is a crucial improvement over CROOK, as it allows the attacker to reliably control when and how the AP buffers frames.
  3. Key Deletion: While the AP is buffering frames for the "sleeping" victim, the attacker sends a spoofed authentication or association frame using the victim's MAC address. This frame signals to the AP that the client is attempting to re-establish a connection. The AP, upon receiving this, will typically remove the previous security association and delete the corresponding encryption keys stored for that client. This simulates a client losing connection and reconnecting, effectively resetting the security context.
  4. Triggering Transmission: Finally, the attacker sends another spoofed frame (e.g., a Power Save Poll frame or a data frame with the Power Management bit cleared) indicating that the client is "waking up." The AP, believing the client is now awake, will attempt to transmit the buffered frames.

The critical vulnerability arises because the keys have been deleted, but the buffered frames remain. When the AP transmits these frames, they are sent under an undefined security context. Vanhoef demonstrated varying behaviors across different implementations, using FreeBSD as a primary example:

  • Plaintext Leakage: In some cases, frames are simply transmitted unencrypted, allowing trivial interception.
  • WEP with All-Zero Key: Other implementations might fall back to WEP encryption but use an all-zero key, which is easily decryptable.
  • Group Key Encryption: Some systems encrypt the unicast frames using the group key, which is typically used for broadcast/multicast traffic and is known to all clients on the network. While encrypted, a malicious insider (who also has network access) can easily decrypt these frames.

The root cause is a lack of explicit guidance in the IEEE 802.11 standard regarding the management of buffered frames when a client disconnects or its security association changes. Developers often overlook the need to clear these buffers, leading to this information leakage.

Attack 2: Bypassing Management Frame Protection (MFP) for DoS

This attack targets the robustness of MFP, a mandatory feature in WPA3 designed to protect management frames from spoofing and thus prevent common deauthentication/disassociation DoS attacks.

  1. Target Network: The victim is connected to a WPA2 network with MFP enabled, or a WPA3 network (where MFP is mandatory).
  2. Spoofed Association Request with Sleep Bit: The attacker spoofs an Association Request frame from the victim's MAC address to the AP. Crucially, the attacker sets the sleep bit (Power Management bit) in the header of this spoofed frame. This tells the AP, "I am the client, and I want to connect, but I am immediately going into sleep mode." This is an unusual but standard-compliant combination.
  3. Split Implementation Logic: The AP's handling of this frame typically involves different components:
  • The user-space component (e.g., hostapd on Linux) processes the Association Request. It recognizes that MFP is enabled and that the incoming Association Request is unprotected (as it's spoofed by an attacker). It denies the request and attempts to send a protected SA Query frame to the legitimate client to verify its presence and state.
  • However, the kernel or hardware component, which manages the power save state, has processed the "sleep bit" in the spoofed frame. It now believes the legitimate client is in sleep mode.
  1. SA Query Frame Buffering: Because the kernel/hardware believes the client is asleep, it buffers the SA Query frame instead of transmitting it. The SA Query never reaches the real victim.
  2. Timeout and Disconnection: After a timeout period, the user-space component of the AP, having received no response to its SA Query, concludes that the legitimate client is no longer responsive or has rebooted. It then proceeds to disconnect the client from the network.

This attack successfully disconnects a client even with MFP enabled, exploiting the race condition and miscommunication between different layers of the AP's implementation. A side effect of this vulnerability is also the manipulation of Fine Timing Measurements (FTM), which could impact location services. Defenses involve authenticating the sleep bit itself or ensuring that SA Query frames are never buffered.

Attack 3: Bypassing Client Isolation

This attack targets networks that employ client isolation to prevent connected clients from communicating with each other, often used in enterprise, public hotspots (e.g., Eduroam), and IoT segments of home networks. It assumes a malicious insider – an attacker who possesses valid credentials to connect to the Wi-Fi network.

  1. Victim Activity: A legitimate client connects to the network and sends traffic, e.g., a DNS or HTTP request, to the internet. This request passes through the AP, is decrypted, forwarded to the internal router, and then to the internet.
  2. Attacker Spoofing and Reconnection: Before the internet server can send a reply, the attacker spoofs the MAC address of the victim client. The attacker then uses their own valid credentials to connect to the AP, but under the victim's MAC address.
  3. AP Key Association: The AP, upon successful connection by the attacker (using the victim's MAC), associates the attacker's newly negotiated encryption keys with the victim's MAC address. From the AP's perspective, the "client" with that MAC address has simply reconnected. (For WPA3, the attacker might first need to use the MFP bypass DoS to kick the legitimate client off.)
  4. Traffic Interception: When the internet server's reply (e.g., DNS response, HTTP content) arrives back at the router, the router identifies it as destined for the victim's IP and MAC address. It forwards this traffic to the AP. The AP, now associating the victim's MAC with the attacker's keys, encrypts the incoming traffic using the attacker's keys and sends it to the attacker. The attacker successfully intercepts traffic intended for the legitimate victim.

This attack primarily intercepts traffic flowing from the internet to the client. Intercepting traffic from the client to the internet is generally not possible with this method. The attack's success also depends on the attacker connecting faster than the network's latency. Vanhoef noted that reconnecting can take less than 12 milliseconds, which is faster than typical transatlantic (70ms) and even intra-European (13ms) internet latencies, making the attack practical for many scenarios. For TCP traffic, retransmissions further aid the attacker by providing more time. The vulnerability can also be extended to target the default gateway or local servers.

The fundamental flaw here is the lack of a strong link between identities at different layers of the network stack. While Wi-Fi authentication (802.11X/EAP) verifies a user's credentials, it doesn't strongly bind that identity to the MAC or IP address used post-authentication. Furthermore, client isolation was often an afterthought, "bolted on" by vendors rather than being an integral part of the official IEEE 802.11 standard, leading to inconsistent and insecure implementations.

Demo / Proof of Concept

▶ Watch: Client isolation bypass: root cause and defense challenges (37:30)

During the presentation, Mathy Vanhoef demonstrated the client isolation bypass attack using a custom tool developed by his team. The target for the demonstration was a Ubiquiti access point, a commonly used professional-grade device.

The demonstration began by showing the initial configuration of the Ubiquiti AP, confirming that client isolation was explicitly enabled. The tool then performed a preliminary check to verify that client-to-client traffic was indeed blocked, confirming that the client isolation feature was active and seemingly working as intended. This established the baseline that the network was configured to prevent direct communication between clients.

The core of the attack then proceeded:

  1. A legitimate victim client was simulated connecting to the network and sending a request (e.g., DNS or HTTP) out to the internet.
  2. The attacker's tool then attempted to reconnect to the access point, critically spoofing the MAC address of the victim client. The attacker used their own valid network credentials for this connection.
  3. The tool displayed the connection process, showing the attacker successfully authenticating and associating with the AP under the victim's MAC address.

Interestingly, the demonstration revealed that the Ubiquiti access point in question was not vulnerable to this specific client isolation bypass. Vanhoef explicitly stated, "In a normal situation at the end of that demo you would be able to see that we were able to intercept traffic sent from the internet back to the victim but... I have to give a shout out to Ubiquiti here they were the only ones that as far as I know that implemented a mitigation against this." This highlights that while the attack is widespread, some vendors have proactively implemented defenses.

Despite the specific demo not showing a successful interception due to Ubiquiti's mitigation, the talk emphasized that "basically all professional and home access points that we tested were vulnerable to the attack." The research team has made a tool available for others to test their own networks, accessible via a provided link and QR code, encouraging broad adoption of vulnerability testing. The demo, even in its "failed" state against Ubiquiti, served to illustrate the mechanics of the attack and the importance of vendor-specific mitigations.

Defensive Implications

▶ Watch: Q&A: Fuzzing, formal modeling, and AI in security research (43:00)

The vulnerabilities uncovered by Mathy Vanhoef's research present several critical implications for network defenders and Wi-Fi standard bodies, demanding both immediate mitigations and long-term architectural changes.

For Reliable Plaintext Frame Leakage:

  • Explicit Buffer Clearing: The most direct defense is to mandate that access points always clear their internal frame queues and buffers whenever a client disconnects or its security association is removed. This would prevent frames from being transmitted under an undefined security context.
  • Encrypt-then-Buffer: A more robust approach would be to **encrypt frames before buffering them**, rather than just before transmission. This ensures that even if keys are deleted, the buffered data remains protected.

For Bypassing Management Frame Protection (MFP) for DoS:

  • No SA Query Buffering: Access points should be designed to never buffer SA Query frames. If an SA Query cannot be immediately transmitted to a client (e.g., due to the client being in sleep mode), the AP should assume the client is unresponsive rather than buffering the query.
  • Authenticate the Sleep Bit: The sleep bit (Power Management bit) in management frames should be authenticated as part of MFP. This would prevent attackers from spoofing a client's power save state, thereby closing the window for the DoS attack.

For Bypassing Client Isolation:

  • Strengthen Identity Binding: The fundamental long-term solution is to establish a stronger link between identities at different layers of the network stack. This means binding the Wi-Fi layer identity (e.g., username, client certificate from 802.11X/EAP) to the MAC and IP addresses used by the client. An AP should enforce that only the authenticated user associated with a specific MAC/IP can use that MAC/IP.
  • Disallow Recently Used MACs (with caveats): A potential, but problematic, defense is for an AP to disallow new connections from MAC addresses that were recently active. However, this introduces significant reliability issues for legitimate clients who might briefly disconnect and then immediately try to reconnect. This approach is only viable if the AP can securely recognize a returning client as the same legitimate user.
  • Alternative Isolation Mechanisms: Given the inherent design flaws and difficulty in patching client isolation, network architects should prioritize more robust isolation mechanisms. This includes using separate SSIDs for different trust levels (e.g., guest, IoT, corporate) or implementing VLANs to segment client traffic at Layer 2.
  • Standard Updates: The Wi-Fi standard bodies (IEEE) have a role to play. Updates have been proposed and accepted to better recognize returning clients, which could, in the future, provide a standardized defense against the client isolation bypass. However, broad vendor adoption and implementation of these updates will take time.

While client isolation is shown to be bypassable in one direction (internet to client), it still offers some protection by making attacks harder and preventing direct client-to-client communication. Therefore, it shouldn't be entirely abandoned until stronger alternatives are widely implemented. However, defenders must be aware that it is not a fundamental security boundary against malicious insiders. The research underscores that "explicit and precise" language in standards is crucial, as developers may not always foresee all potential security implications.

Key Takeaways

  • Vague Standards Lead to Vulnerabilities: Ambiguities in the IEEE 802.11 standard, particularly regarding the management of buffered frames and security contexts, are a root cause for critical vulnerabilities in WPA2 and WPA3 networks.
  • Power Save Mode is an Attack Vector: Wi-Fi's power save (sleep) mode, often overlooked in security analyses, can be abused by attackers to reliably control frame buffering and manipulate security contexts, leading to plaintext data leakage.
  • MFP Bypass for DoS: Even advanced security features like Management Frame Protection (MFP), mandatory in WPA3, can be bypassed through a combination of spoofed frames and implementation-specific logic splits, enabling denial-of-service attacks.
  • Client Isolation is Fundamentally Flawed: Client isolation, commonly used in enterprise and public networks, is a "bolted-on" feature with a design flaw that allows malicious insiders to intercept traffic by spoofing MAC addresses, highlighting a weak link between Wi-Fi layer and IP/MAC layer identities.
  • Reliable Data Interception: The new attacks, particularly the plaintext leakage, are significantly more reliable than previous methods, making them practical threats against sensitive data.
  • Holistic Defense Needed: Effective defense requires not only patching software but also revisiting fundamental protocol design, standardizing explicit security requirements, and potentially adopting more robust network segmentation like separate SSIDs or VLANs.

About the Speaker(s)

Mathy Vanhoef is a distinguished Wi-Fi security researcher; this work was done with Domien Schepers of Northeastern University. He is widely recognized for his groundbreaking work in discovering fundamental vulnerabilities in Wi-Fi protocols. His notable contributions include the Key Reinstallation Attack (KRACK) against WPA2, FragAttacks (fragmentation and aggregation attacks), and DragonBlood (vulnerabilities in WPA3's SAE handshake).

Beyond identifying vulnerabilities, Vanhoef has also actively contributed to enhancing Wi-Fi security by helping to standardize defenses, such as operating channel validation and beacon protection, the latter of which is slated to become mandatory in Wi-Fi 7. His extensive background in wireless security also includes research into VPN-related vulnerabilities in collaboration with New York University Abu Dhabi. Vanhoef has a long-standing connection with BruCON, having given his very first public presentation on Wi-Fi security at the conference over 11 years ago. His continued research demonstrates a deep commitment to uncovering and addressing critical security issues in wireless technologies.

Reviews

  • Dr. Zero (Offensive Security Researcher) — MUST SEE ★★★★★

→ Top-rated talks at BruCON 0x0F

All talks from BruCON 0x0F