Weaponizing the BBC Micro:Bit
Damien Cauquil (Head of Research and Development · Econocom Digital Security)
BruCON 0x09 · Day 2
Overview
In this compelling talk from BruCON, Damien Cauquil unveils how the unassuming BBC Micro:Bit, a low-cost educational microcontroller, can be transformed into a potent tool for 2.4 GHz radio frequency (RF) security research and exploitation. Cauquil, a seasoned security researcher and reverse engineering enthusiast, meticulously details a hardware vulnerability present in the Nordic Semiconductor chips at the heart of the Micro:Bit, demonstrating how this flaw enables universal sniffing and injection capabilities across various wireless protocols.

Key moments
- 0:00 Introduction to BBC Micro:Bit and its capabilities
- 7:00 Hardware vulnerability enabling 2.4GHz sniffing
- 13:30 Demo: Micro:Bit sniffing wireless mouse traffic
- 15:00 BLE advertising packet sniffing and injection
- 22:00 Undetectable wireless keylogger for Microsoft keyboards
- 35:00 Live demo: Hijacking a Cheerson CX-10 quadcopter
- 39:00 Open-source framework and future BLE sniffer work
Weaponizing the BBC Micro:Bit
Speakers: Damien Cauquil, Head of Research and Development, Econocom Digital Security
Conference: BruCON
YouTube: https://www.youtube.com/watch?v=Z_eipXeC4Q4
Overview
In this compelling talk from BruCON, Damien Cauquil unveils how the unassuming BBC Micro:Bit, a low-cost educational microcontroller, can be transformed into a potent tool for 2.4 GHz radio frequency (RF) security research and exploitation. Cauquil, a seasoned security researcher and reverse engineering enthusiast, meticulously details a hardware vulnerability present in the Nordic Semiconductor chips at the heart of the Micro:Bit, demonstrating how this flaw enables universal sniffing and injection capabilities across various wireless protocols.
The presentation delves into practical applications of this "weaponized" Micro:Bit, showcasing its ability to intercept wireless keyboard keystrokes, inject Bluetooth Low Energy (BLE) advertising packets, and even hijack the control of a consumer quadcopter. Cauquil's work highlights a critical intersection of hardware security, embedded systems, and accessible hacking, emphasizing that sophisticated RF attacks are no longer confined to expensive, specialized equipment but can be performed with a device costing merely 15 euros.
This talk is particularly significant for its exploration of how widely adopted, inexpensive hardware can be repurposed for advanced security research, revealing inherent vulnerabilities in common wireless communication protocols. It serves as a stark reminder for both developers and users of wireless devices about the importance of robust encryption and authentication, especially given the ease with which these protocols can be compromised by readily available tools and publicly known hardware flaws.
Background
▶ Watch: Introduction to BBC Micro:Bit and its capabilities (0:00)
The BBC Micro:Bit is a tiny, programmable circuit board designed for educational purposes, aimed at introducing children to coding and electronics. It features a 5x5 LED matrix, two programmable buttons, an expansion connector, and, crucially, wireless communication capabilities. At its core lies a Nordic Semiconductor nRF51822 chip, a 2.4 GHz GFSK (Gaussian Frequency Shift Keying) transceiver. This chip is highly versatile, supporting various protocols including Nordic's proprietary Enhanced ShockBurst (ESB) – commonly found in wireless keyboards and mice – and Bluetooth Low Energy (BLE). The Micro:Bit's appeal is amplified by its low cost (around 15 euros) and its support for MicroPython, allowing users to program it with high-level Python code rather than C or C++. It also offers a convenient REPL (Read-Eval-Print Loop) for interactive debugging and development.
The foundation of Cauquil's research builds upon prior work by Travis Goodspeed and Marc Newlin. Goodspeed initially discovered a critical hardware vulnerability in the Nordic nRF24L01+ transceiver, a close relative of the nRF51822. This vulnerability allowed the transceiver to bypass its intended address filtering mechanism, effectively turning it into a universal sniffer for GFSK-modulated 2.4 GHz traffic. Marc Newlin subsequently weaponized this discovery with his MouseJack framework, presented at DEFCON 24, demonstrating how to exploit this flaw using a CrazyRadio (which also utilizes a Nordic transceiver) to inject keystrokes and compromise wireless keyboards and mice.
Cauquil's key insight was recognizing that the nRF51822 chip in the Micro:Bit suffered from the exact same hardware vulnerability. This observation paved the way for transforming the Micro:Bit into a low-cost, portable, and powerful tool capable of replicating and extending MouseJack-like attacks, as well as exploring other 2.4 GHz protocols. The problem's existence stems from an undefined, yet exploitable, register setting within the Nordic transceiver's address matching logic, a hardware-level flaw that allows an attacker to effectively ignore the intended address filtering.
Key Findings
▶ Watch: Demo: Micro:Bit sniffing wireless mouse traffic (13:30)
Damien Cauquil's research yielded several significant findings, demonstrating the potent capabilities unlocked by weaponizing the BBC Micro:Bit:
- nRF51822 Hardware Vulnerability: The central discovery is that the Nordic Semiconductor nRF51822 chip, a key component of the Micro:Bit, possesses the identical hardware vulnerability previously identified in the nRF24L01+. This flaw allows the transceiver to be configured in an "any-packet" sniffing mode, bypassing address-based filtering mechanisms and capturing virtually all GFSK-modulated 2.4 GHz traffic on a given channel.
- Micro:Bit as a Universal 2.4 GHz RF Tool: The Micro:Bit, due to its nRF51822 chip, MicroPython support, and low cost (15 euros), can be repurposed into an extremely versatile, battery-powered platform for 2.4 GHz RF sniffing and injection. This makes advanced wireless security research accessible to a much broader audience.
- "Radiobit" Firmware: Cauquil developed a custom, open-source MicroPython firmware named "Radiobit." This modified firmware exposes low-level radio controls to Python, enabling researchers to easily configure the nRF51822 for sniffing and injection without delving into complex C++ development (though C++ offers even deeper control).
- Successful Exploitation of ESB: The Micro:Bit was successfully used to sniff traffic from devices employing the Enhanced ShockBurst (ESB) protocol, notably demonstrating the real-time capture of keystrokes from a Microsoft wireless keyboard and tracking movements from a Logitech wireless mouse. This confirmed the Micro:Bit's viability for MouseJack-style attacks.
- BLE Protocol Analysis and Injection: The research extended to Bluetooth Low Energy (BLE), where the Micro:Bit proved capable of sniffing BLE advertising packets. Cauquil further demonstrated the ability to inject custom, even malformed, advertising packets, revealing a parsing vulnerability in
hcitoolthat could lead to unexpected behavior or potential buffer overflows. - Proprietary Drone Protocol Hijacking: A significant finding was the successful takeover of a Cheerson CX-10 quadcopter. By reverse-engineering its proprietary 2.4 GHz protocol, the Micro:Bit was used to sniff the drone's binding information (Transmitter ID, Vehicle ID) and then inject control packets, effectively hijacking the drone from its legitimate remote controller.
- Low-Cost BLE Connection Sniffing (Work-in-Progress): Cauquil presented ongoing work on using the Micro:Bit, specifically via its Device Abstraction Layer (DAL) in C++, to sniff active BLE connections. This ambitious project aims to create an open-source, 15-euro BLE sniffer capable of rivaling commercial tools costing hundreds of euros, exporting captured data in PCAP format for Wireshark analysis.
These findings collectively underscore the critical security implications of readily available hardware and the persistent vulnerabilities in wireless communication, even in protocols thought to be more robust.
Technical Deep Dive
▶ Watch: BLE advertising packet sniffing and injection (15:00)
The core of Damien Cauquil's "weaponization" of the BBC Micro:Bit lies in exploiting a nuanced hardware vulnerability within the Nordic Semiconductor nRF51822 transceiver, which is the brains of the Micro:Bit's wireless capabilities. This vulnerability, initially identified by Travis Goodspeed in the nRF24L01+ chip, pertains to how the transceiver handles address matching for incoming 2.4 GHz GFSK packets.
Normally, protocols like Enhanced ShockBurst (ESB), used in many wireless peripherals, structure their packets with a specific preamble (often 0x55), followed by a configurable address (typically 3 to 5 bytes), a dynamic payload length, the actual payload data, and a 2-byte CRC for integrity checking. The transceiver is designed to only process packets where the received address matches a pre-configured value, thus filtering out irrelevant traffic.
Goodspeed discovered that by setting a specific register in the transceiver to an invalid address length (specifically, 2 bytes), an unintended behavior is triggered. Instead of filtering by a full address, the transceiver begins matching on the standard 0x55 preamble. Crucially, it then includes the entire subsequent address field within the received payload data. Since the 0x55 preamble is a standard synchronization pattern for GFSK, this effectively turns the transceiver into a universal sniffer for all packets on that channel, irrespective of their intended destination address. The preamble itself is not verified, only matched, making it a powerful hardware-level bypass. The nRF51822 chip in the Micro:Bit exhibits this exact same flaw.
Cauquil's implementation on the Micro:Bit involved modifying the native C++ code underlying the MicroPython firmware's radio module. This allowed him to directly manipulate the nRF51822's registers. Specifically, he configured the radio to:
- Set the address length to 2 bytes.
- Set the "address" register to
0x0055, which aligns with the preamble matching behavior. - Enable a "sniff" mode, ensuring raw packet reception.
Unlike the nRF24L01+ which has a payload limitation of 32 bytes, the nRF51822 supports a maximum payload size of 254 bytes, offering significantly more data capture capability per packet. After receiving raw data, the Radiobit firmware (Cauquil's custom MicroPython build) performs software-based CRC checks to validate whether the captured data constitutes a legitimate ESB packet, filtering out noise. This process is exposed through simple Python functions, allowing users to implement a functional ESB sniffer in a handful of lines of code.
For Bluetooth Low Energy (BLE) sniffing, the approach adapts slightly. BLE advertising packets are transmitted on three dedicated advertising channels (37, 38, 39) and utilize a fixed, well-known access address (0x8E89BED6). By configuring the Micro:Bit's nRF51822 to listen specifically for this access address, it can passively intercept BLE advertising packets. These packets often contain valuable information such as device characteristics, service UUIDs, and even device names, which can be extracted and parsed. Cauquil demonstrated injecting custom BLE advertising packets, even crafting one with a malformed length field (10 bytes declared for a 9-byte string "BruCON'17"), which hcitool on Linux parsed incorrectly, revealing a potential vulnerability in the tool itself.
Sniffing active BLE connections is more complex due to channel hopping. BLE connections dynamically jump between a set of data channels, requiring the sniffer to synchronize and follow these hops. Crucial parameters for following a connection include the connection's unique Access Address, CRC Init value, Interval (time spent on each channel), and Hop Increment (number of channels jumped). While MicroPython can extract these parameters from connection request packets, the latency introduced by the Python interpreter makes real-time channel hopping for active connection sniffing impractical. For this, Cauquil is leveraging the Micro:Bit's Device Abstraction Layer (DAL), which allows direct C++ programming for higher performance. His ongoing work on a C++-based BLE sniffer aims to overcome these timing challenges, enabling the capture of full BLE conversations and exporting them to standard PCAP format for analysis in Wireshark.
Finally, the Cheerson CX-10 quadcopter takeover demonstrated the Micro:Bit's adaptability to proprietary protocols. This drone uses a custom 2.4 GHz protocol with its own unique preamble (0x710F55), distinct from the standard 0x55. Cauquil adapted the nRF51822's address configuration to match this custom preamble. The attack involves:
- Sniffing the initial binding process between the drone and its remote to extract the Transmitter ID and Vehicle ID.
- Deriving the 4 channel hopping sequence based on the Transmitter ID (first two bytes).
- Synchronizing with the drone by listening on the first channel.
- Injecting control packets on the derived channels quicker than the legitimate remote, thereby overriding its control. This technique exploits the lack of robust authentication in the drone's protocol.
Demo / Proof of Concept
▶ Watch: Live demo: Hijacking a Cheerson CX-10 quadcopter (35:00)
Damien Cauquil reinforced his technical explanations with several compelling live demonstrations and video excerpts, showcasing the practical implications of weaponizing the Micro:Bit.
The first practical demonstration involved sniffing a Logitech wireless mouse. Cauquil moved the mouse, and immediately, raw Enhanced ShockBurst (ESB) packets began scrolling across the Micro:Bit's console output. He pointed out that these packets, identifiable by a 0x0C02 prefix, clearly indicated Logitech traffic, proving the Micro:Bit's ability to passively intercept wireless peripheral communications.
Next, Cauquil demonstrated Bluetooth Low Energy (BLE) advertising packet injection. He crafted a custom BLE advertising packet containing the string "BruCON'17" but intentionally declared a length of 10 bytes for a 9-byte string. When this packet was injected and then detected by a standard Linux hcitool, the tool displayed the "BruCON'17" name correctly but also an additional, unexpected byte. This subtle anomaly highlighted a potential parsing vulnerability within hcitool itself, suggesting that malformed BLE packets could be used to trigger unexpected behavior or even buffer overflows in client-side software.
A more impactful demonstration was the wireless keylogger for Microsoft keyboards. Cauquil showcased a Micro:Bit powered by two AAA batteries, discreetly placed near a computer. As a user typed an email and password, the Micro:Bit, running custom firmware, silently captured and stored these keystrokes onto its flash filesystem. After the user finished, Cauquil connected the Micro:Bit to his computer and pressed a specific button, triggering the device to dump the logged keystrokes to the console, revealing the typed password "thisispassword." This demo powerfully illustrated the ease with which unencrypted wireless keyboard traffic can be intercepted.
The pinnacle of the presentation was the Cheerson CX-10 quadcopter takeover. Cauquil first showed a video of his testbed, where an original remote controller flew the tiny drone, but his custom Micro:Bit-integrated remote could then seamlessly take over control. For the live demonstration, he had a Cheerson CX-10 drone on stage. Initially, the drone was under the control of its original remote. Cauquil then activated his custom remote, which contained the Micro:Bit. After a brief synchronization process, he was able to seize control of the quadcopter, demonstrating full command over its movements. He even attempted a landing on the table, which, despite a slight wobble, was met with applause. Cauquil noted that the takeover works by sending control packets quicker than the original remote, exploiting the protocol's lack of robust authentication. He also cautioned that this specific hack does not work for the green version of the CX-10 due to differences in stick value interpretation.
These demonstrations collectively underscored the Micro:Bit's versatility and the significant security implications of its "weaponization," from passive data interception to active device hijacking, all with an affordable and accessible piece of hardware.
Defensive Implications
▶ Watch: Open-source framework and future BLE sniffer work (39:00)
The insights and demonstrations presented by Damien Cauquil carry significant defensive implications for users, developers, and manufacturers of 2.4 GHz wireless devices.
The primary and most robust defense against the passive sniffing and active injection attacks demonstrated, particularly against wireless keyboards and mice, is strong encryption of transmitted data. The keylogger demonstration explicitly relies on the lack of encryption in Microsoft wireless keyboard communications. Manufacturers of such peripherals should implement modern, robust encryption standards (e.g., AES-128 or higher) with proper key exchange mechanisms to protect sensitive user input. Without encryption, any cheap, accessible 2.4 GHz sniffer can intercept keystrokes.
For devices utilizing Nordic Semiconductor nRF51822 (or nRF24L01+) transceivers, manufacturers should consider firmware updates that patch the underlying hardware vulnerability. This would involve preventing the transceiver from being configured with an invalid address length, thereby disallowing the universal sniffing mode. However, such updates are often challenging or impossible for deployed consumer devices, highlighting the long-term impact of hardware-level flaws.
Users concerned about the security of their wireless peripherals might consider switching to wired alternatives for critical input devices like keyboards and mice, especially in environments where sensitive information is handled. This completely eliminates the RF attack surface.
In the context of Bluetooth Low Energy (BLE), while BLE itself includes security features, the ability to sniff advertising packets cheaply means that devices should be mindful of what information they broadcast unencrypted. Sensitive information should never be exposed in advertising data. Furthermore, the demonstrated hcitool vulnerability highlights the need for robust parsing and validation of incoming wireless packets in software stacks to prevent potential crashes or exploits from malformed data. Developers of BLE applications should ensure their stacks are resilient to malformed packets.
The drone takeover attack on the Cheerson CX-10 quadcopter underscores a broader issue with consumer-grade drone security. Proprietary protocols often lack strong authentication mechanisms during binding and operation, making them susceptible to hijacking. Drone manufacturers should prioritize implementing robust, cryptographically secure authentication and authorization protocols to prevent unauthorized control. This includes mutual authentication during binding and cryptographic signing of control commands.
Finally, while the Micro:Bit can be "weaponized," its accessibility also makes it an excellent educational and research tool. Security researchers and product developers can use this low-cost platform to proactively identify and test vulnerabilities in their own 2.4 GHz products, fostering a better understanding of RF security and leading to the development of more resilient devices.
Key Takeaways
- The BBC Micro:Bit, a 15-euro educational device, can be transformed into a powerful, battery-powered 2.4 GHz RF hacking tool, democratizing advanced wireless security research.
- A critical hardware vulnerability in Nordic Semiconductor nRF51822 (and nRF24L01+) transceivers allows universal sniffing of GFSK-modulated protocols by exploiting an invalid address length register setting, bypassing intended address filtering.
- This enables practical attacks such as passive wireless keyboard keylogging (demonstrated on Microsoft keyboards) and the active takeover of consumer drones (Cheerson CX-10 quadcopter).
- The speaker's open-source "Radiobit" firmware provides the necessary low-level access via MicroPython, supporting various protocols including Enhanced ShockBurst (ESB), Bluetooth Low Energy (BLE), and proprietary drone communications.
- Strong encryption is paramount for wireless devices to prevent passive data interception; without it, cheap tools like the weaponized Micro:Bit can easily compromise sensitive information.
- The Micro:Bit shows significant promise as an open-source, low-cost platform for advanced BLE research, including active connection sniffing, capable of rivaling much more expensive Software Defined Radio (SDR) solutions.
About the Speaker(s)
Damien Cauquil is the Head of Research and Development at Econocom Digital Security, a French company. As a senior security researcher, he possesses a deep passion and expertise in reverse engineering, encompassing both software and hardware domains. His work focuses on exploring and uncovering vulnerabilities in various technologies, particularly in wireless communication and embedded systems.