USB D-Byte

USB D-Byte is a compact and powerful USB device that emulates a keyboard—just like the USB Rubber Ducky and other BadUSB tools. What sets it apart is its sleek design, ease of use, and advanced features that make payload deployment faster, smarter, and more flexible.
Key Features
- Plug & Play Script Deployment: Simply drag and drop your payloads—no need for SD cards or WiFi.
- Dual Mode Operation: Effortlessly switch between Attack Mode and Setup Mode.
- USB Mass Storage Support: Recognized as a USB flash drive for easy access and file management.
- Advanced Scripting Functions: New powerful commands to enhance payload flexibility and control.
- Multi-Language Keyboard Support: Compatible with a wide range of international keyboard layouts.
- HID Emulation: Acts as a USB keyboard and mouse, including boot keyboard support for BIOS-level access.
- Custom USB Identity: Easily modify VID, PID, serial number, manufacturer name, and more.
- Fully Open-Source: Source code and firmware available for modification and customization.
- Built-in USB-A Connector: No adapters required—just plug directly into any USB-A port.
Specs USB D-Byte

- Dimensions: 38mm x 16.5mm x 6.5mm
- Dual-core 133 MHz 32-bit CPU
- 4/8/16 MB SPI flash
- 2 Position Mode Switch (Attack & Setup)
- USB-A plug
- Reset & boot button
Scripting: Basics
USB D-Byte's script language is compatible with Ducky Script (1.0). However, some functions and keys were added or expanded. You can find a great Ducky Script quick reference at docs.hak5.org.
Basic Rules
- A single space separates the keys
- All keys as part of the same line get pressed and released simultaneously
- To write text, use the
STRING
function - Upper and lower case matters!
Example | Explanation |
---|---|
WINDOWS R | Press the Windows key and the R key simultaneously |
STRING Hello World | Write "Hello World" |
Example Script
REM Hello World Example Script DEFAULTDELAY 200 DELAY 1000 GUI r STRING notepad ENTER DELAY 1000 STRING Hello World!
Line | Explanation |
---|---|
REM This is a comment | Comment something. |
DEFAULTDELAY 200 | Set the default delay between each line to 200 milliseconds. |
DELAY 1000 | Wait 1 second. |
GUI r | Press the Windows key and the R key simultaneously to open the run window. |
STRING notepad | Type "notepad". |
ENTER | Press enter key to launch the Windows Notepad application. |
DELAY 1000 | Wait 1 second. |
STRING Hello World! | Type "Hello World!" into the newly opened notepad window. |
Scripting: Functions
Command | Example | Description |
---|---|---|
# or REM | # Hello World! | Comment |
DEFAULTDELAY or DEFAULT_DELAY | DEFAULTDELAY 200 | Time in milliseconds between every command |
DELAY | DELAY 1000 | Delay in milliseconds |
STRING | STRING Hello World! | Types the following text |
STRINGLN | STRINGLN Hello World! | Like STRING but presses enter at the end |
REPEAT or REPLAY | REPEAT 3 | Repeats the previous line n times |
Keyboard Layout
Tip: You can also change the default keyboard layout in the preferences.json. That way, you don't have to use LOCALE
in your script.
Use LOCALE
to change the keyboard layout. This is necessary for everyone who's not using the US keyboard.
Otherwise, your BadUSB might type the wrong characters.
LOCALE DE STRING Gänsefüßchen
Available Keyboard Layouts
Region | Standard Layout | Mac Layout | Note |
---|---|---|---|
Belgium 🇧🇪 | BE | BE_MAC | |
Bulgaria 🇧🇬 | BG | BG_MAC | |
Canada 🇨🇦 | CA-CM, CA-FR | CA-FR_MAC | |
Switzerland 🇨🇭 | CH-DE, CH-FR | CH-DE_MAC, CH-FR_MAC | |
Czech Republic 🇨🇿 | CZ | CZ_MAC | |
Germany 🇩🇪 | DE | DE_MAC | |
Denmark 🇩🇰 | DK | DK_MAC | |
Estonia 🇪🇪 | EE | EE_MAC | |
Spain 🇪🇸 | ES | ES_MAC | |
Latin-America 🌎 | ES-LA | ES-LA_MAC | |
Finland 🇫🇮 | FI | FI_MAC | |
France 🇫🇷 | FR | FR_MAC | |
United Kingdom 🇬🇧 | GB | GB_MAC | |
Greece 🇬🇷 | GR | GR_MAC | |
Croatia 🇭🇷 | HR | HR_MAC | Since v1.2.1 |
Hungary 🇭🇺 | HU | HU_MAC | |
Ireland 🇮🇪 | IE | - | |
India 🇮🇳 | IN | IN_MAC | |
Iceland 🇮🇸 | IS | IS_MAC | |
Italy 🇮🇹 | IT | IT_MAC | |
Latvia 🇱🇻 | LT | LT_MAC | |
Lithuania 🇱🇹 | LV | LV_MAC | |
Netherlands 🇳🇱 | NL | NL_MAC | |
Norway 🇳🇴 | NO | NO_MAC | |
Poland 🇵🇱 | PL | PL_MAC | |
Brazil 🇧🇷 | PT-BR | PT-BR_MAC | |
Portugal 🇵🇹 | PT | PT_MAC | |
Romania 🇷🇴 | RO | RO_MAC | |
Russia 🇷🇺 | RU | RU_MAC | |
Sweden 🇸🇪 | SE | SE_MAC | |
Slovenia 🇸🇮 | SI | SI_MAC | |
Slovakia 🇸🇰 | SK | SK_MAC | |
Turkey 🇹🇷 | TR | TR_MAC | |
Ukraine 🇺🇦 | UA | UA_MAC | |
United States 🇺🇸 | US | US_MAC |
Multi-Line Comments
If you have a lot to say, you can use multi-line comments using ###
:
### The quick brown fox jumps over the lazy dog ###
Large Strings
For longer texts, use LSTRING_BEGIN
and LSTRING_END
. Everything between those two commands, including linebreaks, gets typed out:
LSTRING_BEGIN The quick brown fox jumps over the lazy dog LSTRING_END
Loops
To repeat one or more lines, you can use LOOP_BEGIN
and LOOP_END
, which works just like a for-loop:
LOOP_BEGIN 3 STRING Hello DELAY 1000 STRINGLN World! LOOP_END
Imports
With IMPORT
, you can start running another script from within a script! This is particularly useful if you want to split your script into multiple files for better readability - instead of having one gigantic script.
IMPORT second_script.txt
LED
Control the onboard LED with the LED
function.
You can either set the color (R
, G
, or B
) and mode (SOLID
, SLOW
, FAST
, or OFF
):
LED R SOLID LED G SLOW LED B FAST
Or you can set a specific RGB color value (0-255):
LED 42 13 37
And optionally, you can also set a blink interval in milliseconds (r,g,b, blink):
LED 42 13 37 500
Custom Keycodes
The KEYCODE
function sends specified keycodes to the target computer. You can use it to press any key or combination possible.
This is particularly useful if a key is not specified in the script language.
This example presses shift and a, resulting in an "A":
KEYCODE 0x02 0x04
The first argument specifies the modifiers (like shift, ctrl, or alt). The second argument is a key; you can specify up to 6 keys.
Values can be in decimal or hexadecimal:
KEYCODE modifier key1 [key2] [key3] [key4] [key5] [key6]
Scripting: Keys
Standard Keys
a
- z
, A
- Z
, 0
- 9
, F1
- F12
Modifier Keys
CTRL
orCONTROL
SHIFT
ALT
GUI
orWINDOWS
orCOMMAND
Other Keys
ENTER
MENU
orAPP
DELETE
HOME
INSERT
PAGEUP
PAGEDOWN
UP
orUPARROW
DOWN
orDOWNARROW
LEFT
orLEFTARROW
RIGHT
orRIGHTARROW
TAB
END
ESC
orESCAPE
SPACE
PAUSE
orBREAK
CAPSLOCK
NUMLOCK
PRINTSCREEN
SCROLLLOCK
Numpad Keys
NUM_0
-NUM_9
NUM_ASTERIX
NUM_ENTER
NUM_MINUS
NUM_DOT
NUM_PLUS
Scripting: Mouse
Command | Example | Description |
---|---|---|
MOVE x y or MOUSE x y | MOVE 100 0 | Move the mouse cursor |
CLICK button or MOUSE_CLICK button | CLICK 1 | Click a mouse button |
PRESS button or MOUSE_PRESS button | PRESS 2 | Keep pressing a mouse button |
RELEASE button or MOUSE_RELEASE button | RELEASE 2 | Release a mouse button |
SCROLL v h or MOUSE_SCROLL v h | SCROLL -10 0 | Scroll vertically or horizontally |
Mouse Buttons
Button | Description |
---|---|
0 | Left button |
1 | Right button |
2 | Middle button |
3 | Backward button |
4 | Forward button |
Preferences
1.2 preferences.json
The preferences.json
file lets you configure the default behavior of your USB D-Byte device. Place this file in the root directory of the device's storage. The device will read these preferences on startup.
{ "$schema": "https://raw.githubusercontent.com/RDHRobotics/D-Byte/refs/heads/main/schema.json", "enable_msc": false, "enable_led": true, "enable_hid": true, "vid": "16D0", "pid": "11A4", "version": "0100", "serial": "1337", "manufacturer": "RDH Robotics", "product": "USB D-Byte", "default_layout": "US", "default_delay": 5, "main_script": "main_script.txt", "attack_color": [ 128, 0, 0, 0 ], "setup_color": [ 0, 0, 20, 0 ], "idle_color": [ 0, 30, 0, 0 ], "disable_capslock": true, "run_on_indicator": false, "initial_delay": 1000 }
Setting | Default Value | Explanation |
---|---|---|
enable_msc | false | Enable USB mass storage (USB drive) in attack mode |
enable_led | true | Enable RGB LED |
enable_hid | true | Enable HID in setup mode |
vid | 16D0 | USB Vendor ID |
pid | 11A4 | USB Product ID |
version | 0100 | USB Product Revision (0100 => 1.00) |
serial | 1337 | USB serial number descriptor |
manufacturer | RDH Robotics | USB manufacturer descriptor |
product | USB D-Byte | USB product descriptor |
default_layout | US | Default Keyboard Layout (see all available layouts) |
default_delay | 5 | Default delay between each line |
main_script | main_script.txt | Name of your BadUSB script |
attack_color | [128,0,0,0] | LED color for attack mode |
setup_color | [0,0,20,0] | LED color for setup mode |
idle_color | [0,30,0,0] | LED color for finished attack |
disable_capslock | true | (*) Turn off capslock before starting attack |
run_on_indicator | false | (*) Start script when the user presses capslock, numlock, or another indicator key |
initial_delay | 1000 | Startup delay |
Tip: If you want to use a different keyboard layout, set default_layout
here so you don't need to specify it in every script.
Credits
This project is based on USB Nova by SpacehuhnTech.
Firmware and hardware have been modified under the terms of the MIT and CERN-OHL-P-2.0 licenses.
Thank you to the open-source community for making innovation accessible to all.