All Projects → luisbraganca → Rubber Ducky Library For Arduino

luisbraganca / Rubber Ducky Library For Arduino

Licence: gpl-3.0
An Arduino library that allows you to use a cheap Arduino (Leonardo) as a Rubber Ducky

Projects that are alternatives of or similar to Rubber Ducky Library For Arduino

Usb Keystroke Injector
☠️ An Arduino-based USB keyboard simulator which injects keystrokes via Bluetooth protocol or predefined payloads in a SD card.
Stars: ✭ 42 (+68%)
Mutual labels:  arduino, usb
nucular-keyboard
USB Keyboard Adapter for old ThinkPad keyboards
Stars: ✭ 27 (+8%)
Mutual labels:  keyboard, usb
Arduinoxinput
XInput library for USB capable Arduino boards
Stars: ✭ 126 (+404%)
Mutual labels:  arduino, usb
Minikbd
Stars: ✭ 97 (+288%)
Mutual labels:  keyboard, usb
Hoodloader2
16u2 Bootloader to reprogram 16u2 + 328/2560 with Arduino IDE
Stars: ✭ 509 (+1936%)
Mutual labels:  arduino, usb
Nrf52 Keyboard
A ble keyboard firmware using nrf52810/52832
Stars: ✭ 168 (+572%)
Mutual labels:  keyboard, usb
pi400kb
Raw HID keyboard forwarder to turn the Pi 400 into a USB keyboard
Stars: ✭ 182 (+628%)
Mutual labels:  keyboard, usb
Hidusbf
USB Mice Overclocking Software (for Windows)
Stars: ✭ 152 (+508%)
Mutual labels:  keyboard, usb
Keyberon
A rust crate to create a pure rust keyboard firmware.
Stars: ✭ 355 (+1320%)
Mutual labels:  keyboard, usb
nrf52-keyboard
A BLE & 2.4G Keyboard Firmware using nrf52810/52811/52832
Stars: ✭ 101 (+304%)
Mutual labels:  keyboard, usb
Binarykeyboard
A keyboard with two buttons that types in binary.
Stars: ✭ 141 (+464%)
Mutual labels:  arduino, keyboard
Esp32 Ble Keyboard
Bluetooth LE Keyboard library for the ESP32 (Arduino IDE compatible)
Stars: ✭ 533 (+2032%)
Mutual labels:  arduino, keyboard
SerialProxy
🖱️⌨️ Arduino Input Proxying for PC (.NET Core)
Stars: ✭ 39 (+56%)
Mutual labels:  keyboard, usb
Arduinomenu
Arduino generic menu/interactivity system
Stars: ✭ 520 (+1980%)
Mutual labels:  arduino, keyboard
Brutal
Payload for teensy like a rubber ducky but the syntax is different. this Human interfaes device ( HID attacks ). Penetration With Teensy . Brutal is a toolkit to quickly create various payload,powershell attack , virus attack and launch listener for a Human Interface Device ( Payload Teensy )
Stars: ✭ 678 (+2612%)
Mutual labels:  arduino, usb
Coapnet
CoAPnet is a high performance .NET library for CoAP based communication. It provides a CoAP client and a CoAP server. It also has DTLS support out of the box.
Stars: ✭ 23 (-8%)
Mutual labels:  arduino
Halloweenfire
🎃 Arduino sketch for multiple neopixels to create spooky 'fire' effect
Stars: ✭ 24 (-4%)
Mutual labels:  arduino
Dustduino
Project to collect and distribute particulate matter readings
Stars: ✭ 22 (-12%)
Mutual labels:  arduino
Esp8266 Anemometer
ESP8266 based wind anemometer project
Stars: ✭ 22 (-12%)
Mutual labels:  arduino
Libwdi
Windows Driver Installer library for USB devices
Stars: ✭ 928 (+3612%)
Mutual labels:  usb

Rubber Ducky library for Arduino

An Arduino library that allows you to use a cheap Arduino (Leonardo) as a Rubber Ducky

Device used

Arduino Leonardo Mini with USB adapter

Arduino leonardo mini with USB adapter

What's a Rubber Ducky?

"The USB Rubber Ducky is a keystroke injection tool disguised as a generic flash drive. Computers recognize it as a regular keyboard and accept pre-programmed keystroke payloads at over 1000 words per minute." Taken from Hak5 Gear.

Why using an Arduino instead of a Rubber Ducky?

Price

Rubber Ducky: $44.99

Arduino Leonardo Mini: $4.22 (no it's not a mistake)

Customization

Rubber Ducky: ???

Arduino Leonardo Mini: Switches, Memory Card, Wifi, etc...

If you're interested in building one from scratch with switches and such, take a look at Seytonic's youtube channel, or you can simply buy a pre-built one from his store.

Examples

Please note that the examples might have previous versions of the library, consider creating an arduino project using the most recent version and copy the "setup" method from the examples.

hello_world

Opens notepad, maximizes the window, writes down "Hello world!" and increases the font size to 200.

shutdown

Shuts down the machine within 60 seconds.

change_desktop_wallpaper

Downloads a JPG file, sets it at desktop wallpaper and deletes it.

Technical details

This library allows you to use an Arduino Leonardo as a Rubber Ducky with pre-built methods to simplify your keyboard script coding.

Methods

Utilities

/**
 * Prepares the virtual keyboard.
 * This method should be the first instruction on the setup code block.
 */
void init();
/**
 * Ends the virtual keyboard.
 * This method should be the last instruction on the setup code block.
 */
void finish();
/**
 * For the keyboard functions to work they need a small
 * delay between them. If you notice there's some bugs
 * when running your arduino, try using different delay values
 * on this function.
 */
void rdDelay();
/**
 * A longer delay (5 times the regular delay).
 */
void rdLongerDelay();
/**
 * Used to type non-alphanumeric keys.
 */
void rdTypeKey(uint8_t key);

Library

/**
 * Runs a program.
 * Example: "notepad" starts notepad, "calc" starts the calculator.
 */
void rdRun(String program);
/**
 * Takes a screenshot.
 */
void rdPrintScreen();
/**
 * Opens the JavaScript console on a browser.
 */
void rdOpenJavascriptConsole();
/**
 * Hides a window:
 * Basically it drags a window to the lowest it can be
 * and then repositions the cursor.
 */
void rdHideWindow();
/**
 * Same as Win + D
 */
void rdShowDesktop();
/**
 * Same as Ctrl + V
 */
void rdPaste();
/**
 * Same as Ctrl + X
 */
void rdCut();
/**
 * Same as Ctrl + C
 */
void rdCopy();
/**
 * Same as Gui + (the received key)
 */
void rdGuiCombination(uint8_t c);
/**
 * Same as Alt + (the received key)
 */
void rdAltCombination(uint8_t c);
/**
 * Same as Ctrl + (the received key)
 */
void rdCtrlCombination(uint8_t c);
/**
 * Same as Shift + (the received key).
 */
void rdShiftCombination(uint8_t c);
/**
 * Same as (Received hold key) + (target key).
 */
void rdKeyCombination(uint8_t holdKey, uint8_t targetKey);
/**
 * Same as (Received hold key 1) + (received hold key 2) + (target key).
 */
void rdKeyCombination(uint8_t holdKey1, uint8_t holdKey2, uint8_t targetKey);
/**
 * Same as above but with one more hold key.
 */
void rdKeyCombination(uint8_t holdKey1, uint8_t holdKey2, uint8_t holdKey3, uint8_t targetKey);
/**
 * Opens the command prompt without admin rights.
 */
void rdOpenCommandPrompt();
/**
 * Opens the command prompt, if the "admin" parameter
 * has a "true value", it opens a command prompt
 * with admin rights. Or without admin rights otherwise.
 */
void rdOpenCommandPrompt(boolean admin);
/**
 * Accepts the windows smart screen to grant admin permissions.
 */
void rdAcceptWindowsSmartScreen();
/**
 * It runs one or multiple powershell scripts,
 * to run multiple scripts, separate them with a new line "\n" char.
 */
void rdPowershellRun(String scripts);
/**
 * Changes the keyboard layout, if the computer only
 * has 1 keyboard layout this key combination won't
 * do anything.
 */
void rdChangeKeyboardLayout();

Getting started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

It's highly recommended that you edit this project using Arduino IDE that can be downloaded here since it was developed using that same tool. After installing, run the IDE and go to Tools > Board and select "Arduino Leonardo" or other compatible board (read the notes for further information).

Notes

The Arduino website suggests that only three boards are supported for the Mouse and Keyboard library:

  • Leonardo (CPU: ATmega32u4)

  • Micro (CPU: ATmega32u4)

  • Due (CPU: Atmel SAM3X8E ARM Cortex-M3)

Authors

  • Luís Bragança Silva - Initial work
  • Pedro Fernandes Costa - Initial work
  • João Marques Capinha - Initial work
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].