Skip to content

Cheap Rubber Ducky replacement, read the Summary for quick info

License

Notifications You must be signed in to change notification settings

lucki1000/Rubber-Ducky-Pi

Repository files navigation

Raspberry-Pi-Zero-Rubber-Ducky-Pi

Version 1.0 Rubber Ducky USB HID!

Info:

German Keyboard supports actually all these keys in the Result:

expected: ^°!"§$%&/()=?`´1234567890ß{}[]\+*~üäö,.;:-_#'<>|@
result  : ^°!"§$%&/()=?`´1234567890ß{}[]\+*~üäö,.;:-_#'<>|@

Special Thanks to Ephemeral.

Tester searched:

To support UK-Layout I need tester if you interessed you can comment on this issue.

Introduction

      _      _      _      USB       _      _      _
   __(.)< __(.)> __(.)=   Rubber-  >(.)__ <(.)__ =(.)__
   \___)  \___)  \___)    Ducky!    (___/  (___/  (___/

The USB Rubber Ducky is a Human Interface Device programmable with a simple scripting language allowing penetration testers to quickly and easily craft and deploy security auditing payloads that mimic human keyboard input. Tools and payloads can be found at usbrubberducky.com. Quack!

RubberDucky Pi is a project which allows the Raspberry Pi Zero to behave similar to a USB Rubber Ducky: a small device USB device which emulates a keyboard and automates key entry. Ducky scripts (uncompiled) which are made for the USB Rubber Ducky can be used with the Duckyberry Pi without modification. This can be useful for automating computer tasks, penetration testing machines, playing pranks, or just fun (by default plugging in an untouched Duckberry Pi image will open a Youtube video). Since it is recognised as a standard keyboard, this tool is compatible with Windows, Mac OS, Linux, Android, PlayStation 4, and anything that supports a USB keyboard.

Installation

1. Install RaspberryPi OS Lite with the RPI Imager.

2. Connect to your PI over ssh f. e. ssh username@ipaddress

3. Set environment variable to your Layout.

Currently supported de, us, uk:

layout=de
wget https://raw.githubusercontent.com/lucki1000/Rubber-Ducky-Pi/experimental/duckysetup.sh

or for oneliners (skip 4 and 5):

wget https://raw.githubusercontent.com/lucki1000/Rubber-Ducky-Pi/experimental/duckysetup.sh && chmod +x duckysetup.sh && ./duckysetup.sh $layout

4. Make the script executable

chmod +x duckysetup.sh

5. Run the script

./duckysetup.sh $layout

Using RubberDucky

6. Turn off the PI, plug it into the target host machine via USB cable in the peripheral micro USB port, NOT THE POWER PORT. A power cord is not required as the Pi Zero will take power directly from the host machine.

7. Login to your Pi through ssh and write your Script to get into write mode you have to press i and if your wrote your duckyscript or copied into it you have to press ESC + : + w and press Enter key.

Summary, Installation and how to use it.

Follow step 1 - 5.

Then edit /opt/Rubber-Ducky-Pi/payload.txt with your script.

After that reboot/shutdown your Zero and plug it into your target with the otg port. (Not the power port on the Pi)

Then wait.

If you wouldn’t reboot every time, you can launch this:

sudo duckpi.sh payload_file #any payload file who is readable like a .txt

If you want to change your keyboard layout, you have to edit the .vars file in /opt/Rubber-Ducky-Pi/.vars

Actually supported Keyboards:

us United States Keyboard layout

de German Keyboard layout

To be more user friendly I bring you directly into script editing if you login into your Pi. As script editor I selected Vim, feel free to change this to Nano, Emacs or something else, go to /etc/profile.d/rpi_ducky.sh and replace vim with your choice

vim "${work_dir}/payload.txt"

Have fun and Good Luck :)

Also feel free to make an issue if something doesn’t work.

Duckyscript

There are lots of ready made ducky scripts here and you can make your own with your brain or an generator.

The .dd file is a standard .txt file who is only the extension changed. To clear up some confusion, the DuckToolKit will give you an option to download a compiled inject.bin file or a duckycode.txt file. You need to download the duckycode.txt file and change the name/extension to payload.dd and then put it in the /boot part of the SD card so that the Pi can load and run the script.

Credits

Authors: lucki1000

Older Autors: ossiozac, dee-oh-double-gee, theresalu

Credits to Original Authors: DroidDucky by Andrej Budincevic (https://github.com/anbud/DroidDucky) hardpass by girst (https://github.com/girst/hardpass)

MIT License

Copyright (c) [2018] [Zac Henry Orehawa]

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *

About

Cheap Rubber Ducky replacement, read the Summary for quick info

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published