From Metal to WebUSB: Reimplementing a Wi-Fi 6 Driver Beyond the Kernel For Offensive Security

Edoardo Mantovani (Independent Security Researcher)

SEC-T 2026 · Day 2 · Main hall

Overview

In a groundbreaking presentation at SEC-T, independent security researcher Edoardo Mantovani unveiled a comprehensive journey into the re-implementation of a Wi-Fi 6 driver in user space and, remarkably, within a web browser using WebUSB. The talk, titled "From Metal to WebUSB: Reimplementing a Wi-Fi 6 Driver Beyond the Kernel For Offensive Security," demonstrated how readily available, inexpensive USB Wi-Fi dongles can be transformed into potent offensive security tools. Mantovani's work not only demystifies the intricate workings of Wi-Fi hardware and firmware but also pushes the boundaries of what is possible with commodity devices, showcasing advanced attacks such as deauthentication, Evil Twin, and even runtime firmware patching directly from a web interface.

Watch on YouTube

Visual summary for From Metal to WebUSB: Reimplementing a Wi-Fi 6 Driver Beyond the Kernel For Offensive Security by Edoardo Mantovani
Visual summary for From Metal to WebUSB: Reimplementing a Wi-Fi 6 Driver Beyond the Kernel For Offensive Security by Edoardo Mantovani

Key moments

  1. 0:00 Introduction: Reimplementing Wi-Fi 6 driver for offensive security
  2. 4:50 Understanding XMI kernel drivers and unique boot process
  3. 7:00 Why reimplement driver in user space with libUSB
  4. 12:40 Deauthentication attacks against WPA2/WPA3 networks demonstrated
  5. 14:00 Porting driver to WebUSB for browser-based attacks
  6. 16:50 Evil Twin attack with fake captive portal via WebUSB
  7. 20:20 Firmware reverse engineering and runtime patching framework
  8. 29:40 Vision: An OS using only WebUSB for wireless attacks

From Metal to WebUSB: Reimplementing a Wi-Fi 6 Driver Beyond the Kernel For Offensive Security

Speakers: Edoardo Mantovani, Independent Security Researcher

Conference: SEC-T

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

Overview

In a groundbreaking presentation at SEC-T, independent security researcher Edoardo Mantovani unveiled a comprehensive journey into the re-implementation of a Wi-Fi 6 driver in user space and, remarkably, within a web browser using WebUSB. The talk, titled "From Metal to WebUSB: Reimplementing a Wi-Fi 6 Driver Beyond the Kernel For Offensive Security," demonstrated how readily available, inexpensive USB Wi-Fi dongles can be transformed into potent offensive security tools. Mantovani's work not only demystifies the intricate workings of Wi-Fi hardware and firmware but also pushes the boundaries of what is possible with commodity devices, showcasing advanced attacks such as deauthentication, Evil Twin, and even runtime firmware patching directly from a web interface.

The core of this research revolves around gaining unprecedented control over Wi-Fi hardware by bypassing traditional kernel driver limitations. By moving the driver logic into user space, and subsequently into a web browser, Mantovani illustrates a future where sophisticated wireless attacks could be launched with minimal setup, requiring only a compatible USB dongle and a modern web browser. This approach significantly lowers the barrier to entry for performing advanced Wi-Fi security research and offensive operations, highlighting critical implications for both network defenders and security researchers.

The talk provides a deep dive into the technical challenges and solutions involved in this ambitious project, focusing on the AXM D80 Wi-Fi 6 USB adapter. It serves as a stark reminder of the potential vulnerabilities inherent in the ubiquitous Wi-Fi ecosystem when hardware is subjected to such granular, user-controlled manipulation.

Background

▶ Watch: Introduction: Reimplementing Wi-Fi 6 driver for offensive security (0:00)

USB Wi-Fi dongles are ubiquitous, cheap, and support a wide array of Wi-Fi standards, often including Bluetooth. This makes them attractive targets for security research. The market for these devices is dominated by three main vendors: Realtek (the largest, supporting Wi-Fi 6, 6E, and 7), MediaTek (known for quality but limited USB range), and AXM. The AXM devices, specifically the D-series, became the primary focus of this research due to their unique characteristics and the challenges they presented. While the AXM DC model is ultra-cheap and supports only 2.4 GHz, the AXM D80 model, though still inexpensive (around $10), offers 5 GHz band support and a newer Bluetooth 5.3/5.4 interface, making it a more robust target for offensive operations.

A standard Wi-Fi USB device operates through a complex interplay of software and hardware. When an application, such as a web browser, needs to send or receive data, its traffic traverses the operating system's networking stack. Eventually, this data reaches the Wi-Fi vendor driver, a kernel-level piece of code responsible for communicating directly with the hardware via the USB bus. Inside the Wi-Fi chipset, a firmware—primarily a RAM firmware loaded at boot—handles the core logic for frame transmission, reception, and communication with the OS. This RAM firmware is initially booted by a smaller, immutable ROM code residing within the chipset.

The AXM Wi-Fi USB dongles present a peculiar boot-up sequence. Upon attachment, they initially appear as a limited USB mass storage device containing only Windows drivers. The operating system must send a specific SCSI command over USB to switch the device from mass storage mode into its ROM mode, initiating the Wi-Fi device's boot process. A critical detail for Linux users is that the AXM kernel driver is not part of the mainline Linux kernel. This necessitates downloading and compiling the driver from GitHub, a process complicated by multiple versions and frequent API changes with new kernel releases.

The driver loading process involves two distinct stages:

  1. i_load_firmware: This initial driver interacts with the chipset's ROM to upload the full Wi-Fi firmware (which includes Bluetooth code) into the device's RAM. It then writes specific hardware registers, causing the device to disconnect and reconnect with new Vendor and Product IDs.
  2. f_driver: This is the main driver that subsequently communicates with the now-loaded RAM firmware, enabling normal Wi-Fi operations like data transmission and reception.

Mantovani's motivation for reimplementing this driver in user space stemmed from several factors. In early 2025 (as mentioned in the talk, likely referring to the initial research period), the official Linux driver for these devices was unstable, often crashing at boot. Beyond addressing stability issues, the project was driven by a deep curiosity to understand the chipset's inner workings, debug the firmware, and explore possibilities for adding new features or testing firmware vulnerabilities. Reimplementing a kernel driver in user space offers significant advantages, including enhanced debugging capabilities, easier experimentation, and the ability to add custom functionalities without kernel-level complexities. The choice of libusb for handling USB communication was strategic, given its multi-platform support (Linux, Windows), which allowed the user-space driver to function across different operating systems.

Key Findings

▶ Watch: Why reimplement driver in user space with libUSB (7:00)

Edoardo Mantovani's research yielded several significant findings, demonstrating a novel approach to interacting with and weaponizing commodity Wi-Fi hardware:

  1. Successful User-Space Driver Reimplementation: Mantovani successfully rewrote the entire AXM D80 Wi-Fi 6 driver from its kernel-space origins into a single, comprehensive user-space application using libusb. This driver functions identically to the kernel counterpart, enabling full control over Wi-Fi operations (scanning, connecting, AP mode, monitor mode) and is notably cross-platform, working on both Linux and Windows.
  1. Firmware Command Protocol Reverse Engineering: The research uncovered and reverse-engineered the specific command protocol used by the driver to communicate with the RAM firmware. This protocol involves sending "request commands" (e.g., start AP mode, connect to network) and receiving "confirmation messages." Crucially, two commands were identified that permit reading and writing the firmware memory at runtime, a capability often absent or restricted in other Wi-Fi chipsets.
  1. Monitor Mode Fix and Enhanced Capabilities: Contrary to popular belief and reports on GitHub, the AXM D80 does support a working monitor mode. Mantovani discovered that the issue lay within the original kernel driver's strict filtering of received frames. By updating the user-space driver to send every possible flag for the receive filter command, full monitor mode functionality was unlocked, allowing the offloading of almost every frame from the firmware to user space. Furthermore, frame injection (transmitting frames over the air from monitor mode) was confirmed to work flawlessly.
  1. WebUSB Porting and Architecture: A groundbreaking finding was the successful porting of the user-space driver logic to a web browser environment using WebUSB. This involved a dual-component architecture: a JavaScript core for WebUSB API interaction, firmware storage, UI management, and Wi-Fi state machine coordination; and WebAssembly for reusing the low-level C code from the initial user-space driver. This enables browser-based Wi-Fi attacks without requiring any local compilation or installation.
  1. Runtime Firmware Modification Framework (WDF): Perhaps the most advanced finding is the development of a working, albeit experimental, framework for runtime firmware patching and reverse engineering directly from the browser. This framework leverages the identified read/write memory commands to inject custom assembly code (compiled from C within the browser) into the live firmware. It also integrates TCC (Tiny C Compiler) with TM support (compiled to WebAssembly) for on-the-fly C code compilation and a Ghidra C++ compiler backend (also WebAssembly-compiled) for browser-based firmware disassembly.
  1. Firmware Reverse Engineering Insights: Through analysis of ARM 32 T-mode firmware, Mantovani utilized leaked SDKs (which share common code with many Chinese USB Wi-Fi chipsets) to retrieve function names. Additionally, examining assert strings—specifically their second argument, which often reveals the calling function—proved effective in enumerating functions and, critically, reconstructing the transmit path within the firmware. These insights were fundamental for developing the firmware patching capabilities.

Technical Deep Dive

▶ Watch: Porting driver to WebUSB for browser-based attacks (14:00)

The technical foundation of Mantovani's research is built upon gaining granular control over the AXM D80 Wi-Fi 6 chipset, first through a user-space driver and then via a browser-based WebUSB interface.

The initial step involved reimplementing the kernel driver in user space. This was achieved primarily using libusb, a robust, multi-platform library for USB device communication. By leveraging libusb, the driver could send and receive raw USB packets to and from the dongle, mimicking the kernel's interaction. The bulk of the logic, including how to handle device initialization, firmware loading, and Wi-Fi commands, was reverse-engineered and adapted from the original Linux kernel driver's source code. This process involved understanding the specific SCSI command required to transition the device from its initial USB mass storage mode to its operational ROM mode, and then managing the two-stage firmware loading process (i_load_firmware and f_driver). The user-space driver was implemented as a single, large file, providing a streamlined and self-contained solution.

Crucially, communication with the AXM D80's RAM firmware once loaded is governed by a distinct request/confirmation protocol. The driver sends "request commands" for operations like initiating an access point, connecting to a network, or performing a Wi-Fi scan. The firmware then responds with "confirmation messages" indicating success or failure. Two particularly powerful commands identified were those enabling the reading and writing of arbitrary memory locations within the firmware at runtime. This capability is fundamental to the advanced firmware patching demonstrated later.

A significant technical hurdle overcome was the perceived lack of monitor mode functionality on the D80 model. Community reports often indicated its failure. Mantovani's deep dive revealed that the issue wasn't hardware-related but rather a limitation in the kernel driver's configuration of the firmware's receive filter. When enabling monitor mode, a specific command is sent to the firmware to configure which types of Wi-Fi frames should be captured. The original driver was too restrictive. By sending a command that enabled every possible receive filter flag, the monitor mode was fully activated, allowing the user-space driver to offload all raw Wi-Fi frames from the firmware. This also confirmed that frame injection (transmitting custom frames) worked reliably.

The subsequent porting to WebUSB introduced a new layer of complexity and innovation. WebUSB is a browser API that allows web applications to interact with USB devices directly, albeit with user permission and primarily on Chromium-based browsers. The WebUSB driver is structured into two main components:

  1. JavaScript Core: This handles the high-level interactions, including using the WebUSB API to communicate with the dongle, storing the Wi-Fi firmware blob, managing the user interface, and orchestrating the overall Wi-Fi state machine.
  2. WebAssembly (WASM): To avoid rewriting all the low-level C code from the user-space driver in JavaScript, Mantovani leveraged WebAssembly. This allowed the existing C code, responsible for complex USB packet parsing, command construction, and firmware interaction logic, to be compiled into WASM and executed efficiently within the browser. This reuse of code was critical for rapid development and maintaining performance.

The most technically advanced aspect of the research is the Runtime Modification Framework (WDF) for firmware patching and reverse engineering directly from the browser. This framework targets the AXM D80's ARM 32 architecture, specifically its T-mode (Thumb instruction set). Mantovani's reverse engineering efforts were significantly aided by the discovery of publicly available SDKs for similar Chinese Wi-Fi chipsets, which shared substantial portions of the AXM D80's firmware code. This allowed for the recovery of numerous function names, greatly simplifying the analysis. Additionally, a clever technique involved analyzing the second argument of assert strings within the firmware, which often reveals the name of the calling function, helping to map out the firmware's control flow, particularly the transmit path.

The WDF uses the firmware's runtime read/write memory capabilities to:

  • Inject Code: The idea is to take C code, compile it on the fly, and inject the resulting machine code into the firmware's memory. This is achieved by compiling TCC (Tiny C Compiler) with TM support into WebAssembly. A user can write a C patch in the browser, TCC WASM compiles it to ARM Thumb assembly, and the browser then uses the firmware's write command to upload these bytes to a designated memory region.
  • Execute Injected Code: An unused firmware command, start_NPC_request, was identified. By overwriting its callback pointer in the firmware's memory with the address of the injected code and then invoking start_NPC_request, the custom C patch can be executed directly by the firmware.
  • Reverse Engineer from Browser: The framework also integrates a Ghidra C++ compiler backend (compiled to WebAssembly). This allows users to read firmware memory segments via the read command, pass the bytes to the Ghidra WASM module, and receive a disassembly output directly in the browser, facilitating on-the-fly analysis.

This intricate setup enables unprecedented control, allowing researchers to modify firmware behavior at the lowest level, directly from a web page.

Demo / Proof of Concept

▶ Watch: Evil Twin attack with fake captive portal via WebUSB (16:50)

Edoardo Mantovani provided compelling demonstrations of the capabilities unlocked by his user-space and WebUSB drivers, showcasing a range of offensive Wi-Fi attacks and novel firmware interactions.

User-Space Driver Attacks:

The initial user-space driver, built with libusb, successfully demonstrated core Wi-Fi functionalities and attacks:

  • Wi-Fi Scanning: Basic network discovery.
  • Network Connection: Connecting to existing wireless networks.
  • Fake Access Point (AP) Creation: The driver could create custom Wi-Fi networks, including those secured with WPA2 encryption.
  • Monitor Mode and Frame Dumping: Full monitor mode was demonstrated, allowing the capture and dumping of raw Wi-Fi frames.
  • Network Jamming: The ability to disrupt other Wi-Fi networks was shown, indicating effective frame injection.

Deauthentication Attacks (WPA2/WPA3):

A specific attack vector against WPA2 and WPA3 networks was demonstrated. This attack bypasses the Management Frame Protection (MFP) feature, which normally prevents spoofed deauthentication frames. The vulnerability lies in the window during the initial four-way handshake when a client and router are establishing a connection. The attack involves:

  1. Setting a specific receive filter in monitor mode to detect deauthentication packets from the frame control field.
  2. Upon detecting the start of a handshake, the driver rapidly injects deauthentication frames.

This technique effectively disrupts the connection establishment for both WPA2 and WPA3 networks, successfully tested against various smartphones.

WebUSB Driver Demo:

The WebUSB implementation showcased the driver's functionality directly within a Chromium-based browser:

  • Firmware Upload and MAC Address Retrieval: The web interface demonstrated uploading the ROM firmware and successfully reading the device's MAC address, proving the core WebUSB communication was functional without any local installation.
  • Browser-Based Monitor Mode: Users could enter monitor mode and dump raw Wi-Fi frames directly from the browser interface.
  • Browser-Based Fake AP: The ability to create a fake access point was also shown, all initiated from the web page.

Evil Twin Attack (WebUSB) against Captive Portals:

A more sophisticated attack, the Evil Twin, was implemented via the WebUSB driver, specifically targeting WPA2/WPA3 encrypted networks with captive portals (like hotel Wi-Fi). The attack workflow demonstrated:

  1. The user specifies the target network name.
  2. The driver enters monitor mode and intercepts Wi-Fi authentication frames.
  3. It then injects deauthentication frames to disrupt the target client's connection to the legitimate router.
  4. Simultaneously, the driver begins broadcasting fake Wi-Fi beacons with the same network name as the target.
  5. Crucially, the WebUSB driver's monitor mode is configured to also receive client connection attempts to its fake beacon. If a target client attempts to connect, the driver is able to reply, directing the client to a fake captive portal served directly by the web USB driver.

This was demonstrated on an Android smartphone, showing the client attempting to connect, getting jammed, and then being redirected to a malicious web page customized by the attacker within the browser itself.

Firmware Patching Demo:

The pinnacle of the demonstration was the firmware patching capability. Mantovani showcased a simple C patch designed to craft and transmit beacon frames directly from the firmware level, bypassing the driver context entirely.

  • The patch leverages the reconstructed firmware transmit path and internal firmware APIs to allocate a packet, copy a raw byte array (representing a beacon frame) into it, and then enqueue it for transmission.
  • This effectively performs frame injection from within the firmware, meaning the device itself is producing the malicious beacon.
  • While still experimental and requiring the card to be in monitor or AP mode, this capability paves the way for highly stealthy and persistent Wi-Fi attacks, where the malicious logic resides entirely on the hardware, beyond the reach of traditional host-based detection.

Defensive Implications

▶ Watch: Vision: An OS using only WebUSB for wireless attacks (29:40)

Edoardo Mantovani's research into reimplementing Wi-Fi drivers and patching firmware from user space and WebUSB carries significant defensive implications for network administrators, security professionals, and end-users alike.

Firstly, the demonstration of deauthentication attacks against WPA2 and WPA3 networks, even with Management Frame Protection (MFP) enabled, highlights a critical vulnerability. While MFP is designed to protect management frames from spoofing, Mantovani showed that an attack window exists during the four-way handshake. Defenders should recognize that even the latest Wi-Fi security standards are not foolproof against sophisticated timing-based attacks. This underscores the need for layered security, where reliance on a single protocol feature is avoided. Intrusion detection systems (IDS) and wireless intrusion prevention systems (WIPS) should be configured to detect and alert on rapid, repeated deauthentication attempts, especially during client association phases.

Secondly, the Evil Twin attack via WebUSB against captive portals exposes a fundamental weakness in how many public and enterprise Wi-Fi networks handle guest access. Captive portals, by their nature, often operate on open networks, making them susceptible to impersonation. The ease with which a malicious actor can set up a convincing fake portal directly from a web browser, leveraging a cheap USB dongle, means that users are at constant risk of credential harvesting or malware delivery. Organizations relying on captive portals should educate users about the risks of connecting to untrusted networks and encourage the use of VPNs for all sensitive traffic. Implementing certificate pinning for captive portal login pages could also help prevent users from being redirected to malicious sites.

The entire concept of a WebUSB driver dramatically lowers the barrier to entry for performing advanced Wi-Fi attacks. What once required custom driver compilation, kernel modules, and specialized software can now potentially be launched from a web page. This means a broader range of attackers, even those with limited technical expertise, could leverage such tools. Defenders must assume that commodity hardware can be easily weaponized and that attack tools are becoming increasingly accessible and cross-platform. Endpoint detection and response (EDR) solutions should monitor for unusual USB device activity, particularly the connection of unknown Wi-Fi dongles, and scrutinize network traffic for anomalous patterns indicative of spoofed beacons or deauthentication storms.

Perhaps the most profound implication stems from the runtime firmware patching and reverse engineering framework. The ability to inject custom C code into the live firmware of a Wi-Fi chipset, executed directly by the hardware itself, represents a new frontier in stealthy attacks. Firmware-level modifications are notoriously difficult to detect from the host operating system, as the malicious logic operates below the traditional software stack. This could lead to persistent backdoors, advanced data exfiltration techniques, or highly evasive jamming attacks that are invisible to standard network monitoring tools. Defenders should consider:

  • Hardware Attestation: Exploring mechanisms for verifying the integrity of Wi-Fi adapter firmware, similar to trusted boot processes for system firmware.
  • Supply Chain Security: Being vigilant about the provenance of Wi-Fi hardware, as pre-compromised firmware could be an increasing threat.
  • Deep Packet Inspection: While challenging, analyzing Wi-Fi frame content for anomalies that might indicate firmware-level manipulation, such as malformed frames or unusual timing.

Finally, the research highlights that even simple, cheap hardware like the AXM D80 can harbor powerful, exploitable capabilities. The fact that the official Linux driver was not mainline and had issues, combined with the presence of powerful firmware read/write commands, created an ideal environment for this type of in-depth offensive research. This suggests that other commodity hardware, especially those with less scrutinised drivers or firmware, might possess similar unadvertised capabilities that could be leveraged for offensive purposes. Defenders should encourage and support security research into common hardware components to proactively identify and mitigate such risks.

In summary, Mantovani's work is a wake-up call, urging defenders to move beyond traditional software-centric security models and consider the deeper, hardware-level threats posed by readily available Wi-Fi devices.

Key Takeaways

  • Commodity USB Wi-Fi dongles (e.g., AXM D80) can be weaponized into powerful offensive tools through user-space driver reimplementation and firmware manipulation, demonstrating capabilities far beyond their intended use.
  • Kernel drivers can be successfully re-implemented in user space using tools like libusb, offering greater control, debugging capabilities, and the flexibility to add custom features across multiple operating systems (Linux, Windows).
  • WebUSB enables cross-platform, browser-based Wi-Fi attacks and firmware interaction, significantly lowering the barrier to entry for sophisticated wireless security operations, requiring only a compatible dongle and a modern browser.
  • Runtime firmware patching and reverse engineering directly from the browser are feasible, allowing for the injection and execution of custom C code within a Wi-Fi chipset's live firmware, opening new avenues for stealthy and persistent attacks.
  • Existing Wi-Fi security features, such as WPA2/WPA3 Management Frame Protection (MFP), have exploitable gaps, specifically during the crucial 4-way handshake, making deauthentication attacks still viable.
  • Captive portals, often used for public Wi-Fi, are highly vulnerable to browser-based Evil Twin attacks, allowing attackers to easily impersonate legitimate networks and serve malicious content or harvest credentials.

About the Speaker(s)

Edoardo Mantovani is an independent security researcher with a strong focus on low-level development and web technologies. His work, as demonstrated in this talk, delves into the intricate world of hardware interaction, reverse engineering, and offensive security, particularly within the Wi-Fi domain. Mantovani combines expertise in kernel-level driver analysis with modern web development paradigms to create innovative tools and uncover novel attack vectors. His research highlights a deep understanding of wireless protocols and embedded systems.

Reviews

Dr. Zero (Offensive Security Researcher) — MUST SEE

Mantovani didn't just write a user-space Wi-Fi driver; he crammed a live firmware-patching toolchain into Chrome via WebUSB. This is exactly the kind of unhinged, deep-weeds hardware research that makes defensive engineers drink. An absolute must-watch if you care about the shrinking airgap between the browser and bare metal.

Heather Calloway (CISO) — SOLID

This is deep offensive research demonstrating how a $10 Wi-Fi dongle and a Chromium browser can be weaponized for WPA3 deauths and runtime firmware patching via WebUSB. While outside my core governance lane, it signals a material shift in how easily attackers can deploy hardware-level wireless exploits. It's a clear mandate to tighten endpoint USB controls and browser policies.

→ Top-rated talks at SEC-T 2026

All talks from SEC-T 2026