Skip to main content
QUICK REVIEW

[Paper Review] NexMon: A Cookbook for Firmware Modifications on Smartphones to Enable Monitor Mode

Matthias Schulz, Daniel Wegemer|arXiv (Cornell University)|Dec 24, 2015
Wireless Networks and ProtocolsComputer Science1 references3 citations
TL;DR

This paper presents NexMon, a C-based firmware extension framework for modifying Wi-Fi firmware on smartphones to enable monitor mode on BCM4339 chips. By reverse-engineering the firmware and extending the wlc_bmac_recv function to bypass frame filtering, the authors successfully enable raw frame reception with radiotap headers, demonstrated by running airodump-ng on a Nexus 5.

ABSTRACT

Full control over a Wi-Fi chip for research purposes is often limited by its firmware, which makes it hard to evolve communication protocols and test schemes in practical environments. Monitor mode, which allows eavesdropping on all frames on a wireless communication channel, is a first step to lower this barrier. Use cases include, but are not limited to, network packet analyses, security research and testing of new medium access control layer protocols. Monitor mode is generally offered by SoftMAC drivers that implement the media access control sublayer management entity (MLME) in the driver rather than in the Wi-Fi chip. On smartphones, however, mostly FullMAC chips are used to reduce power consumption, as MLME tasks do not need to wake up the main processor. Even though, monitor mode is also possible in FullMAC scenarios, it is generally not implemented in today's Wi-Fi firmwares used in smartphones. This work focuses on bringing monitor mode to Nexus 5 smartphones to enhance the interoperability between applications that require monitor mode and BCM4339 Wi-Fi chips. The implementation is based on our new C-based programming framework to extend existing Wi-Fi firmwares.

Motivation & Objective

  • Enable monitor mode on FullMAC Wi-Fi chips in consumer smartphones, which typically lack this capability.
  • Overcome firmware limitations that prevent researchers from accessing raw Wi-Fi frames for network analysis and protocol testing.
  • Develop a reusable, C-based firmware extension framework for ARM-based Wi-Fi chip firmwares to support low-level modifications.
  • Demonstrate the feasibility of enabling monitor mode on widely available devices like the Nexus 5 with BCM4339 chips.
  • Provide a working, bootable image for researchers to test monitor mode without permanently altering their devices.

Proposed method

  • Reverse-engineered the BCM4339 firmware using IDA Pro and Hex-Rays decompiler to understand register maps, memory layouts, and control flow.
  • Designed a C-based firmware extension framework to safely inject code into existing firmware without modifying the original binary structure.
  • Modified the wlc_bmac_recv function to directly forward received frames to the BCMDHD driver via DMA, bypassing frame filtering logic.
  • Set critical D11 core registers (maccontrol) to enable promiscuous mode, including MCTL_PROMISC, MCTL_KEEPCONTROL, and MCTL_BCNS_PROMISC.
  • Re-applied register settings during each frame reception to counteract firmware resets that would otherwise disable monitor mode.
  • Provided a custom boot.img with a modified kernel and BCMDHD driver module, enabling monitor mode without altering the original system.

Experimental results

Research questions

  • RQ1Can monitor mode be successfully enabled on FullMAC Wi-Fi chips in consumer smartphones like the Nexus 5?
  • RQ2How can a C-based firmware extension framework be designed to safely modify Wi-Fi firmware without breaking core functionality?
  • RQ3What are the key firmware-level modifications required to bypass frame filtering and enable raw frame reception on BCM4339 chips?
  • RQ4Can the modified firmware maintain stability and interoperability with existing Android networking stack components?
  • RQ5To what extent can existing tools like airodump-ng and tcpdump be used to validate monitor mode functionality on a smartphone?

Key findings

  • Monitor mode was successfully enabled on the BCM4339 Wi-Fi chip in the Nexus 5 by modifying the wlc_bmac_recv function to forward all frames to the host driver.
  • The framework successfully sets and re-applies the maccontrol register bits (MCTL_PROMISC, MCTL_KEEPCONTROL, etc.) to maintain promiscuous reception despite firmware resets.
  • The modified firmware allows airodump-ng to detect and display Wi-Fi access points and associated frames, confirming functional monitor mode.
  • The radiotap header is added to received frames, enabling compatibility with standard monitor-mode tools.
  • The system is stable enough for research use, though firmware crashes occur under unknown conditions, requiring manual interface reset.
  • Frame injection is not yet implemented, but future work will extend the framework to support transmission of arbitrary Wi-Fi frames.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.