Ducky Script Runner
I wanted to see if it’s really true that you can hack a PC in seconds, just by using a USB stick. Conclusion: Yes, it is!
I bought a Rubber Ducky from Hak5 (https://www.hak5.org/). The Rubber Ducky will emulate a keyboard when you stick it into the PC. You program it to enter keystrokes as soon as it’s plugged in.
Preparing the Rubber Ducky is a bit cumbersome:
- Create a text file that contains the keystrokes you want to enter
- Take out the memory card from the Rubber Ducky
- Insert the memory card into the card reader
- Run a program that converts your text file into a .bin file
- Copy .bin file onto memory card
- Stick memory card back into the Rubber Ducky
And now you are ready to go.
When you create your script, you never get it right on the first try. You probably have to retry your script LOTS of times. Swapping around the memory card every time you change the script is a pain!
I looked around for a program that would run my scripts directly from the command line, but didn’t find any (for Windows), so I wrote my own. It’s a very simple WinForms application. Type in your script (or load it from a file), and press Run.
OBS: After pressing Run, don’t touch anything and don’t move the mouse! If you do, the focus may change to another window (or control or field), and your keystrokes will end up in the wrong place.
You find the code for this program on GitHub: https://github.com/ArveH/DuckyScriptRunner