Password Keeper on Aruino Pro Micro or Why Keep It Simple When Elaborate Way Exists!

29,925

211

47

Posted

Introduction: Password Keeper on Aruino Pro Micro or Why Keep It Simple When Elaborate Way Exists!

It seems, that the main problem with microcontrollers for fan of electronics (especially beginners) is to find out where to apply them :) Nowaday electronics, especially digital one, is more and more looks like a black magic. Only 80-Lvl wisards are able to do something there with tiny components. That is a reason why Arduino boards become very popular. They encapsulate black magic and some smoke ;) into board with human-manageable pins.

This post I want to devote to a fairly simple project, named PasswordKeeper, on the base of Aruino Pro Micro board. This board hosted ATmega32U4 chip.

Step 1: The Idea

For a long time I wanted to make something simpe and useful with some controller. And then a colleague of mine threw an interesting idea - he was too lazy to key-in the login and password into his computer every day. So he took tiny DigiSpark (ATTiny85) board and created a device, which sends login+password to a computer when button clicked. Here is this contraption.

Step 2: Idea and Wiring

The excellent idea - I thought. Why not to borrow it and apply some crazy creativity to it.

Rebuilding the Arduino project and reloading it into the board every time when password changes - "It is not the droids you are looking for" [wave] . It's too straightforward. We would take much more tangled route!

The contraption should show how it works. But only three standard on-board LEDs - it is way too little for this purpose. Let raise LED number to 4099! So a small OLED 128X32 display module was added to the project. I couldn't think up where to squeese it for quite a while. And it fit perfectly into this project. A couple more buttons - and all is ready to go!

There were not enough space in ATTiny85 chip for the project - adding of display pulled for graphic library + fonts. So all this stuff just didn't fit into DigiSpark memory. Quick search come with a suitable platform: Arduino Pro Micro.

The main idea of the project is that ATmega32U4 by default pretends to be HID device - USB keyboard and USB COM port. Drivers for these devices are already pre-installed in the most of operating system - and nothing else needed to be set up.

The PasswordKeeper, brought to your attention, is a chindogu which imitates clicking of buttons on the keyboard. These cliks can transfer a login and a password to a computer. Even ubiquitous Ctrl-Alt-Del can be send by click of 1 button instead of 3. Or any other key sequence by your flavor.

The form factor of the selected modules is very compact, but neverless, easy to tangle with. It is possible with the minimum efforts to assemble the small and rather useful device. The wiring just could not be simpler.

Step 3: Cooking

Contraption Ingredients:

1) Aruino Pro Micro - 1 piece

2) OLED display 128x32 - 1 piece

3) Buttons - 2 piece (or any other type - by flawor).

4) DuPont connectors - 7 pieces (or some wire for soldering it up all together - by flavor).

Put it all into small food container and shake it thoroughly. According to probability theory items interconnects temselves right way eventually.

Oh, wait! It is not cooking-related article! My apologises.

You'd better connect it all together manually - according to wiring diagram and save yourself a couple eons of shaking.

So prototype for sketch debugging \ testing is ready.

Step 4: Constructing a Case

The sketch seems to be working. But it is unconvenient to use device in this form. So a little work in Sketchup provides us with a small casing.

Upd: An idea about the case.

You may take any suitable small transparent plastic box.

Or take thin transparent plastic from some packaging. Bend it according to device geometry. Put electronics inside and fill all free space with transparent silicon. It should give you relatifully nice looking device.

Step 5: 3D Prining

Threw it into the nearest 3D printer.

Step 6: Case Is Ready

And as usual, haste is necessary when catching fleas.

The first version of the casing is a bit small and the board doesn't fit!

Akela missed to left some gaps. So drawing is corrected and reprinted.

Second pass was better - the board fits perfectly.

Step 7: Trying Out Case

Put board inside, press on it and with a characteristic crunch it locked into the place.

Trying on buttons - they fits too.

Step 8: Soldering. Wires.

By the way, I have been looking for a long time for a good prototyping wire.

As a result, I now use 30AWG wire in my projects. You may see them on the photo. It is wrapping wire.

Few peoples now remembers what it is for.

But it fits perfectly for on-board soldering too. Colored wires good for tidying up usual mess by assigning distinct colors to wire functions. The wire is thin. Insulation withstands the temperature of the soldering iron well. Typical PVC insulation melts during the soldering immediately. This one become softened, but holds its shape and allows occasional touch of a soldering iron tip without melting to the core.

Step 9: PwKeeper Is Ready

So putting it all together gives us a small token that connects to a computer and allows you to manage and use

quite a large number of logins and passwords.

Step 10: PwKeeperPc - Easy Data Editing in Token

The number of logins is limited by the amount of on-board EEPROM memory (1024 bytes) and the length of passwords.

EEPROM memory keeps a number of records.

Each records contains comment field and up to 8 text fields.

Two of text fields named the Name and the Password - just for management conveniece.

The display allows you to select the desired login showing you comment fields.

It also allows you to edit the data in the token. Data may be edited with only two buttons. I squeesed some kind of Editor into the token. But, honestly, you should be a masochist to use it.

Therefore, to simplify passwords management I had to write a special program for the PC (by the way - do not foget to switch token into USB mode when you use this program).

Upd: For *nix peoples I added serial TTY console in PwKeeper v1.4 firmware. This console is activated from device menu. Connect to it with any suitable terminal program - and you may edit data in PwKeeper with several VI-like commands. Console is possible to use on Windows platform too. Just press Ctrl-Shift-M from Arduino IDE and you are there (do not forget activate TTY on PwKeeper before). But PwKeeperPc is much more convenient, I think.

Step 11: PwKeeper Is Running!

The token contains very sensitive data so some efforts should be put into security.

The main password to unlock the token exists.

It is empty by default, but as you set it in the token, you should enter it each time after power-on.

The main password is a user-defined sequence of single and double clicks of up and down buttons.

Step 12: Flow of Thoughts

Theoretically, it is possible to encrypt the data in EEPROM with some cryptographic algorithm - some space still left in flash.But these efforts would not be seen from outside - so I did not bother.

The token in its normal state is not visible to computer. To put it in the USB edit mode you should physically do it by pressing buttons on it. Likewise, to send a password you should physically press an UP button. So malicious hacker would not steal your passwords from the token. He would caught them on a USB port when you send them from token ;)

The result of this project is a contraption where I store passwords for my bank accounts and forums. Also my parents found it useful for logging into web mail and several other sites.

Especially for my colleague I programmed all remaining inputs of board as quick access buttons. Up to 12 buttons may be connected from remaining input pins to ground. By clicking on one of these buttons you jumps on the corresponding login (if it exists). So you only have to press the UP button to send it. Or hold a shortcut button a bit longer.

Step 13: Inspection-1

Before going public PwKeeper has undergo meticulous inspection.

Step 14: Inspection-2

The Head Of Inspection had just been woken up and is not in the mood.

But he frowns neverless- why clearly unfinished device is offered to public.

My words, that he needs to verify the quality of product and it is difficult to do with case closed, were just ignored by him.

Newerless (after bribing with sausage) he issued the certificate of approval.

Step 15: Conclusion

I invite all who wish to recreate this remarkable device.

It will allow you to lose all your passwords in an entirely new way!

Everyone can lose the shred of paper. Honestly, who would be impressed by it?

But make a special device, put all you password into it and lose it ot its password - this should raise some brows!

I know, I know, there are a lot of software password wallets exists in the world, but we are for hard way! KISS (Keep It Simple Stupid!) not for us! Remeber?

Besides, main passwords for these wallets should be entered too. And most of them are unable to send Ctrl-Alt-Del or other combination for logging you in. And even if they could - it's like hanging a key on a nail near to the lock.

All approved by The Head Of Inspections files for this project can be downloaded from here.
There are samples of config data too.

4 People Made This Project!

Recommendations

  • Epilog Challenge 9

    Epilog Challenge 9
  • Sew Warm Contest 2018

    Sew Warm Contest 2018
  • Gluten Free Challenge

    Gluten Free Challenge
user

We have a be nice policy.
Please be positive and constructive.

Tips

Questions

26 Comments

Nice 'ible and nice pet too :)

will try this sometime now that i have ordered the display.

I've got the 30awg wiring sorted and all packed away neatly in my 3d printed enclosure ... the pc app though NEVER can send the correct password - always fails mismatch no matter what I do - even for a blank password.

Also struggling with the menu system but hey, I'll get there.

Hi!

1) You may use TTY mode + (Ctrl-Shift-M) from Arduino IDE.

Then use unix VI-like commands, which described in P3 of rtf file.

2) PwKeeperPC

- When main password is empty there is no "Password?" screen on token.

You may fully earse data in token with DeviceMenu->Clr->Yes command.

Then start PwKeeperPc (Password should show all zeroes) and try Read.

Reading should pass.

Then you may set password, edit data, etc...

Then press Write - warning and red button should appear.

When you press Overwrite new password should be set.

Thank you, all is now working well. one thing though, where in your program (in which variable) do we put the character codes to set the sequence of sending? Does it matter if it is in login, password, v1, v2 or v3?

In one instance where I didn't fill every variable in an entry, I noticed the device puts that entry across and parts of the next entry in the database of logins thereby mixing the two.

This could be useful although I can yet see how.

I may make another with a couple more buttons - I'll have to modify the case however I can experiment with my 3D printer and keep it as small as possible.

Hi!

There is no difference between login, password, v1 ... v6 variables.

Only the order of sending: V1, V2,Login,V3,Password,V4,V5,V6.

Also you may modify Login and password directly in token - but it is very complicated.

There are *.skp files in project - you may load them to sketchup, edit and then generate stl.

If you create some nice case with several buttons - please put a link on them here. Or send them to me and I put them in PwKeeper project on github.

Mixing entries sounds like a bug.

Is it happens in PwKeeperPc or they mix when you load data into token?

When you save\load data to file is all ok there?

Could you try to edit data with TTY and commands and see if bug reprodused there?

Hi, these are two images of the pwdkeeper entry and the same entry outputted into a spreadsheet - you can see the spurious 1957

I shall try clearing the device several times, downloading pwdkeeper.exe again, and hard reset of the Arduino micro and will let you know the results tomorrow.

pwdkeeper entries.jpgspeadsheet pwdkeeper entry.jpg

Yes, it has similar (but extended) functionality. They offer nice completed device.

I offer fairly simple DIY project for peoples with golden hands :).

My target was to offer peoples to make something simple, unusual and relatefully useful by themselves from easy accessible and manageable parts.

I think, the most complicated part of my project - is a case.

I agree. :) Also I've felt that once you consider a handheld device which manages your passwords, the idea just sounds more and more useful and desirable. I was reluctant to shell out a sum such as the kickstarter was requesting, so seeing this instructable got me excited.

Hello.

I wanted to learn about this arduino code. How can I get the .ino code ? Is there any method to get it from the .hex file?

Thank you

II