Arduino Uno As Rubber Ducky Aka Bad USB or HID Device

by Random Creations in Circuits > Arduino

1257 Views, 2 Favorites, 0 Comments

Arduino Uno As Rubber Ducky Aka Bad USB or HID Device

Making Arduino Uno To Work Like Keyboard || Bad Usb

Rubber Ducky or Bad USB is a common device probably famous by Hak5. These devices act as HID (Human Interface Device) or in simple words it acts as a keyboard and injects keystrokes. This can be harmful if it is used by hackers. It can inject keystrokes in incredibly less time. And in the positive picture, it is an awesome device and it can be very helpful like we can automate our daily boring routine work with it.

Anyways there are so many options available to start with this topic. We can buy rubber duckies from the internet and they are good to go with but for me as a hobbyist, I wanted to make one from the available hardware So here I am. In this instructable, we will look that how we can make rubber ducky using Arduino Uno.

ardunio.jpg

Tools and Harware

ardunio.jpg

If you are here then I assume that you are familiar with Arduino Uno that's why I'll skip this part.

So our required tools Include the Following things:

  • Arduino Uno
  • Flip Software by Atmel
  • HID Library for arduino
  • Hex files
  • Arduino File

All these files and software can be found at the provided link. OPEN ME

Flip Software can be downloaded from its official website. I'm FLIP

Hurdles

This first problem was that Arduino Uno natively does not act as HID. But luckily there is a cheat available by using that we can make our simple Arduino act as HID.

The other problem is that we can only upload one sketch at one time and if we want to change our sketch then we will have to change our firmware again back to Usb Serial .

Arduino Sketch

Screenshot (51).png

Before doing anything We will have to upload our sketch to Arduino.

This provided example is just for demonstration. It'll simply play music provided on my Computer at a specific link.

  • There is HID library provided which you will have to install at first to make our sketch compatible.

To write your own sketch simply follow the keywords provided in the library and the manual way to do that task on your computer.

  • Before uploading code change the URL path with your own path. And also keep the pattern same like use double backward slashes or escape characters. (" \\ ")
  • Upload this sketch to your Arduino. Then move to the next step.

Making Arduino HID

Screenshot (35).png
Screenshot (41).png
Screenshot (52).png

Download Flip software from provided link and open it.

After opening the software,

  • Put your Arduino in DFU Mode ( See the picture)
  • Select the device as 16u2 (See the Second Screenshot)
  • Open the USB port either manually or by pressing Ctrl + U
  • Open the Keyboard.hex file and Press Run (See the Last One)

Harika! Your Arduino Uno will now work as HID. Simply unplug and plug again and you will see the magic.

Again if you want to change the sketch on Arduino then change these keyboard firmware with USB serial firmware provided in that folder.

Result

Making Arduino Uno To Work Like Keyboard || Bad Usb

Check out this following video for results and a visual Guide.