Skip to content

WiFi Duck

With the WiFi Duck, you can manage all scripts from a web interface. So unlike other BadUSBs, you don’t need to install an app, log in, compile or copy scripts to an SD card.

You can find the full documentation here at /wifiduck.

  1. Plug in your WiFi Duck
  2. Connect to the WiFi network wifiduck with the password wifiduck
  3. Open a browser and visit 192.168.4.1
  4. Write, save and run your first Ducky Script
  5. [Recommended] Open Settings (top right corner) and update SSID and password

You can buy a WiFi Duck here:

To build a WiFi Duck yourself, you need the following hardware:

  • An Atmega32u4 development board (i.e., Pro micro)
  • An ESP8266 or ESP8285 development board (i.e., Wemos D1 Mini)
  • Optional: A single Neopixel (WS2812b) or Dotstar (APA102) LED

A map of pins that need to be connected:

ESP8266Atmega32u4
D1 alias GPIO 53 alias SCL
D2 alias GPIO 42 alias SDA
GNDGND

Ideally, you want the Atmega32u4 to power the ESP8266, so it can run on one USB connection, instead of having to plug in both constantly:

ESP8266 Dev BoardAtmega32u4
5V or VINRAW, 5V or VIN

To add a Neopixel (WS2812b) LED:

Atmega32u4Neopixel LED
7*DI alias Data, In
5V alias VCC5V alias VCC
GNDGND

To make the DIY process easier, I designed a little PCB:

  1. Download and install the Arduino IDE.
  2. Start the Arduino IDE, go to File > Preferences.
  3. At Additional Board Manager URLs enter https://raw.githubusercontent.com/SpacehuhnTech/arduino/main/package_spacehuhn_index.json. You can add multiple URLs, separating them with commas.
  4. Go to Tools > Board > Board Manager, search for wifi duck and install WiFi Duck AVR Boards and WiFi Duck ESP8266 Boards.
  5. Download and extract this repository or git clone it.
  1. Open atmegaduck/atmega_duck.ino with the Arduino IDE.
  2. Under Tools > Board in the WiFi Duck AVR section, select your board; for example, Sparkfun Pro Micro.
  3. Connect the Atmega32u4 board via USB and select its port under Tools > Port.
  4. Optional: Under Tools, you can enable the LED and set its pin. You can also change the USB ID to make it appear as a particular keyboard type.
  5. Press Upload.
  1. Open esp_duck/esp_duck.ino with the Arduino IDE.
  2. Under Tools > Board in the WiFi Duck ESP8266 section, select your board. For example NodeMCU 1.0 (ESP-12E Module).
  3. Connect the ESP8266 board via USB and select its port under Tools > Port.
  4. Press Upload.

Note: After the initial flashing, the ESP8266 has to format its memory, so it might take a minute until it’s fully ready.

If you connected the RGB LED:

  • Blue LED = Connection working
  • Green LED = Device ready