A rubber ducky is a tool, usually used for penetration testing or hacking, that pretends to be a keyboard and can make keystrokes quickly. With a rubber ducky one could change another's wallpaper, install a backdoor onto another's system, delete another's files, etc... All of this can be done by programming a small device and plugging it in to another's usb port.
Links to buy stuff:
Arduino Pro Micro - The main board you will need for this project.
OTG Adapters - you will need either these or a micro-USB to USB cable to be able to program and use your DIY Rubber Ducky.
Downloading & Installing the Arduino Environment
1. Open a new tab in your web browser and navigate to www.arduino.cc
2. Navigate to software tab and then click on the download option in the drop down menu.
3. Download the latest version of the Arduino IDE, I will be using 1.8.8 for this tutorial. It does not matter which format of the latest version you download but I recommend the windows installer option.
4. Install the Arduino Environment by clicking on the downloaded file, if you chose the windows installer option you can just click next through the installer.
Programming your DIY Rubber Ducky
1a. Start the Arduino software by clicking the shortcut on your desktop and plug your arduino into your computer.
1b. Once the Arduino IDE has started navigate to the tools tab, then select "Board" and then "Arduino Leonardo", Then navigate to the "port" option and choose the port that says something like "COM:Arduino Leonardo"
2. Navigate to a website like www.seytonic.com/ducky/ This has an online compiler for duckyscript.
3a. Now you can start in the online compiler, you can type simple commands like "STRING" which types something, "DELAY" which is a delay in milliseconds, and "ENTER" which presses enter.
3b. For some examples you can see some of Hak5's payloads or you can view some that I have written here.
4. Paste your duckyscript code into the online compiler, press compile, copy the output and paste it into the Arduino software. To upload the code to the Arduino chip click the button with the arrow pointing right near the top left of the screen. Keep in mind once you upload the code, it will also run on your computer.
5. Congratulations! You have now programmed an Arduino to act as a keyboard!