[Shawn McCombs] is up to no good with his first Teensy project. The board you see above takes the input from a PS2 keyboard and converts it to a USB connection. Oh, and did we mention that it also keeps track of everything you type as well?
From the beginning the project was intended to be a keylogger. It’s a man-in-the-middle device that could be hidden inside the case of a keyboard, making it appear to be a stock USB keyboard. Data is stored to an SD card so an attacker would need to gain access to the hardware after the data he’s targeting has been typed.
It works mostly as [Shawn] expected. He is, however, having trouble handling the CTRL, ALT, Windows, and Caps Lock keys. If this were actually being used maliciously it would be a dead giveaway. Many secure Windows machine require a CRTL-ALT-DELETE keystroke to access the login screen.
http://x86ed.com/programming/arduino/programmable-arduino-usb-keylogger/
Already done and smaller so it fits inside a keyboard easier.
Adrian’s is not a keystroke logger as that article implies, it just acts as a HID and can inject key strokes, which can be used to install malware.
Thanks, Jeffh.
I admit my project is not the best, and needs work, but it does function. I plan to fix the problems, and eventually make a permanent build. The reason it looks so weird, and bulky now is because I need it for prototyping. Thanks everyone, hope you like it. Also if I can’t get the code for ctrl, alt, win keys to work. I am thinking of hardwiring them to the teensy as buttons. Any opinions? Objections?
Keyboard modifiers…
My guess is he’s either having trouble with shift keys or has hard coded them in.
Ctrl+A is sent as two key strokes; 0 + 65 IIRC.
This’ll be awesome once he gets the bugs ironed out. and it’ll save me a load of effort when I finally get round to making by dvorak keyboard usb :D
Was thing the same thing — this could be quite useful for making my old Model Ms USB, if it’ll work with them…though I’d probably just buy one of the existing adapters that are known to work, they’re probably cheaper since I don’t have the hardware for this already.
Also, always nice to get a reminder of another benefit of using Dvorak. If it’s converting in software, a keylogger like this is just going to give gibberish. Sure, it’s a simple find and replace if they know what’s going on, but still, it’ll make the attacker’s job just a little bit tougher :)
How convenient. I have been thinking about a project that I need to send USB keyboard commands from a microcontroller…
The teensy is perfect for emulating a USB keyboard.
Check out the PHUKD lib for some neat ideas.
Use keyboard modifiers to handle the alt, shift, ctrl and windows keys.
The PHUKD lib has some examples.
“… an attacker would need to gain access to the hardware after the data he’s targeting has been typed.” Would (s)he? I’ve been toying with a similar idea. Mr. Adrian has already posted a proof of concept on a facebook post and also photo resistor. While it increases the risk of discovery, a dial home function would not be difficult to implement. During an idle period, keystrokes have not been entered for a period and / or photo resistor is dark. Launch a browser, login to a disposable email account, recall / replay the contents of the sd card. If interrupted by a keystroke or change in light kill the task. Upon completion wipe the sd card. Granted a locked machine may hinder this approach.. and depending on security settings may lock the machine. A keep live of something innocuous of something like a shift key sent every 299 seconds. (Sticky keys…) (Plug one hole another will open up winkey+L.)
I’m not having a issue sending out strokes, just receiving them.
We all have a problem receiving strokes, buddy.
I wish you luck. Even the commercial adapters can be somewhat flaky. I have one that doesn’t send anything for the macro key, and one that sends F12 for F11 and F5 for F6. I’m still looking for one that works properly, and building my own has come to mind a few times.
Very nice job. This is certainly different than Adrian’s. Yours is much better. Keep it up.