LoKi is a LoRa/Meshtastic-based implant for Red Teaming, drastically extending the operational range of covert physical layer attacks. The name LoKi is derived from LoRa and Kiboard (which is how you probably pronounce keyboard).
Think O.MG but you can now be free of the shackles of WiFi. LoKi overcomes this by integrating a Heltec LoRa module with custom Meshtastic firmware into an inconspicuous, off-the-shelf wired USB mouse, retaining full functionality. This low-power solution leverages the long-range capabilities of LoRa to execute Ducky Script™-compatible commands from kilometers away. The custom firmware transforms direct Meshtastic messages into reliable USB HID inputs, demonstrated by achieving remote admin shell acquisition and UAC bypass on a target machine.
The diagram below shows the architecture of LoKi. It reuses the physical enclosure and PCB of a wired USB mouse, with two additions.
- A LoRa module with a USB HID port that allows remote LoRa nodes to send commands to LoKi for transmission as keystrokes to the victim host.
- A mini 2-port USB hub that multiplexes both the LoRa board and the original mouse PCB to use the original wired USB connection to the host.
For the LoRa module, I picked the Heltec V3 Lite. I used the Heltec V3 with the OLED display for prototyping, but the V3 Lite consumes less power and fits into off-the-shelf wired USB mice more easily. What's nice about the Heltec V3 is the extra USB port that can be configured as any device class, and I needed the HID device class. The onboard USB with the type-C connection is a fixed CDC class for serial communication.
For the USB hub, I picked the Adafruit CH334F — this is a tiny 2-port hub that is a perfect fit for this project.
Here's a photo of one of my early prototypes.
The Heltec V3 and V3 Lite devices have the additional USB port on different pins, so here are the corresponding schematics.
The software is a fork of the official Meshtastic firmware and is hosted at Meshtastic firmware for LoKi.
The build and flashing instructions are unchanged. I personally use Visual Studio Code for editing, and the pio command line for building. I started this project by hand-coding the logic in fall 2025, but as Claude got significantly better in 2026, I shifted to focusing on design and letting Claude do the grunt work!