Ownage By USB Keyboard
When was the last time Windows asked you for permission before adding your new hardware -- say, a mouse?
September 8, 2010
When was the last time Windows asked you for permission before adding your new hardware -- say, a mouse?The first online discussion on compromising a computer using USB that I remember was on the pen-test mailing list a few years ago. Back then, what dominated the discussion was the Autorun method and how it could be used on USB rather than just with CDs.
A few of us (OK, me) also discussed vulnerabilities in drivers and how they could be abused for this same purpose, but most folks were stuck on Autorun and refused to understand what this thread might mean. A few years later, folks were discussing the risk of driver vulnerabilities, which, had a proper risk analysis been performed or history looked at, would have surprised no one.
But there's another USB risk that's beautiful in its simplicity.
A couple of years ago a friend of mine, Elad Raz, spoke of how anyone can develop for USB; simply creating a fake keyboard, which would then be plugged into and compromise the computer (say, by browsing to a malicious site as one example) is very doable and even easy to do.
Another interesting option for compromising a computer using a keyboard is with Notepad. The fake keyboard would open Notepad, type in the new executable code, and run it.
Ah! How is it possible to type Shellcode? Doesn't it require the use of unprintable characters?
Some years back we have seen a perfect example of Shellcode with printables only in Phrack 57, posted by Rix (more info on Wikipedia). Surely such code can be updated, if it hasn't already been updated in private by someone.
I remembered all of this because of another friend sending me the following:
"Yawning, you start your work day by opening up Microsoft Word. As you start typing, you notice that your computer is, well, possessed: the CAPS LOCK key switches on and off, random keystrokes get entered into Word, and your cursor moves around erratically and uncontrollably."
Surely, if such a tool can be sold as a game for bored office workers, then a capable attacker can create a similar tool for malicious purposes, without needing to find a vulnerability at ring0 level, compromising the driver.
The difference between a few years ago when my friend and I talked and today is that back then, a development kit would cost a lot of money. Today, if you can shell out $25, you're set.
Follow Gadi Evron on Twitter: http://twitter.com/gadievron.
Gadi Evron is an independent security strategist based in Israel. Special to Dark Reading.
About the Author
You May Also Like