How To

How To Build A “USB Password Generator” To Create And Enter Passwords Automatically


Short Bytes:
Willing to own your personal USB key that takes care of your password changing tasks? Using a USB, an ATtiny85, and some soldering skills, you can create a USB password generator that creates and enters passwords automatically. To do this, you need to program ATtiny85 in a way to act like a USB keyboard. A detailed method has been described by a skilled maker Joonas Pihlajamaa on hacker blog Code and Life.

There are many applications where one needs to change the passwords on a regular basis. While such practices aren’t followed by a regular technology user, many enterprises encourage their employees to do so.

The same problem was faced by Joonas Pihlajamaa, whose employer required him to change his password on a regular interval. This inspired him to come up with a way that would help him skip remembering a new password altogether. He decided to make a small USB HID keyboard that types a password stored in EEPROM–a type of non-volatile memory–every time it’s connected to a system.

After connecting the device, in order to create a new password, one needs to just tap caps lock button a few times–4 times to start password regeneration and once for each password character generated. Just in case you’re wondering, 10 is the default password length.


Pihlajamaa created his version of USB password generator with the help of a USB and an ATtiny85. The ATtiny was programmed to act like a USB keyword that performs the password generation and entering process automatically. The outer enclosure of the device was from an old 512MB flash drive. With the help of some soldering, he managed to connect the Zener diodes, resistors, jumpers, GND, VCC, and ATtiny on a tripad vero-board.


Pihlajamaa has also shared the code that one needs to power the device. The code enables the communication to the device and receives status changes from the computer.

On the hacker blog Code and Life, Pihlajamaa has shared a detailed tutorial including the parts and code that one will need to create his/her personal USB password generator. Here’s a video of the device in action:

Did you find this DIY helpful? Don’t forget to drop your feedback in the comments section below.

Also ReadHack Sticky Key Feature And Reset Windows Password Using CMD

To Top

Pin It on Pinterest

Share This