(Proof of Concept) Arduino Keylogger with Wi-Fi!
Support me and my projects on Patreon!
- How to use it
- Sources and additional Links
Using an Arduino with an ATmega32u4 (which can emulate a keyboard) and a USB host shield, this combination can be used as a keylogger. The addition of an ESP8266 allows you to store and retrieve the keystrokes in a log file.
This is just a proof of concept
Please don't expect this to work with every keyboard layout!
I saw a few forum threads about making a USB keylogger with Arduino using a USB Host shield, but I couldn't find any published project about this.
So I hope this is a good basis for someone who wants to make a proper keylogger, though I won't develop this any further.
Use it only for testing purposes on your own devices!
I don't take any responsibility for what you do with this project.
keylogger sketch to your Arduino (ATmega32u4) and upload the
esp8266_saveSerial sketch to your ESP8266.
Connect your Arduino with the USB host shield and connect the serial pins (RX and TX (Arduino) to TX and RX (ESP8266)) and GND.
What you will need:
- ESP8266 Wi-Fi chip
- Arduino with an ATmega32u4
- USB Host Shield
There are different versions out there
Have a look at the official site: https://www.circuitsathome.com/usb-host-shield-hardware-manual/
I used an Arduino Leonardo with the big host shield.
You could probably build a very small version using the mini host shield and a pro micro.
esp8266_saveSerial sketch with Arduino.
You need to install the following Librarys:
Then compile and upload it to your ESP8266 (check if your settings are right).
You will need the USB Host Shield 2.0 Library.
keylogger sketch in Arduino and upload it to your Arduino.
Wire everything up
Ok so now you need to connect the ESP8266 with the Arduino.
Connect these pins:
|VCC (3.3V)||VCC (3.3V)|
Note: you'll need a 3.3V regulator if your Arduino only provides 5V.
Don't connect the ESP8266 to 5V!
If you use a plain ESP-12, you also have to set the enable pin and to HIGH and GPIO15 to LOW:
|CH_PD (EN)||HIGH (3.3V)|
How to use it
Plug the leonardo in the computer and the keyboard into the USB host shield. The ESP8266 will create a new access point
definitely not a keylogger. Connect to it using the password
Open your browser and go to
192.168.4.1, you will see every keytroke.
To clear the logfile go to
This project is licensed under the MIT License - see the license file file for details