Slashdot Mirror


The Keyboard That Could Phone Home

An anonymous reader writes "University of Pennsylvania researchers have developed a keylogger they call the JitterBug that can modulate passwords or other information into normal traffic by adding imperceptible delays to keypresses as people use keyboard and network-intensive apps like telnet and remote desktop. The idea is that the delays in keypresses cause delays in packets, and data can be encoded in those delays. There's no software or extra network activity that the victim can see, but anyone who can see the traffic (even if it's encrypted) could grab the data. Here's the scary part: the researchers say that it could be manufactured into a keyboard, making these keyloggers widespread and virtually undetectable."

25 of 287 comments (clear)

  1. Could you get around this... by Saint+Aardvark · · Score: 5, Insightful

    ...by adding your own random jitter to outgoing packets? I'm thinking of something like an option in OpenBSD to do this for all TCP connections, say.

    1. Re:Could you get around this... by interiot · · Score: 5, Interesting

      There was a talk at the university I was at about the security measures on US government firewalls, for particularly secure computers. Covert timing channels are one clear class of things that a very security firewall needs to protect against (not just for JitterBugs... trojans/viruses could try to communicate this way as well), and they did just that... changed the timing of the packets at the firewall to try to prevent covert timing channels from being possible.

    2. Re:Could you get around this... by NemosomeN · · Score: 5, Funny

      The more likely workaround would be devices you put between your keyboard and the computer. Easier? No. Cheaper? No. Marketable? Maybe.

      --
      I hate grammar Nazi's.
    3. Re:Could you get around this... by wall0159 · · Score: 4, Informative

      Well, probably. But what you're doing is just adding noise to the system - this can be circumvented by just taking longer to send the time-based data (ie send the data with greater redundancy, so that it's more noise tolerant). Also, adding jitter would slow the network connection because you can't make transmission faster, you can only slow it by the mean delay of your introduced noise.

      A more effective method would be to use a method of transmission that wasn't time-dependent on what the user typed. For example, ssh could be designed so that it sent a packet every 100ms (whatever - I don't know the specific time) regardless of what the user had typed. I think this would render this attack useless, but would still introduce some latency...

      The article says 'In applications such as telnet and remote desktop, a packet is sent every time a user presses a key' - is this the case with ssh too? I mean - surely *nobody* uses telnet for secure communications!

    4. Re:Could you get around this... by LincolnQ · · Score: 4, Interesting

      The thing I don't get is how you distinguish the miniscule delay introduced with this system from the much larger delay between subsequent keypresses the user makes. I don't think most people type at such a consistent rate that you could plug this in and immediately start observing traffic. (I wouldn't be too surprised if you could do it after observing the person's typing habits for a long time... but that would be different for every person, so most likely impractical.)

    5. Re:Could you get around this... by sploxx · · Score: 4, Insightful

      Maybe this is obvious, but anyway:

      This is also another reason for 100% open source code for any important part (which you use to transfer confidential information) of your computer.

      Especially for low-level parts like device drivers. Stallman wanted to have a free printer driver. Remember the yellow dots??

      I hope this is something which makes the closed source WLAN (it's working, it's ok) fans
      a bit quieter.

    6. Re:Could you get around this... by FhnuZoag · · Score: 4, Insightful

      No, you can't get around this, because if it's built into the keyboard, then it's a hardware thing, and any software based solution will be insufficient.

      But really, this whole issue is stupid. Built into the keyboard? WTF? If you allow a hostile agent to install hardware in your computer, then having a keylogger is the least of your worries. Where's the alarmist article about the possibility of keyboards with built in hand grenades?

      The system is also overcomplicated by far - for one, you are relying on people using telnet and remote desktop, which most home users do not. What advantages, if at all, does this tech hold over just modulating in delays with conventional traffic (e.g. HTTP requests)? Or other known systems of steganography? And don't forget that telnet is unencrypted in any case.

  2. Hmm... by bcat24 · · Score: 5, Funny
    This threat, however far-fetched, seems particularly relevant in light of the U.S. government's decision in May to use computers built by Lenovo only for processing unclassified data. The Chinese government owns 28% of Lenovo, information that has sparked fears of espionage. As it turns out, numerous keyboards are also manufactured in China.
    With Communist computer, keyboard spy on YOU!
  3. manufactured by Anonymous Coward · · Score: 5, Insightful

    Couldn't any kind of virus or malicious "software" be manufactured in to many different hardware. It's the trust and accountability we have in companies that keeps this from happening in general. It's kind of crazy we would have to worry about something like that...

    1. Re:manufactured by steve_l · · Score: 4, Informative

      yeah, laptops could implement this in the keyboard controller. Or even the USB hub could do it.

      you have to trust the pc vendors, as they have nothing to gain, and everything to lose, in lawsuits and lost sales. But what if their government comes along and says 'add this back door'. They'd comply.

      Case in point: Lotus notes put a back door in export versions of notes:
      http://catless.ncl.ac.uk/Risks/19.52.html#subj1

      they sent messages with 64 bit encryption (!), but 24 bits of the key was hidden in the message, where the NSA knew to look, or otherwise given to them. You only had 40 bit keys, which upset the swedish government.

      Moral: You cant trust closed source apps any more than closed source hardware.

  4. Manufactured into a keyboard by Anonymous Coward · · Score: 5, Funny

    The "Made in Nigeria" had me worried, but with a quality name like Sony on the keyboard, I decided not to worry.

  5. it's your own damn fault by circletimessquare · · Score: 4, Funny

    ...i .blame ....the ..user ....for ..not ....being ....more .......vigilant .if .....this ..ever .....happened ..to .....me (..and ..it .....wouldn't) ...i ..wouldn't .....be ..blaming ....some ."hacker" ....for ..my ....own ..lax .......security

    --
    intellectual property law is philosophically incoherent. it is your moral duty to ignore it or sabotage it
  6. Huh? by tgd · · Score: 4, Insightful

    Who uses telnet? And if they are, sniff the damn packets directly.

    And RDP is not a keystroke-per-packet, 100% of the time. Neither is SSH. Without that, you couldn't make any assumptions about the data you may have missed.

    Encryption latency, packet retransmissions upon collisions at routing equipement... there are 1000 reasons outside the lab this wouldn't be even remotely useful for tracking activity off the desktop, and there's way easier ways of doing it on the desktop.

  7. Very limited by stienman · · Score: 4, Insightful

    It would only work when the pressing of a single key causes the generation and transmission of a packet. Telnet is what they talk about, but most terminal programs would be vulnerable. Connecting to a mainframe is obvious, but you'd have the same problem with windows remote desktop, any remote client programs, etc. The SSL telnet program send passwords as a single packet, so that would prevent transmission of information during the password phase, but would not prevent it during interactive use.

    Normal websurfing, email, and desktop applications run on the computer itself (instead of remotely) would not pass any usable jitter information.

    Ajax web based applications could be vulnerable if they generate packets each time a key is pressed. Not many do this, but more will as time goes on.

    The key problems are:
    1) It can, at best, transmit 1 bit per keypress
    2) All of the intelligence would have to be in the keyboard for deciding *what* to send.

    Further, I haven't read the paper, but I don't see how this would work unless the user's typing patterns are very well known to the program, or the jitter introduced is significantly greater than 1/2 the average keypress to keypress time. This would be noticable to most people, though they would get used to it. This could be adaptive though, if you know that a particular keyboard is used by one user, and the keyboard spends a significant amount of its bandwidth on known patterns.

    Also, the keyboard cannot query the computer - the only information it could gain is what is typed in it. And since it could only get 1/7 of the possible information that's typed in (or perhaps 1/3 if good compression is used) then it wouldn't be able to get very much at all.

    All in all, it seems like a cool trick, but like tempest it requires some fairly specific conditions. For most things there are other ways that are likely easier, less detectable by the end user, and more informative than this one. But under appropiate conditions, it could be just the ticket.

    -Adam

  8. Trusted Input Device by NotQuiteReal · · Score: 4, Funny
    I don't trust anything that I didn't key into the front panel switches myself.

    This Trusted Input Device method, I call TID BITS, for short.

    --
    This issue is a bit more complicated than you think.
  9. Interesting theory, but how likely in practice by bhmit1 · · Score: 4, Insightful

    SSH already went through the debate of timing style attacks and came out fine: http://www.ssh.org/company/newsroom/article/204/. Additionally, web forms aren't transmitted until you hit submit. So you need some interractive session to monitor to detect something like this. The article mentions telnet, which, if you're going to sniff to detect packet timing, you might as well watch the packets themselves. When you get into something that is encrypted and interractive, wouldn't there be enough random jitter from the encrypting and other data, like mouse position updates when you have remote GUI's, to make this very difficult without creating so much jitter to be obvious to the user that the keyboard is screwed up?

    Implementation wise, the article lacked detail, so it's time to guess what's involved. You can't simply add a fixed number of ms to each key. What you need to do is have a timer that you are always offsetting from. Otherwise, the time that the user takes to type a key would be added on to the keystroke jitter, making it useless. Say you only watch 90 keys, giving you up to 90X, where X is some measurable time. The timer would also need to be 90X, meaning that you really have a maximum possible delay of 180X. With a CPU context switch (this is an interactive user), encryption processing, and physical network delays, I'm guessing that X would have to be several ms to be detectable. That would make the maximum time, even with only a 3ms X, over a half second in the worst case, which a user will certainly notice. Of course you can reduce the number of keys that you monitor, I picked 90 because it made the math easy and eliminated the F1-F12 keys. But anything over a couple 1/10s of a second will be noticable.

  10. password exposed via timing. by Kaenneth · · Score: 5, Interesting

    I recall a story of someone who determined a co-workers password by listening to the timing of her keypresses.

    "mickeymouse" m i c k e y mou s e

  11. Re:Look! Someone gave me a new keyboard! by inKubus · · Score: 4, Funny

    That's why I keep a liberal supply of dandruff and chicken grease on my keyboard at all times. Even if the boffins manage to make an identical keyboard (with the windows keys ripped out, no less), they could never recreate the back-alley ambiance.

    --
    Cool! Amazing Toys.
  12. Nagle's algorhitm by vadim_t · · Score: 5, Informative

    Just enable (as it's usually disabled for things like SSH) Nagle's algorhitm, and it should destroy most of the timing information.

    For those who don't know, it's a TCP optimization that buffers data until there's a packet worth of data, or an ACK is received for the last packet sent, so that writing 1 byte of data into a socket doesn't immediately result in sending a packet with 40 bytes of overhead, and 1 byte of data.

  13. bullshit detector says hardly needed by frovingslosh · · Score: 4, Insightful
    Sure, you could add your own jitter, but it's not really needed. My bullshit detector went off right as I hit the text reading "adding imperceptible delays to keypresses as people". Come on! People add their own imperceptable delays to keypresses, particularly when typing passwords. Other system and network activity adds timing discrepencies to packets that would mask this "jitter". And in most cases when a password is sent, it is sent in a packet, not as individual packets for each character, meaning that the keyboard can't really influence the between letter spacing at all. Plus the keyboard has no comprehension of what is going on upon the screen, it has no way to know if what is being typed is a password or not, so there is no way it can detect and specially encode passwords, it would have to somehow influence the system in a way that allowed it to encode every single keypress as this magic keypress jitter. Because of other packet "jitter" already affecting traffic, I don't believe it could even work if robots were doing all the typing, but certainly not for humanas.

    Sure, there is valid reason to be concerned about spying hardware and software being built into computers.But unfortunatey bullshit hype like this just clouds the issue, when it is finally discredited it will just make it that much harder for people who are warning of valid concerns.

    --
    I'm an American. I love this country and the freedoms that we used to have.
    1. Re:bullshit detector says hardly needed by frovingslosh · · Score: 4, Insightful

      That makes no sense at all. Remember, and this is something that you seem to be completely ignoring, This is a keyboard, it sends keystrokes to the motherboard, it does not send packets to the Internet! Packets would be sent by some software that was in the computer after the keystrokes are reeceived. SO, ok, lets pretend that the keyboard can indeed slightly delay packets and know how long ago in milliseconds it was since the last key press, even if it was several minutes. Then yes, the keyboard could convey one bit of data with each keypress. But it can only convey it as far as the local computer that is receiving keystrokes. If that computer is not in on the game and is not running special software to detect the delays, then this whole thing is meaningless! And if it is compromised, then there are far simpler ways to capture and send passwords than to have a hardware hack keyboard that uses this bogus "jitter" nonsense.

      --
      I'm an American. I love this country and the freedoms that we used to have.
  14. Yes, you can get around this by sacrilicious · · Score: 4, Informative
    No, you can't get around this, because if it's built into the keyboard, then it's a hardware thing, and any software based solution will be insufficient.

    Incorrect. It's true that there'd be no way to prevent the keyboard from collecting data, but one could certainly prevent the successful transmission of the collected data. The way the data would be encoded would be via the timing of the packets sent in response to keystrokes; that logic path most definitely involves software levels, specifically (in the example given of a remote terminal session) the choice of the software to send a packet once per keystroke. The proposed solution of introducing jitter to the packets is indeed a solution, and a simple straightforward one at that.

    --
    - First they ignore you, then they laugh at you, then ???, then profit.
  15. Finally... by chicago_scott · · Score: 4, Funny

    This sounds like a good way for citizens to track politicians' activity. As citizens we need better ways to serruptitiously monitor our public servants.

    Smaller cameras would be better too.

  16. Re:Scary! by Bombcar · · Score: 4, Funny

    So if you had 40 USB keyboards plugged into one machine, and used a different one to type each character of the password, you wouldn't have a problem, correct?

  17. It's 1AM, do you know where your keyboard is? by Kadin2048 · · Score: 5, Insightful

    Mod parent up. This was my immediate question as well, and I still haven't heard it answered.

    If you want to encode information into the delay between key-press packets, then you need to make the delay significantly longer (at least a few standard deviations) than the average difference between two keypress packets.

    People don't type at exactly the same rate, so if the delay in between keypresses varies (I'm making up numbers here) between 100 and 150 ms, then you need to make the introduced delay greater than 50ms.

    Alternately, you could buffer all of the incoming keystrokes in the computer, and send them out at a constant rate (say exactly 100ms apart); then you'd only have to add a small delay to them in order to encode information. But unless the packets are being buffered and sent out in such an orderly fashion by the host system already, it seems like this kind of behavior could be easily picked up on, because it would cause a delay of at least a few keystrokes in an interactive system (if there's one packet per keystroke and you're queueing and buffering a few packets at a time). I'm sure there's probably some nice mathematical formula for the amount of transit time you'd add (from the time the key goes down to the time it's received by the host system) as a result of buffering out all the variation in the timing between packets ... I just can't think of it right now.

    Ultimately though, I don't see any defense against an attack like this. If someone can compromise your hardware, particularly your input devices, you're quite screwed. I've always seen it as an extension of the 'local console root' rule: if someone can get to the CPU, then they have root. I guess we've got to extend this to keyboards, mice, and monitors as well: if you don't know where everything that you pass unencrypted information through was last night, maybe you shouldn't be using it.

    Messing with the delay is only one of many ways that someone could sneak information out of an area -- it's neat, technically, but there are a lot of low-tech ways that would work just as well (including the audio recorder trick from a while back, where you can determine a typed password by listening to a recording of the keypresses).

    If you only wanted a system that would work once, you could build a more powerful keystroke-recorder into a keyboard. Instead of having it mess with the delay, make it wake up the computer in the middle of the night (logging on -- it's not hard to grab your password on a Windows box, since it's nicely defined as the first thing you type after pressing Ctrl-Alt-Del and before return), and then executing a macro that emailed a recording of everything that had been typed recently to a dead-drop.

    --
    "Ladies and gentlemen, my killbot features Lotus Notes and a machine gun. It is the finest available."