
A ESP32-S3–based usb keylogger with wifi, easy DIY-able with widely available hardware.

DuckLogger is an ESP32-S3–based USB Key Logger. It logs keystrokes in a text file, and provides wireless access to download logs through a built-in Wi-Fi access point. Recreating this project doesn't require any custom PCB. Hardware used here is less than $10 in total on places like Aliexpress.

Access the web UI at:
http://192.168.4.1/
(When in Access Point mode)


| ESP32-S3 | CH9350 |
|---|---|
| 5V | 5V |
| GND | GND |
| GP1 | TX |
| GP2 | RX |
The CH9350 supports multiple operating modes, which are configured using the onboard DIP switches.

Set S0 to the GND position (0) and keep all other switches in the opposite position (1). This enables USB Host Mode, which converts USB keyboard inputs into serial data sent via UART at a default baud rate of 115200.
DuckLogger is written in MicroPython. Flash your board with MicroPython firmware. Find flashing instructions here.
After flashing, disconnect and reconnect the board via USB.
git clone https://github.com/Itsmmdoha/duckLogger.git
cd duckLogger
Make sure your board is connected via USB, then run:
python flasher.py
The flasher will automatically:
mpremote and required MicroPython packages on the boardindex.html and copy all files to the boardPlug the USB keyboard into the CH9350 HID module.
Connect the ESP32-S3 SuperMini to the target PC using a USB-C to USB-A cable.
The device will automatically:
If in Access Point mode(Default), connect to the Wi-Fi Access Point (Default Password: duckPass1234) and open:
http://192.168.4.1/
To access the command and control center.
DuckLogger currently supports a core set of DuckyScript commands for payload injection:
.
├── flasher.py
├── index.html
├── lib
│ ├── access_point.py
│ ├── api.py
│ ├── duckyscript.py
│ ├── keyboard.py
│ ├── key_led.py
│ ├── logger.py
│ ├── mapper.py
│ ├── microdot
│ │ ├── helpers.py
│ │ ├── __init__.py
│ │ ├── microdot.py
│ │ └── websocket.py
│ ├── queue.py
│ ├── settings.py
│ ├── uart_buffer.py
│ ├── wifi.py
│ └── wifi_radio.py
├── LICENSE
├── main.py
├── README.md
├── resources.md
└── settings.json
This project includes Microdot by Miguel Grinberg (MIT License):
https://github.com/miguelgrinberg/microdot
| Command | Description | Example |
|---|
DELAY | Pauses execution for a specified number of milliseconds. | DELAY 500 |
STRING | Types out a sequence of characters exactly as written. | STRING Hello, World! |
| Key Combos | Sends simultaneous keystrokes. | CTRL SHIFT ESC or ALT i |
| Single Keys | Sends individual special keys. | ENTER or TAB |