DuckyScript

term

hackingprogramming

Kept in this browser · My desk

The scripting language of Hak5's USB Rubber Ducky and related tools, compiled into a binary payload that the device types as keystrokes.

Hak5 says the language began in 2010 with three commands, keystroke injection and delays among them, was coupled with the Bash shell on the Bash Bunny in 2017, and became a structured language, DuckyScript 3.0, with the 2022 Ducky; Mischief Gadgets licenses it for the O.MG devices.

Basics. Each line is processed in order: REM for a comment, DELAY for a pause in milliseconds, STRING to type characters (with Shift held for capitals), and named keys such as ENTER or key combinations such as WINDOWS r. Compilation. Payload Studio compiles the source into inject.bin, using a Language File that maps characters to key codes for a given keyboard language, so a payload must match the target's layout. Version 3.0. Adds ATTACKMODE (keyboard, storage, both or off, with identifier spoofing), variables, conditionals, loops, functions, extensions, randomization and jitter, a random delay between key presses with a 20 ms default maximum. Device dialects. On the Bash Bunny the same commands sit inside Bash scripts and select serial, Ethernet, storage and keyboard modes; the Key Croc and the Shark Jack use their own dialects.

Also known as: Ducky Script, DuckyScript 3.0

← Back to D Back to the glossary