Arduboy Rubber Ducky
Tags: hacking, security, tech, arduboy
Published: 2018-01-31 21:50:06

---
title: "Arduboy Rubber Ducky"
published: true
tags: hacking,security,tech,arduboy
canonical_url: "https://benji.dog/posts/arduboy-rubber-ducky/"
---

![](https://cdn-images-1.medium.com/max/800/1*a-pVLDlmVi925TAobJ2Tjg.gif)

I’ve had the [_Arduboy_](https://www.arduboy.com/) 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&nbsp;drawer.

I’ve also been following [_Hak5_](https://www.hak5.org/) for a while and one of their projects I’ve always really liked is the [_USB Rubber Ducky_](https://hakshop.com/products/usb-rubber-ducky-deluxe). 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_](https://github.com/hak5darren/USB-Rubber-Ducky/wiki/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_](https://github.com/Thecakeisgit/Dckuino.js), a DuckyScript to Arduino converter, and have it run on the&nbsp;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&nbsp;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_](https://en.wikipedia.org/wiki/Konami_Code) sequence. After that you should see a menu with all the payloads on the&nbsp;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_](https://github.com/benjifs/arduboy-rubber-ducky) and the [_Arduino&nbsp;IDE_](https://www.arduino.cc/en/Main/Software).

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&nbsp;URLs":

[https://arduboy.github.io/board-support/package\_arduboy\_index.json](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&nbsp;it.

I also recommend installing the [_Arduboy2_](https://github.com/MLXXXp/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_](http://team-arg.com/games.html) just to get used to the uploading to board&nbsp;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&nbsp;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_](https://github.com/hak5darren/USB-Rubber-Ducky/wiki/Payloads). You can convert from DuckyScript to Arduino by using the [_Dckuino.js_](http://benji.dog/ducky) 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&nbsp;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&nbsp;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&nbsp;it.

#### Questions

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

You can also follow [_@benjifs_](https://twitter.com/benjifs) on&nbsp;Twitter.

#### Links

- [_GitHub Repo_](https://github.com/benjifs/arduboy-rubber-ducky)
- [_Duckyscript to Arduino converter_](http://benji.dog/ducky)
- [_Arduboy_](https://www.arduboy.com/)
- [_Arduino IDE_](https://www.arduino.cc/en/Main/Software)
- [_USB Rubber&nbsp;Ducky_](https://hakshop.com/products/usb-rubber-ducky-deluxe)

* * *