BadUSB
Run DuckyScript over USB HID
BadUSB runs scripts from the SD card as a USB HID keyboard. Scripts live in /mnt/ghostesp/badusb/.
Firmware Support
BadUSB is only available on configs that enable BadUSB.
Supported DuckyScript commands:
REMDEFAULT_DELAY/DEFAULTDELAYDELAYSTRINGREPEAT- modifier combos like
CTRL,SHIFT,ALT,GUI/WINDOWSwith a key - named keys like
ENTER,TAB,ESC, arrows, andF1-F12
Script Files
- Place scripts in
/mnt/ghostesp/badusb/ - File extension:
.txt(only.txtfiles are listed) - Remote streaming size limit: 64 KB per script
- SD card must be inserted and mounted to list or run scripts
To add your own files, create the badusb folder on the SD card and copy your .txt scripts into it.
CLI
Commands:
badusb list
badusb run <filename>
badusb stop
badusb exec <size>
Settings (applies to the next run):
badusb set_vid <hex>
badusb set_pid <hex>
badusb set_mfr <text>
badusb set_prod <text>
badusb set_rand <0|1>
badusb set_layout <n>
Keyboard layout values:
0= US1= DE2= FR3= UK4= ES
On-Display (Standalone)
From the BadUSB view:
- Open Settings
- Edit VID, PID, Manufacturer, Product
- Toggle Randomize for per-run USB details
- Select Layout to cycle the keyboard layout
These values are saved on the local device and used on the next run.
Remote
When BadUSB is used over Dual Comm, the controller sends the current settings to the peer right before streaming the script. The peer uses those settings for that run. These remote settings apply only for that run and do not persist to NVS on the peer. For setup details, see GhostLink.
Supported Devices
- BadUSB runs on builds with USB device support enabled.
- Remote mode uses a controller build with BadUSB Remote enabled and a peer build with BadUSB enabled.
