Several security experts have built a malicious version of a USB charging cable, one that can compromise a computer in just a few seconds. Once plugged in, it turns into a peripheral device capable of typing and launching commands.

USBHarpoon, as its makers call it, relies on the BadUSB research from Karsten Nohl and his team at Security Research Labs. Their work showed that an attacker can reprogram the controller chip of a USB drive and make it appear to the computer as a human interface device (HID).

The type of HID can be anything from an input device like a keyboard that issues a rapid succession of commands, to a network card that modifies the system’s DNS settings to redirect traffic.

With USBHarpoon, security experts replaced the USB drive with a charging cable, something that is as ubiquitous, but less likely for users to be cautious of.

The cable comes with modified connectors that allow both data and power to pass through so it will fulfill the expected function. This feature enables it to be accompanied by any type of device that powers through USB (fans, dongles distributed at conferences), without raising suspicions about plugging the cable.

Idea has been implemented before

Behind the USBHarpoon project are Olaf Tan and Dennis Goh of RFID Research Group, Vincent Yiu of SYON Security, and Kevin Mitnick, who catalyzed the entire collaboration.

Yiu, who works on the design and weaponization of the cable, says that he talked to multiple fellow researchers from different labs who tried to build a project like USBHarpoon, but they “were not able to make the cable charge for whatever reason.”“My team of friends has managed to weaponize this capability to make a fully working USB cable also a compatible HID device,” he added in a blog post.

It turns out that a weaponized charging USB cable already existed and was developed by a security researcher using the Twitter handle MG. As shown in the two videos below from January 2018, MG was able to create USB cables that could perform HID attacks when plugged into a computer's USB port.

MG also showed that the attack, which he calls BadUSB cable, would work with a USB-C connector, used in MacBook chargers, informing that it “work on just about any device with a USB port,” including phones.

Mitnick told Bleeping Computer that he asked MG to build a cable for him to use in a keynote speech to demonstrate new attack methods, but he did not receive it in time for the presentation. For the cable to function as intended, it needed a payload, which MG told BleepingComputer that he did not get from Mitnick soon enough to complete the project. In a Twitter thread on the matter, Mitnick said that the reason for not providing the code was his busy schedule.

After not receiving the cable, Mitnick says that he did not give up on the idea of having a malicious USB cable and contacted Dennis Goh with the proposition to build one. Goh accepted the challenge and together with Olaf Tan finished the job in a few days as a favor for Mitnick, but the value for the security sector, especially in penetration testing, is huge.

After seeing USBHarpoon, MG commented that the cable looked very similar, if not the same, as the one he created for his videos and shared internal images of with Mitnick.

Yiu said he had never heard of MG's research when working on USBHarpoon, but credited the original work from MG once he learned about it.

Hiding the attack, defending against it

The USBHarpoon / BadUSB cable attack is successful on unlocked machines, where it can launch commands that download and execute a payload. On Windows, the commands can run directly from the Run prompt; on Mac and Linux it could launch a terminal and work from there.

This activity is visible on the screen, so the attacker has to come up with a method to hide it. Yiu says the team is currently exploring methods to trigger the attack when the victim is not around.

Delaying the action is one avenue they study, but there are other channels they consider for getting the desired response. Bluetooth and radio signals could be part of the solution.

Protecting against attacks that rely on a USB connection is not easy. A potential answer is to use a data-blocking device, also known as USB condom. An electronic accessory like this blocks the data pins on a USB cable and allows only power to go through.

But MG proves a valid point in a video where he shows that USB condoms can be infected just as well, and you cannot trust them unless you have a way to audit them before use.

“The problems behind BadUSB were never addressed. This research is a timely reminder that anything USB can be turned malicious, even a simple charging cable,” Karsten Nohl, the original BadUSB researcher told Bleeping Computer.

Although the idea behind USBHarpoon is not new, it may have the advantage of having been refined by several security experts. Mitnick said that the cable his team built was indistinguishable from what you see on the shelf. Even if there are differences, it is very likely that the victim does not notice them.

To demonstrate the functionality of USBHarpoon, Yiu published a short video where a drone connects to a Windows PC and sends it commands to list content in a folder on the system drive.


Updated 8/21/18: 3:50 PM EST: Added new information from MG to reflect the reason Kevin Mitnick did not receive the cable in time for presentation. MG's original BadUSB cable from January 2018 could already trigger a payload while charging.

Related Articles:

Researchers sinkhole PlugX malware server with 2.5 million unique IPs

New ‘Loop DoS’ attack may impact up to 300,000 online systems

New acoustic attack determines keystrokes from typing patterns

New acoustic attack steals data from keystrokes with 95% accuracy