About USB D-Byte
USB D-Byte is a compact, powerful USB device that emulates a keyboard, similar to the USB Rubber Ducky and other BadUSB tools. Its sleek design, ease of use, and advanced features make payload deployment faster, smarter, and more flexible.
Key Features
-
Plug & Play Script Deployment: Drag and drop payloadsโno SD cards or WiFi needed.
-
Dual Mode Operation: Switch between Attack Mode and Setup Mode.
-
USB Mass Storage Support: Recognized as a USB flash drive for easy file management.
-
Advanced Scripting Functions: New commands enhance payload flexibility.
-
Multi-Language Keyboard Support: Compatible with various international keyboard layouts.
-
HID Emulation: Acts as a USB keyboard and mouse, with boot keyboard support for BIOS access.
-
Custom USB Identity: Modify VID, PID, serial number, manufacturer name, etc.
-
Fully Open-Source: Source code and firmware available for customization.
-
Built-in USB-A Connector: Plug directly into any USB-A port without adapters.
Specs USB D-Byte
-
Dimensions: 38mm x 16.5mm x 6.5mm
-
CPU: Dual-core 133 MHz 32-bit
-
Storage: 4/8/16 MB SPI flash
-
Switch: 2 Position Mode Switch (Attack & Setup)
-
Connector: USB-A plug
-
Buttons: Reset & boot button
Scripting: Basics
USB D-Byte's script language is compatible with Ducky Script (1.0), with added and expanded functions and keys. For a detailed Ducky Script reference, visit Hak5 Docs.
Basic Rules
-
A single space separates keys.
-
Keys on the same line are pressed and released simultaneously.
-
Use STRING to write text.
-
Case sensitivity matters.
Example Commands
-
WINDOWS R: Press Windows key and R key simultaneously.
-
STRING Hello World: Type "Hello World".
Example Script
REM Hello World Example Script
DEFAULTDELAY 200
DELAY 1000
GUI r
STRING notepad
ENTER
DELAY 1000
STRING Hello World!
Script Explanation
-
REM This is a comment: Adds a comment.
-
DEFAULTDELAY 200: Sets 200ms delay between lines.
-
DELAY 1000: Waits 1 second.
-
GUI r: Opens the Run window (Windows + R).
-
STRING notepad: Types "notepad".
-
ENTER: Launches Notepad.
-
DELAY 1000: Waits 1 second.
-
STRING Hello World!: Types "Hello World!" in Notepad.
Scripting: Functions
Below are key scripting functions for USB D-Byte.
Command |
Example |
Description |
---|---|---|
# or REM |
# Hello World! |
Comment |
DEFAULTDELAY or DEFAULT_DELAY |
DEFAULTDELAY 200 |
Sets delay between commands (ms) |
DELAY |
DELAY 1000 |
Adds delay (ms) |
STRING |
STRING Hello World! |
Types text |
STRINGLN |
STRINGLN Hello World! |
Types text and presses Enter |
REPEAT or REPLAY |
REPEAT 3 |
Repeats previous line n times |
Keyboard Layout
Set the default keyboard layout in preferences.json to avoid using LOCALE in scripts. Use LOCALE to change the keyboard layout for non-US keyboards to ensure correct character typing.
Example:
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
Use ### for multi-line comments:
###
The quick brown
fox jumps over
the lazy dog
###
Large Strings
For long text, use LSTRING_BEGIN and LSTRING_END to type text with line breaks:
LSTRING_BEGIN
The quick brown
fox jumps over
the lazy dog
LSTRING_END
Loops
Use LOOP_BEGIN and LOOP_END for for-loop functionality:
LOOP_BEGIN 3
STRING Hello
DELAY 1000
STRINGLN World!
LOOP_END
Imports
Run another script using IMPORT for better script organization:
IMPORT second_script.txt
LED
Control the onboard LED with LED:
-
Set color (R, G, B) and mode (SOLID, SLOW, FAST, OFF):
LED R SOLID
LED G SLOW
LED B FAST
-
Set RGB values (0-255):
LED 42 13 37
-
Add blink interval (ms):
LED 42 13 37 500
Custom Keycodes
Use KEYCODE to send specific keycodes, useful for keys not in the script language:
KEYCODE 0x02 0x04
-
First argument: Modifier (e.g., shift, ctrl).
-
Second argument: Up to 6 keys (decimal or hexadecimal).
Scripting: Keys
Standard Keys
a - z, A - Z, 0 - 9, F1 - F12
Modifier Keys
-
CTRL or CONTROL
-
SHIFT
-
ALT
-
GUI or WINDOWS or COMMAND
Other Keys
-
ENTER
-
MENU or APP
-
DELETE
-
HOME
-
INSERT
-
PAGEUP
-
PAGEDOWN
-
UP or UPARROW
-
DOWN or DOWNARROW
-
LEFT or LEFTARROW
-
RIGHT or RIGHTARROW
-
TAB
-
END
-
ESC or ESCAPE
-
SPACE
-
PAUSE or BREAK
-
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 mouse cursor |
CLICK button or MOUSE_CLICK button |
CLICK 1 |
Click a mouse button |
PRESS button or MOUSE_PRESS button |
PRESS 2 |
Hold 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
The preferences.json file configures USB D-Byte's default behavior. Place it in the root directory of the device's storage.
Example preferences.json
{
"$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
}
Settings
Setting |
Default Value |
Explanation |
---|---|---|
enable_msc |
false |
Enable USB mass storage 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 available layouts) |
default_delay |
5 |
Default delay between lines (ms) |
main_script |
main_script.txt |
Name of the 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 attack |
run_on_indicator |
false |
Start script on indicator key press (e.g., capslock) |
initial_delay |
1000 |
Startup delay (ms) |
Tip: Set default_layout in preferences.json to avoid specifying it in every script.
Credits
This project is based on USB Nova by SpacehuhnTech. Firmware and hardware are modified under MIT and CERN-OHL-P-2.0 licenses.
Thank you to the open-source community for making innovation accessible.
ยฉ 2025 RDH Robotics. All rights reserved.