Adruino WiFi Hack Using the Keyboard Library

Using the Arduino Keyboard Library to Collect and Send WiFi Passwords from One Computer to Another.

Similar projects worth following
Since I use a fairly secure and long password for my wifi my friends can never seem to get it right. So I made a device that can easily grab my password and write it on their computer. However, I quickly found out that the inverse is also true. That I can quickly grab a password from someone else's computer and put it on my own. Feeling this great power coursing through my vains I decided it was best to share this information.

The project is actually quite simple from an electronics prospective. Consisting of and Arduino Micro, a couple of pull-down resistors and two switches. The program caries most of the brunt work allowing the arduino to act as a hid controller and using powershell to capture and write all of the wifi passwords to the eeprom. Then one it's connected to another computer it writes the password by using the same hid trick and writing the eeproms contents to a notepad file.

Simple stuff but my code might save you a couple of hours.

This is a simple circuit with boils down to just a microcontroller and a couple of switches. Most of the work for this project went into the programming. 

Then Arduino uses keyboard library to type a sequence of keys to open Powershell and get the WiFi password. The fist step it performs is pressing the Super (Windows) Key and then types "powershell" into the Windows Search function. Once Powershell is open it types in a script that grabs the saved WiFi passwords on the computer. (See Link for More Details) It then parses the tables that is created by the script and removes characters that the serial command cannot parse. After saving that in a system variable it then writes to the COM port. 

The Arduino then loops through the first 10 COM ports writing the WiFi variable to the Arduino. This is done indiscriminately because I didn't know how to determine which COM port the Arduino would be assigned. There is a chance that some devices would misinterpret the Serial data as a command but the chance seems minimal and the likely damage seems minimal. 

Then using the Serial.Read() function from the Arduino it writes to the EEPROM. The EEPROM saves the data even without continuous power. This allows the Arduino to be transferred from one computer to another without a power source. 

Using the same Keyboard library and method that was used to start Powershell, can open notepad. After opening Notepad the Arduino then uses the Keyboard Library to writes the WiFi passwords in the text file.




Main Programming File

ino - 2.57 kB - 03/03/2019 at 20:22



Functions for the Main File

plain - 2.56 kB - 03/03/2019 at 20:22



A Very Advanced Schematic of the Project

Portable Network Graphics (PNG) - 26.88 kB - 03/03/2019 at 18:39


  • 1 × Arduino Micro Arduino Micro was Used but Anything Compatible with the keyboard Library will work
  • 1 × Resistor 39k Pull Down Resistor any value from 10 - 100k should work
  • 2 × Normally Open Switches Any Normally Open Switch Will Work
  • 2 × Indicators My Switches had LEDs with Reistors Built In, Otherwise Normal LEDs Would be Fine

View project log

  • 1
    Step 1

View all instructions

Enjoy this project?



Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates