Apple Keyboards Vulnerable to Firmware Hack

Almost everything has a processor and/or memory chips these days, including keyboards. Apple’s keyboards are no exception; they have 8Kb of flash memory, and 256 bytes of RAM. K. Chen has found a way to very easily install keyloggers and other possibly malicious code right inside these Apple keyboards (more here). Proof of concept code is here as well.

While 8Kb of flash memory and 256 bytes of RAM might not sound like a whole lot of space, it’s enough for an intelligent coder to make use of, and for someone with malicious intent to abuse. K. Chen presented his findings at this year’s Black Hat conference.

It’s actually quite easy to abuse the memory and RAM in Apple keyboards, thanks to Apple’s HIDFirmwareUpdaterTool, which is used to update the firmware in HID devices, among which is the Apple keyboard. “The tool is run, a breakpoint set, and then you simply cut and paste the new code into the firmware image in memory. That’s it,” SemiAccurate explains. Nothing is encrypted, decrypted, and it’s all very simple to do. Resume the HIDFirmwareUpdaterTool, and a few seconds later, your keyboard is compromised. Rebooting won’t help, you can’t pull any batteries, and it’s impossible to detect.

K. Chen demonstrated a rudimentary keylogger which would print the last five typed characters. There was 1Kb of free space left inside the keyboard, so you can store quite a few keystrokes. It wouldn’t take much to do this remotely, using a compromised website, for instance.

“Apple needs to patch this problem ASAP. It is completely remotely exploitable, and almost impossible to remove, especially if you don’t know it is there,” SemiAccurate writes, “This huge hole that Apple has in it’s hardware turns any remote exploit, Apple is full of them, into a huge security problem.”

They would’ve told Apple about this, but the last few times when they called Apple in similar cases, the company didn’t even return their calls. “Don’t believe them when they try to spin this as minor, owning a keyboard gives you ownership of a system.”

Chen can write a tool to lock down the firmware, he says, but he’s waiting for a possible official solution from Apple before he attempts to do so. However, he is afraid that Apple will fix this in current and future versions of Mac OS X only, leaving the keyboards open to be attacked from other sources. The fix needs to be implemented at the hardware/firmware level, he says.

44 Comments

  1. 2009-08-01 6:39 pm
    • 2009-08-01 7:45 pm
      • 2009-08-01 7:57 pm
      • 2009-08-02 2:52 am
  2. 2009-08-01 6:41 pm
    • 2009-08-01 7:38 pm
      • 2009-08-01 7:44 pm
        • 2009-08-01 7:48 pm
          • 2009-08-01 8:04 pm
          • 2009-08-01 8:23 pm
          • 2009-08-01 8:44 pm
          • 2009-08-01 8:24 pm
  3. 2009-08-01 7:03 pm
  4. 2009-08-01 7:47 pm
    • 2009-08-01 8:32 pm
      • 2009-08-01 8:59 pm
        • 2009-08-01 9:09 pm
      • 2009-08-01 11:13 pm
      • 2009-08-02 7:56 am
  5. 2009-08-01 8:37 pm
    • 2009-08-01 11:19 pm
  6. 2009-08-01 9:16 pm
    • 2009-08-01 9:56 pm
    • 2009-08-01 11:10 pm
      • 2009-08-02 12:18 am
        • 2009-08-02 12:41 am
        • 2009-08-02 1:49 pm
  7. 2009-08-02 12:54 am
    • 2009-08-02 1:00 am
      • 2009-08-02 1:39 am
        • 2009-08-02 5:03 am
          • 2009-08-02 5:11 am
          • 2009-08-02 12:39 pm
          • 2009-08-02 1:51 pm
          • 2009-08-03 6:47 pm
          • 2009-08-03 11:55 am
    • 2009-08-02 8:34 am
  8. 2009-08-02 5:50 am
  9. 2009-08-02 4:07 pm
  10. 2009-08-02 11:42 pm
  11. 2009-08-03 12:02 am
    • 2009-08-03 8:26 am
      • 2009-08-03 11:03 pm