Writing Your First Payload
Making DuckyScript Payloads on the USB Nugget
The USB Nugget supports DuckyScript™, making it easy to create your first payload!
If you need inspiration, you can find a list of DuckyScrit payloads on the Hak5 GitHub repository.
To get started, let’s review the full list of DuckyScript™ commands the RubberNugget supports.
DuckyScript™ Payload Structure
When composing a DuckyScript™ payload, commands are executed line by line. It’s also possible to press multiple keys at the same time by putting commands on the same line!
To write out a piece of text, type STRING in all caps. See the example below for how this works:
|SHIFT C||Type the Shift key and then the c key|
|SHIFT C||Press the Shift key and the c key at the same time|
|STRING SHIFT C||Types out “SHIFT c”|
Now that we have the basics down, let’s take a look at supported commands:
|This is used to leave comments, and is not executed in the script|
|This sets the default time in ms between each command|
|Sets a one-time delay in ms|
|Types whatever string follows the command|
|Changes the color of the LED. Current Options: R = red, G = green, B = blue, C = cyan, Y = yellow, M = magenta, W = white|
Most standard keys are supported by the Rubber Nugget.
Keys like SHIFT, ALT, and the WINDOWS or GUI key can be useful for accessing hotkey combinations, are are frequently used in combination key presses.
Other Useful Keys
Virtually anything you can do behind a keyboard can be recreated with the right keypresses. The following keys are essential to trigger keyboard shortcuts and navigate without a mouse.
Now that we’ve gone over the supported DuckyScript commands, let’s load and deploy a payload to the USB Nugget.