DIY Rubber Ducky for £4 using the Beetle USB [ATMEGA32U4]

This post shows you how to create a DIY Rubber Ducky for as little as £4 using a Beetle USB ATMEGA32U4, and follows on from my Raspberry Pi Rubber Ducky article posted last month.

Prerequisites

All you need for this article is a Windows machine and a Beetle USB. The Beetle USB can be picked up for £4.49 from eBay and takes around 6 weeks to arrive. The reason I have gone for the Beetle USB rather than the usual ATMEGA32U4 is because it has built in USB, rather than needing an additional micro USB cable.

Step 1: Get all the necessary software

We’re going to be using  David Gouveia‘s excellent rubberduino script to convert the existing Rubber Ducky scripts into something our Beetle can understand, then the Arduino IDE to upload our converted payloads to the Beetle.

First step is to get the Arduino environment set up:

  1. Head over to the Arduino site and download the Windows IDE
  2. Install the IDE and leave all the settings on default
  3. Once installed, run Arduino IDE and you should see something similar to below
  4. If not already installed, head to the Python site and download the latest 3.x version of Python
  5. Once installed, open up Command Prompt and either navigate to where Python is installed or, if Python is already in your PATH, continue to step 6
  6. Copy and paste the contents of the rubberduino file into a new file called rubberduino.py  and save it

Step 2: Convert your Rubber Ducky script

For simplicity I’m going to use the most basic Hello World payload from the Hak5 catalog, however these steps should be identical for any of the payloads on that site.

  1. Copy and paste your payload into a new text file called payload-before.txt and save it in the same place as your rubberduino.py file
  2. Back in Command Prompt, run this command
    python.exe rubberduino-convert.py payload-before.txt >> payload-after.txt
  3. Open the payload-after.txt file in your Arduino IDE like so
  4. Go to Tools -> Board and select Arduino/Genuino Micro
  5. Insert your Beetle USB
  6. Go to Sketch -> Verify/Compile and wait until it says Done Compiling
  7. Go to Sketch -> Port: and select your Beetle USB from the list
  8. Go to Sketch -> Upload and wait until it says Done Uploading

That’s it! Unplug the USB and close the IDE, and now put the Beetle back into your machine and confirm that your payload executes as expected!

Leave a Reply

Your email address will not be published. Required fields are marked *