Skip to content

An ESP32-S2 RubberDucky script parser, with Mouse/PenDrive support 🦆

License

Notifications You must be signed in to change notification settings

tobozo/WUD-Ducky

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ESP32-S2 WUD-Ducky

This project is an attempt to add USB HID to the default example provided with @AprilBrother's WUD (*), however it also supports any ESP32-S2 equipped with a SD Card.

The default platformio POC coming with the WUD has been extended to support HID Composite (Keyboard+Mouse) and implements a payload parser. The payload syntax is heavily inspired by whid-injector and wifi_ducky.

Features

  • Dongle is detected as composite HID (Mouse and Keyboard) + USB Pendrive
  • Mounted MicroSD card allows editing files from the OS (**)
  • Starts WiFi in AP Mode
  • Runs a Webserver with the following endpoints:
    • /key send string sequence to the keyboard
    • /list list available files on the SD Card
    • /runpayload run ducky script from the SD Card
    • /delete delete a file on the SD Card (**)
    • /upload upload a file to the SD Card (**)
    • /* serves the file (e.g. index.html) from SPIFFS if it exists

(**) Changes on the SD Card made from the USB Pendrive aren't immediately accessible by the ESP32-S2's SD.read(), and vice-versa, so it is recommended to make a full power cycle after either changes are applied. This is due to the fact that USB Pendrive accesses the SD Partition using SD.rawRead and SD.rawWrite, and the lack of callable flushing methods with SD once the raw changes affect the file allocation table. Hopefully this will be fixed in the future, but it still wasn't at the time this readme file was written (2021:09:27).

WUD w00t?

WUD is the recursive acronym for WiFi USB Disk: it is an ESP32-S2 dongle made by @AprilBrother with a Micro SDCard slot hidden in the USB port.

See the wiki page for more info.

WUD Product image

Hardware/software Requirements:

Why Arduino?

  • Because platformio POC only works with older packages e.g. EspTinyUSB 1.2.0 / idf 4.2
  • Because I'm lazy

Roadmap

  • Improved payload parser
  • Improved web UI
  • Add RNDIS/CDC-ECM (network interface)

Credits:

Special thanks to @chegewara for helping me with this project and maintaining the awesome ESPTinyUSB library.