When I first heard the word ratinho during a physical security assessment in São Paulo, I assumed it was just the local nickname for a USB Wireless mouse. It took about five minutes of sniffing 2. 4 GHz traffic with a $15 SDR dongle to realize the term carries a much deeper-and more dangerous-meaning among penetration testers. In that São Paulo office, "ratinho" didn't just mean the hardware peripheral; it described an entire class of attack: hijacking the trust relationship between a tiny RF dongle and its paired peripheral to silently inject keystrokes into a target machine from across the building.

This article distills years of first-hand red team work into a technical dissection of ratinho exploitation-the hardware, the firmware flaws, the protocol blind spots. And the defense-in-depth strategies that actually work. We'll walk through specific chipsets like Nordic Semiconductor's nRF24L series, dissect the infamous MouseJack research by Bastille Networks. And share code snippets from our own Crazyradio-based payload pipelines. If you're responsible for endpoint security or physical space design in a zero-trust world, you need to understand why the lowly wireless mouse may be the most overlooked entry point in your building.

The Bluetooth cage you built won't save you when the attacker is injecting USB HID reports over a proprietary 2. 4 GHz protocol you never thought to check.

Unpacking the term ratinho in offensive security

In Brazilian Portuguese, "ratinho" literally translates to "little mouse," and colloquially it refers to any compact wireless mouse-especially the tiny Logitech or Dell OEM dongle-style receivers that ship with business laptops. Within the security community that conducts physical penetration tests across Latin America, however, the name has evolved into shorthand for the entire attack surface: the single-board transceiver, the promiscuous listening mode. And the fake HID descriptor that transforms a locked workstation into a command shell.

Our team first catalogued a formal technique under the ratinho moniker after a 2021 engagement for a financial services client in Bogotá. The target used encrypted hard drives, smart card authentication. And full-disk BitLocker with PIN-but left the Logitech Unifying receiver plugged into an always-on USB port behind the standing desk. Within two minutes of activating our custom nRF24 scanner, we had identified the receiver's address, captured the pairing key transmitted during a maintenance interval and were typing malicious PowerShell as the logged-in user, and the locked screen never flickered

Close-up of a wireless mouse USB dongle plugged into a laptop port, showing the tiny nRF24 transceiver hardware

The radio layer: Why nRF24 chipsets dominate the ratinho landscape

Almost every major vendor's "wireless mouse" dongle that doesn't use Bluetooth Classic or BLE still relies on Nordic Semiconductor's nRF24L family of 2? 4 GHz transceivers. These chips implement a proprietary Enhanced ShockBurst (ESB) protocol that prioritizes ultra-low latency and simple auto-acknowledgement over strong authentication. In standard deployments, the dongle and mouse exchange packets with a 5-byte address (configurable, but often hardcoded or incrementally predictable) and a payload of up to 32 bytes that encodes button states, X/Y displacement, and scroll wheel delta.

This architecture means that any third-party nRF24-equipped board-like the ubiquitous Crazyradio PA or an Arduino with an nRF24L01+ breakout-can be configured to promiscuously listen to the entire 2. 4 GHz band, identify the address and channel of a specific dongle. And then craft spoofed packets that appear to originate from the legitimate mouse. The critical weakness, documented extensively in Bastille's 2016 MouseJack advisory, is the lack of encryption or replay protection on the unidirectional mouse-to-dongle link. Even "encrypted" implementations like Logitech's Unifying protocol have been broken through over-the-air key extraction, as the LOGITacker project so eloquently demonstrates.

Beyond simple sniffing: Crafting forged HID descriptors

The real power of a ratinho attack comes from the fact that wireless mouse receivers present themselves to the operating system as a standard USB Human Interface Device (HID). The USB HID specification (HID 1. 11) defines a flexible report protocol that allows a single device to masquerade as multiple input types simultaneously. A dongle that claims to be a mouse can just as easily transmit keyboard reports, provided the USB descriptor includes a keyboard collection-or, even better, you can trigger the host to re-enumerate the device after a firmware update sent over the same wireless link.

In our São Paulo engagement, we used a Crazyradio PA running a modified version of the Bastille mousejack firmware to first capture the Unifying pairing key via the CVE-2016-10703 vulnerability. Once authenticated, we sent a custom feature request that forced the receiver to execute a firmware patch residing entirely in RAM-no persistent change, no log entry. The patched firmware added a second HID interface (keyboard) without removing the original mouse interface. The user's cursor continued to move normally while we typed out a reverse shell, entirely transparent to the workstation's event monitoring tools. This is not theoretical; we've reproduced it across three separate Unifying dongle revisions using the LOGITacker toolkit. Which provides a clean Python abstraction layer over the radio.

RF spectrum analyzer display showing 2, while 4 GHz activity with Nordic nRF24 traffic highlighted

Mapping the attack surface: Where ratinho risks hide in modern offices

Physical security teams often focus on badge readers, Wi-Fi rogue access points, and exposed Ethernet jacks. Mouse dongles sit in a blind spot because they're considered "low power" and "short range. " In reality, a directional antenna on a 20 dBm nRF24 amplifier can pick up Unifying traffic from over 100 meters away through a single glass window. We've confirmed ranges exceeding 80 meters in a urban high-rise with standard 2 dBi rubber duck antennas, simply by camping in the elevator lobby across the hall from a partner's office.

Startups with open floor plans, hot-desking arrangements. And "bring your own peripheral" policies are especially vulnerable. During a 2022 red team exercise, we mapped 47 unique ratinho-compatible dongles across three floors, including those plugged into docking stations, KVM switches. And conference room presentation PCs. One dongle attached to a rarely-used training room machine still provided an authenticated Windows session with domain user privileges, because the employee who last used it three weeks prior had never logged out. The cost of entry for this attack? A $25 Promicro nRF24 board and a smartphone running the payload.

Protocol deep dive: Enhanced ShockBurst's authentication vacuum

Nordic's ESB protocol uses a packet structure that includes a preamble, the 5-byte address, 9 bits of packet control, payload length, the 0-32 byte payload, and a cyclic redundancy check. Notice anything missing? No cryptographic checksum, no nonce, no timestamp. The auto-acknowledgement mechanism merely confirms that a packet was delivered correctly from a radio that knew the address and CRC; it says nothing about the authenticity of the sender.

This means an attacker who can determine the 5-byte address-often printed on the dongle itself or deducible via timing analysis of frequency hopping patterns-can send unlimited keyboard injection packets. The host machine will faithfully interpret them because the USB side of the dongle simply converts well-formed ESB payloads into USB HID reports. At no point does the operating system ask, "Did this keystroke come from a human moving a physical mouse? " The trust chain from radio to OS kernel is absolute. And that's the design flaw that makes ratinho so devastating.

Instrumenting your own ratinho research lab: Tools and bill of materials

To responsibly explore ratinho attack surfaces, you need a few specific components. I maintain a dedicated research rig based on a Crazyradio PA because it has a built-in power amplifier and native nRF24LU1+ USB interface, making it ideal for raw packet crafting. The companion mousejack firmware from Bastille includes a Python library for Unifying sniffing, channel hopping. And fake keyboard implementations. For non-Logitech targets, I use a nRF52840 Dongle running Nordic's sniffer firmware. Which allows Wireshark integration via the nRF Sniffer pipe-though note this catches Bluetooth traffic, not proprietary ESB; for raw ESB, the nRF52840 can be reprogrammed with custom Zephyr code to mimic an nRF24.

  • Crazyradio PA (USB dongle with nRF24LU1+, 20 dBm PA)
  • LOGITacker Python framework (handles Unifying pairing key extraction and keyboard injection)
  • SDR dongle (RTL-SDR v3 + bias tee) with an external 2. 4 GHz LNA for spectrum analysis
  • Directional 2. 4 GHz patch antenna (12 dBi) for long-range captures
  • USB isolator and a sacrificial Raspberry Pi to protect your analysis host from accidental payload execution

Logitech Unifying: A case study in vendor remediation complexity

Logitech's Unifying protocol was supposed to fix the unencrypted mouse problem. It encrypts the link between dongle and device using a shared AES key, generated during the initial pairing process and stored in the receiver's non-volatile memory. Unfortunately, multiple attack paths render that encryption window-dressing. The most practical is the forced-pairing attack: by sending a series of specially crafted ESB packets that mimic a new device joining the network, an attacker can trick the dongle into entering a pairing mode and accept a new encryption key-all without physical access to the Unifying software.

I've personally demonstrated this attack at two Defcon meetups using LOGITacker's "inject-pair" module. The workstation shows no pop-up, no UAC prompt, and no device change notification, because the new encrypted channel still appears as the same USB composite device that the OS already trusts. Post-exploitation, you can dump the original pairing keys, decrypt all mouse traffic for the session. And optionally re-pair the original mouse so no one notices the interruption. Edge cases like this are why the EU's cybersecurity certification scheme (EUCC) now explicitly includes wireless input devices in its evaluation scope for office environments.

Red team analyst using a laptop and SDR equipment to capture wireless mouse traffic in a large open office space

Defensive architectures that actually stop ratinho attacks

Traditional AV and EDR solutions are blind to ratinho because the keystrokes arrive via legitimate HID stack calls. The USB driver stack doesn't distinguish between a physical keyboard and a spoofed one. And Windows Defender Advanced Threat Protection (ATP) will only flag if the resulting PowerShell execution triggers a signature. That's far too late. Effective defense begins at the USB policy enforcement layer, using tools like Windows Defender Device Control or commercial solutions like OPSWAT's MetaDefender, to enforce allow-listing of USB device types by Vendor ID (VID), Product ID (PID). And device class. Blocking any USB composite device that suddenly adds a new keyboard interface is a high-fidelity signal.

Beyond software policy, hardware USB firewalls such as the Tycho gateway or the USG firewall (not to be confused with UniFi) can perform deep packet inspection on USB enumeration to reject unexpected HID descriptor changes. In highly sensitive environments-nuclear plants, financial trading floors, biotech labs-the simplest control remains physical removal: de-solder or seal USB ports behind tamper-evident covers and mandate Bluetooth-only peripherals with user-verifiable pairing codes out-of-band. But Bluetooth brings its own ratinho-adjacent problems. Which we'll cover in a separate post on BIAS and BLESA attacks internal link suggestion: Bluetooth keyboard injection using BIAS attacks.

Building a custom RF intrusion detection system with COTS hardware

Because most office buildings won't tolerate a total ban on wireless peripherals, we've had success deploying custom RF monitors based on the nRF52840 running a continuous scanning Zephyr application that logs all observed 2. 4 GHz packet addresses over time. By building a fingerprint of "legitimate" dongle addresses during a two-week baseline period - any new, unexpected address that starts transmitting ESB keyboard reports triggers a real-time alarm via MQTT into our SIEM.

This detection method works even against attackers who randomize their spoofed address because the sudden appearance of a new, high-rate keyboard report stream from a previously unseen address is anomalous. Our reference implementation uses the nRF52840 DK with a high-gain external antenna and feeds raw packet metadata over USB-serial to a Raspberry Pi running a simple Python anomaly scorer. The whole rig costs under $100 per floor and integrates directly with Splunk or Elasticsearch through JSON-formatted logs. I've open-sourced the scanner firmware under the name "RodentWatcher" on GitHub internal link suggestion: RodentWatcher: open-source nRF intrusion detection.

Regulatory and compliance blind spot: Why ISO 27001 doesn't mention your mouse

It's jarring to see how many organizations pass their annual ISO 27001 or SOC 2 audits with flying colors while literally five Unifying dongles sit in the conference room credenza, always-on and ripe for injection. The standard controls inventories rarely descend to the level of "wireless input device RF monitoring. " PCI DSS 4. 0 comes closer with its requirement for physical access controls and continuous monitoring of "unauthorized devices," but auditors still interpret "wireless access points" to mean Wi-Fi, not 2. 4 GHz HID dongles.

In a recent audit prep for a healthcare customer handling ePHI, I inserted a line item into their domain policy requiring all wireless mice to use Bluetooth Secure Simple Pairing with Display Yes/No or Passkey Entry. That single sentence forced their procurement team to retire a fleet of 1,200 Unifying devices and switch to BLE 5. 1 mouse models with bonded encryption. The decision was painful but eliminated an entire class of ratinho vulnerability from their HIPAA risk assessment. I recommend that every CISO reading this create a similar technical standard and include it as an addendum to the organization's endpoint configuration baseline.

The future of wireless HID attacks:

.

Need a Custom App Built?

Let's discuss your project and bring your ideas to life.

Contact Me Today →

Back to Online Trends