STRING Hello, World!the USB Rubber Ducky interprets each key individually — communicating with the attached computer each respective key press HID code and key release HID code.
Hello, World!string — the uppercase
H— the process involves holding down the
SHIFTmodifier key, pressing the
hkey, then finally releasing
SHIFT. Each of these are represented by a Human Interface Device (HID) code which is interpreted by the attached computer. All of this is being processed 60,000 times per second — which is what allows the USB Rubber Ducky to "type" at superhuman speeds.
akey, is held for a second? The answer is quite dependant on the operating system of the computer to which the USB Rubber Ducky is attached. On a modern Windows computer, a payload holding the letter
akey for 1 seconds may result in
aaaaaaaaaaaaaaaaaaaaawhile the same payload may result in only
aaaaaaaaaaon a similar computer running Linux. This can vary from computer to computer, as determined by each systems configured repeat delay and repeat rate.
akey on a macOS target may result in the accent menu appearing rather than a sequence of
HOLDcommand will hold the specified key, while the
RELEASEcommand will release it. Both commands require a key parameter.
GUI rkey combo to open the Run dialog, a powershell window will be opened.
ALT SPACEkey combo opens the window menu of the currently active window (in this case, the powershell window), followed by the
mkey to select the Move command.
DOWNARROWis held for 3 seconds, as specified by the
DELAY 3000command, before being released — thus hiding the contents of the powershell window below the screen.
tree c:\command is run, producing a graphical directory structure of the disk.
ALT) requires the
INJECT_MODprefix, so too does holding a modifier key.
CONTROLkey will be held for 4 seconds.