Arduboy Rubber Ducky

I’ve had the Arduboy since backing it back in May of 2015. I played with it a little bit when I first got it but for the most part it’s been sitting in my drawer.

I’ve also been following Hak5 for a while and one of their projects I’ve always really liked is the USB Rubber Ducky. I dont own one myself but I have always liked the idea of the automated HID attacks, especially with the DuckyScript language and all the available community payloads.

About a week ago I decided it would be a good idea to take my Arduboy out of storage and try developing something small for it. After I realized it has an ATmega32u4 I thought I could use Dckuino.js, a DuckyScript to Arduino converter, and have it run on the Arduboy.

Once I got a basic DuckyScript to work, I thought I could add more than one DuckyScript and write a selection menu in order to take advantage of the buttons on the Arduboy.

Lastly, I added a splash screen after the initial boot process that shows a rubber ducky icon. In order to get into the actual selection menu for the DuckyScripts you have to press the Konami Code sequence. After that you should see a menu with all the payloads on the Arduboy.

Setup

The first thing you’re going to need to get this up and running on your own Arduboy is a copy of the Arduboy Rubber Ducky code and the Arduino IDE.

Its also a good idea to install Arduboy from the Boards Manager in the Arduino IDE. To do this just go to preferences and add the following to "Additional Boards Manager URLs":

https://arduboy.github.io/board-support/package_arduboy_index.json

After that you can just go to Tools > Boards > Boards Manager, search for Arduboy and install it.

I also recommend installing the Arduboy2 library as the main branch of the Arduboy library is not currently being maintained.

Once everything is up and running it would be a good idea to try out some examples and even some games from the Arduboy team just to get used to the uploading to board process.

Whenever you’re ready to upload the Arduboy Rubber Ducky code to your Arduboy you only need to press the upload button and you’re done.

I’ve included the basic “Hello World” payloads with my code but you can either write your own DuckyScript payloads or get some from the community payloads. You can convert from DuckyScript to Arduino by using the Dckuino.js converter which I’m hosting myself to have everything in one place. After converting your DuckyScript payload, you can just copy the contents of the setup function and add it the the ducky.h file.

After that just scroll down to the end of the ducky.h file and add the function you just created to the list as well as a label for the menu.


Issues

I noticed in my testing that the payloads run a little slower coming from the Arduboy. You may find that you have to increase the delays in the scripts so that the commands run at the appropriate time.

Depending on which payloads I’m using I also sometimes run into size issues so this is something to keep in mind as you choose your payloads.


Future Work

I’m going to try to get my hands on an actual USB Rubber Ducky at some point so that I can compare execution times. With that comparison I should be able to figure out what sort of delays will make more sense for the Arduboy and I can modify Dckuino.js to convert specifically for it.

Questions

Feel free to contact me with any questions you may have.

You can also follow @benjifs on Twitter.

Links

Editors Note: Put a WEBGAP between you and the malware with a browser isolation technology or by leveraging a remote browser service.

Like what you read? Give Benji a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.