10:36 AM
John H. Sawyer
John H. Sawyer

Taking USB Attacks To The Next Level

USB devices have many benign, legitimate uses. But put a USB-based device in the hands of a savvy hardware hacker, and that USB device can go from good to evil in no time.

USB devices have many benign, legitimate uses. But put a USB-based device in the hands of a savvy hardware hacker, and that USB device can go from good to evil in no time.Fellow Dark Reading blogger Gadi Evron's recent blog about USB-based attacks with keyboards gave an interesting attack scenario of using a hacked keyboard, Notepad, and custom shellcode to exploit a system. But who needs shellcode when you have a keyboard device?

I mentioned a couple of very interesting hardware hacking presentations given this summer that took USB attacks to the next level. One focused on hacking wireless presentation devices that are no more than USB Human Interface Devices (HID) to the underlying system. When you click on the next button on the remote, it sends a "page down" command via the USB HID keyboard interface.

By reversing the wireless protocol used by the wireless presentation devices, an attacker could inject keystrokes into the system, which could open Notepad, type in a script, save it, then choose Run from the Start Menu and execute the script. Ingenious!

Of course, to be successful you could attack someone only during a presentation. Or you could plant one of these devices on a target machine and communicate with it remotely from outside the office to run your code after hours.

Imagine, instead, that you have a small Arduino-based device that works with the Social Engineering Toolkit to deliver payloads via WSCRIPT and PowerShell. The device emulates a USB HID keyboard and can inject keystrokes into the target system like the attack above. Powerful, right?

The bundling of the Teensy Arduino device with the Social Engineering Toolkit (SET) is an awesome attack vector. It's small and easily planted into a USB port when no one is looking. With SET, an attacker (we'll assume a legit penetration tester) can generate a Metasploit payload and the attack code that gets written to the Teensy device. When the device is plugged into the target, it creates a WSCRIPT file that downloads the Metasploit payload and executes it, as seen in this example.

The other example of using the Teensy HID attack was embedding it into a keyboard since many have built-in USB hubs. If you knew which keyboards were in use in a target's environment, then you could walk in pretending to be the computer repair tech, replace the keyboard, and walk out while your attack happens.

The possibilities are endless when you consider what can be done from just a keyboard alone. And, since USB HIDs are cross-platform, so are the attacks that can be performed.

Check out Dave Kennedy's blog (author of SET) to learn more about it and the Teensy attacks. There are some videos and new documentation available that show examples of what has been included in the latest release.

John H. Sawyer is a senior security engineer on the IT Security Team at the University of Florida. The views and opinions expressed in this blog are his own and do not represent the views and opinions of the UF IT Security Team or the University of Florida. When John's not fighting flaming, malware-infested machines or performing autopsies on blitzed boxes, he can usually be found hanging with his family, bouncing a baby on one knee and balancing a laptop on the other. Special to Dark Reading.

Comment  | 
Print  | 
More Insights
Register for Dark Reading Newsletters
White Papers
Current Issue
Flash Poll
Title Partner’s Role in Perimeter Security
Title Partner’s Role in Perimeter Security
Considering how prevalent third-party attacks are, we need to ask hard questions about how partners and suppliers are safeguarding systems and data.
Twitter Feed
Dark Reading - Bug Report
Bug Report
Enterprise Vulnerabilities
From DHS/US-CERT's National Vulnerability Database
Published: 2015-05-27
The Btrfs implementation in the Linux kernel before 3.19 does not ensure that the visible xattr state is consistent with a requested replacement, which allows local users to bypass intended ACL settings and gain privileges via standard filesystem operations (1) during an xattr-replacement time windo...

Published: 2015-05-27
include/net/netfilter/nf_conntrack_extend.h in the netfilter subsystem in the Linux kernel before 3.14.5 uses an insufficiently large data type for certain extension data, which allows local users to cause a denial of service (NULL pointer dereference and OOPS) via outbound network traffic that trig...

Published: 2015-05-27
Stack-based buffer overflow in the get_matching_model_microcode function in arch/x86/kernel/cpu/microcode/intel_early.c in the Linux kernel before 4.0 allows context-dependent attackers to gain privileges by constructing a crafted microcode header and leveraging root privileges for write access to t...

Published: 2015-05-27
arch/x86/kernel/entry_64.S in the Linux kernel before 3.19.2 does not prevent the TS_COMPAT flag from reaching a user-mode task, which might allow local users to bypass the seccomp or audit protection mechanism via a crafted application that uses the (1) fork or (2) close system call, as demonstrate...

Published: 2015-05-27
The ndisc_router_discovery function in net/ipv6/ndisc.c in the Neighbor Discovery (ND) protocol implementation in the IPv6 stack in the Linux kernel before 3.19.6 allows remote attackers to reconfigure a hop-limit setting via a small hop_limit value in a Router Advertisement (RA) message.

Dark Reading Radio
Archived Dark Reading Radio
Join security and risk expert John Pironti and Dark Reading Editor-in-Chief Tim Wilson for a live online discussion of the sea-changing shift in security strategy and the many ways it is affecting IT and business.