This project is coming soon. Sign up to receive updates and be notified when this project launches.
LUNA is an all-in-one tool for building, testing, monitoring, and experimenting with USB devices. Built around a unique FPGA-based architecture, LUNA’s digital hardware can be fully customized to suit the application at hand. As a result, it can act as a no-compromises High-Speed USB protocol analyzer, a USB-hacking multi-tool, or a USB development platform.
Out-of-the-box, LUNA acts as a USB protocol analyzer capable of capturing and analyzing traffic between a host and any Low-, Full-, or High-Speed ("USB 2.0") USB device. It works seamlessly with our open-source ViewSB software, which translates captured USB traffic into a human-readable format. ViewSB runs on Linux, MacOS, Windows, and FreeBSD.
Combined with the LUNA software and the FaceDancer libraries, LUNA becomes a versatile USB-hacking and development tool. FaceDancer makes it quick and easy to create or tamper with real USB devices – not just emulations – even if you don’t have experience with digital hardware design, HDL, or FPGA architecture!
LUNA is a fully reconfigurable test instrument that provides all the hardware, gateware, firmware, and software you will need to work with – and, indeed, to master – USB. Below are a few of the things you’ll be able to use your LUNA for:
LUNA includes all of the hardware necessary for low-, full-, or high-speed USB protocol analysis – which means it can provide the same functionality as expensive commercial USB analyzers like the TotalPhase Beagle 480 or the LeCroy Mercury series.
Unlike existing USB solutions, however, LUNA’s analyzer stack is built entirely upon powerful, open source tooling. By leveraging the unique nMigen gateware-generation library and ultra-fast open FPGA tools, LUNA can automatically customize itself to the task at hand, which gives it access to unique features like user-defined hardware triggering and simultaneous capture of additional external or internal signals.
LUNA uses the open-source ViewSB analyzer frontend, which is a powerful, cross-platform tool for capturing, viewing, and analyzing USB data. ViewSB helps make USB traffic more human-readable while processing that traffic at any level of abstraction. And because it is completely open-source and extensible, you can add it to your own custom analysis layer simply by creating a single Python file.
A fully open-source set of training materials walk you through the basics of USB - including descriptions and diagrams of the basic elements of USB, such as USB Transfers pictured here. Click to expand.
The LUNA team has a long history of USB education. We’ve developed a number of open-source USB trainings and workshops at varying difficulty levels. Over the course of this campaign, we will develop and maintain additional LUNA-specific material that will help you learn how to work with – and hack on – USB.
LUNA’s customizable architecture allows you to do more than just watch the packets fly by. Using LUNA, you can reach out and touch USB traffic at every level. It’s a lot easier to learn how something works when you can take it apart, poke around inside it, and manipulate it in clever ways. LUNA gives you that level of control.
LUNA was built from the ground-up to facilitate the process of creating new USB devices. Whether you’re a veteran low-level hardware designer or completely new to this, LUNA will make your life easier in several ways.
First of all, its FaceDancer backend allows you to describe entire custom USB devices quickly, using just a few lines of Python, so you can try them out right away on real hardware. And, to help you get started, FaceDancer comes with a collection of existing device templates:
# Using a FaceDancer pre-made device, you can create a # "USB rubber ducky" with only a few lines of python! device = USBKeyboardDevice() async def type_letters(): await device.type_string('r', modifiers=KeyboardModifiers.MOD_LEFT_META) await asyncio.sleep(0.5) await device.type_string('calc\n') main(device, type_letters())
And, for those with an interest in FPGA design, LUNA’s unique nMigen library makes it almost trivial to implement USB gateware. Have a look at our library of examples and start building your own gateware devices in no time!
LUNA is as useful when working with existing USB devices as it is when designing new ones. By giving you the ability to inject or modify USB data transparently – on the fly – it allows you to do things that would otherwise be impossible. And its support for FaceDancer’s USBProxy means that manipulating USB data on the wire is as easy as writing a few lines of Python:
# USBProxy makes manipulating USB data trivial! # The following few lines are enough to flip the X-axis # on a Nintendo-branded USB game controller: class SwitchControllerInvertXFilter(USBProxyFilter): def filter_in(self, ep_num, data): # The fourth byte of our packets contains the # joystick X position, as a number between 0 and 255. data = 0xff - data return ep_num, data
LUNA’s USB peripherals are customized for each USBProxy application, so you’re not restricted to certain USB device configurations. It is theoretically possible to proxy just about any USB device in existence!
As a Great Scott Gadgets product, LUNA was designed from the beginning to enable new and innovative research, but it also supports a multitude of security and reverse-engineering applications:
A powerful, open source FPGA development board for the heart of your next project
The first open source iCE40 FPGA development board designed for teachers and students
Mobile, Open Hardware, RISC-V System-on-Chip (SoC) Development Kit