Contents

1-Click Passwords

Contents

I was recently presented with a situation where I would have to regularly enter a 48 random character password for a month or more to log in to a computer that was assigned to me. Given that I couldn’t possibly memorize this string, and the computer is reasonably physically secure, I decided to build a device to do this for me.

I had previously used an Arduino to emulate a gamepad for a homemade Dance Dance Revolution mat. This time, I needed to emulate a keyboard. A search for “HID Arduino” returned the Arduino HID page, which suggested an Arduino with an Atmel 32u4 microcontroller. A search for Arduino 32u4 on Amazon returned the KeeYees Pro Micro clone, which I ordered.

/1-click-passwords/images/IMG_4297-1024x488.jpg
Arduino Pro Micro Clone, button wired to I/O 4

It came in, I soldered a button to I/O 4, and uploaded the following code:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
include "Keyboard.h"`  
include "Bounce2.h"  

const int buttonPin = 4;  
Bounce bounceTrigger = Bounce();  

void setup() {  
  bounceTrigger.attach(buttonPin, INPUT_PULLUP );  
  Keyboard.begin();  
}  

void loop() {  
  bounceTrigger.update();  
  if ( bounceTrigger.rose() ) {  
    Keyboard.println("I put my password here");  
  }  
}

Now, every morning, instead of copying 48 characters from a Post-it, I just click the button.

It should be said, this defeats the purpose of the password, and the password isn’t stored in a secure way on the microcontroller. But this technique is great for any time you need to automate a sequence of keystrokes.