For the awareness case, I created a so called Ducky script that would download an image and set it as the wallpaper, then run some commands to max out the volume and lock it so it cannot be turned down, and then finally playing the Internet’s favorite song (don’t click). This worked quite well on unlocked computers, but was only a bit slow so I would optimize it so it would have a shorter running time.
For the reverse shell case, I created a second Ducky script that would disable Windows Defender and start a netcat listener. I could then connect to this listener on my attacker machine. In a real-life scenario, this would of course require a lot more steps, but it was still interesting to see it work in my small proof-of-concept.
I also was able to recreate the functionality of the RubberDucky using a Raspberry Pi Pico and the pico-ducky library. This process took some time to setup everything correctly, but I was able to run the same script. I found however, that it was a bit more difficult to use because of the loose cables, so I did most of my testing with the actual USB Rubber Ducky.
The USB Rubber Ducky is a great tool for testing out some simple hotplug attacks. I also think I would use this tool in the future when some script has to be run manually and it cannot be done in a remotely automated way (e.g. using SSH or Ansible). It offers a simple scripting language which you can use to load custom payloads available online or written by yourself.
Thumbnail source: Hak5