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.
- Records keystrokes and saves them to a log file in internal flash storage
- Automatically creates a Wi-Fi Access Point
- Download log file from web UI at:
http://192.168.4.1/
Upcoming:
- Send Ducky scripts from the web UI
- Remote keyboard control via browser
- ESP32-S3 SuperMini
- CH9350 HID Module
- 4 Female Jumper Wires
| 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. Find flashing instructions here
After flashing, disconnect and reconnect the board via USB.
On your development machine:
pip install mpremoteVerify that your board is detected:
mpremote connect listInstall required packages directly onto the board:
mpremote mip install usb-device
mpremote mip install usb-device-keyboardClone the repository:
git clone https://github.com/Itsmmdoha/duckLogger.git
cd duckLoggerMake sure your board is connected via USB.
mpremote cp lib/*.py :/lib/mpremote cp main.py :Reboot the board:
mpremote reset-
Plug 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:
- Start logging keystrokes
- Create a Wi-Fi Access Point
- Start an HTTP server
Connect to the Wi-Fi Access Point (Password: duckPass1234) and open:
http://192.168.4.1/
to download the log file.
├── lib
│ ├── access_point.py
│ ├── api.py
│ ├── keyboard.py
│ ├── key_led.py
│ ├── logger.py
│ ├── microdot.py
│ └── uart_buffer.py
├── main.py
├── README.md
└── resources.md
This project includes Microdot by Miguel Grinberg (MIT License):
https://github.com/miguelgrinberg/microdot