USB Charging Actually Poses Security Risks – Hacking a Laptop via a USB-C Adapter

Smartphones have been charged over USB for many years, but with the advance of USB type-C now even laptops may be charged over USB, instead of the typical DC power barrel jack.

Why am I writing about that? That’s because charging over a DC jack is normally safe, but after reading an article on BBC website, I’ve just realized when you charge over USB you also give access to the data connection, and security researcher (MG) has found a way to hack the USB-C charger of an Apple laptop and show a login prompt to steal credentials (username / password).

Hacked USB type-C Charger
Hacked USB Charger

The full details of the hack are no public, but it does require altering the hardware of the charger. So as long as you use the charger sold with your laptop, you should be safe. However, there’s always a risk if you charge from public places, or buy  a charger from a third party. It’s a limited risk, but still worth keeping in mind. You can see the hack in action below.

As mentioned in the video and tweet, it works not only with Apple hardware but any laptop charging over USB-C. This type of hack is not really new, as “Juice-Jacking” – hacking phones over the USB connection at public charging sport – has been possible for several years, but in my case at least, data stored on my computer(s) is much valuable than the data stored on my phone.  One obvious counter action is to not use your device while charging it in a public place or with a third party charger, but in case the hack can be made to work without user action, a trick is to power off your phone / laptop before charging it, then the data is not exposed on certain devices, i.e. not all. So it’s a good idea to be aware that public USB charging may not be fully secure, and whenever possible, use your own cable and charger.

Thanks to Theguyuk for the tip.

Share this:

Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress

ROCK 5 ITX RK3588 mini-ITX motherboard
Subscribe
Notify of
guest
The comment form collects your name, email and content to allow us keep track of the comments placed on the website. Please read and accept our website Terms and Privacy Policy to post a comment.
14 Comments
oldest
newest
Jim st
Jim st
6 years ago

I’ve not seen Apple use any USB c. Not common, is it?

I’ve not seen any laptop scale device pulled up by USB, either.

Steve
Steve
6 years ago

All new models of Apple laptops use USB Type-C / Thunderbolt 3 ports for charging/power. The MacBook has had a USB Type-C since it was introduced, as have both the 13″ and 15″ MacBook Pro Retinas with Touch bar. These devices only come with USB Type-C (usually TB3 too) and 3.5mm jack interfaces – nothing else. (My MBP 15″ with Touch bar has 4 Thunderbolt 3 ports (over USB Type-C) and a 3.5mm headphone/mic connector. Nothing else. The older MacBook Air and 13″ MacBook Pro Retina without Touch Bar designs still use Magsafe I think – but they are legacy… Read more »

Cyk
Cyk
6 years ago

It seems that mankind is doomed to repeat the same dumb mistakes over and over again.
Most phone manufacturers learned the lesson, and deactivate data transfer over USB by default, but it seems that notebook manufacturers didn’t get the memo.

pm7
pm7
6 years ago

In case of computers it is a matter of operating system, ie. Windows/Linux/Mac OS.

Raffaele
6 years ago

I wouldn’t use any low quality/non-original Type C charger with my Dell XPS anyway for the fear of damaging it, as those chargers need somewhat complex and high quality circuits. However it’s interesting to see how having an unique port for charging, video, networking etc. can turn into a threat if it’s trusted by default. The fact that, for example, the base Macbook model has only one Type C port and needs a hub to be charged while anything else is connected makes it tricky, for example, to forbid anything that’s charging the device from acting as a USB device.… Read more »

willy
willy
6 years ago

I wondered how long it would take, apparently not that much 🙂 With plug-and-play OSes it’s really funny, you can present a USB-to-ethernet adapter into a USB connector, and sometimes the OS will even make a DHCP request there and present an IP address. You can sometimes expose a graphics interface, which, depending on how the machine was recently configured, may expose a copy of the current display. You can present a serial port that some OSes will detect and present you a login prompt. You can also present a second keyboard and mouse to inject keystrokes. It can also… Read more »

Rogan Dawes
Rogan Dawes
6 years ago

Yeah, I was very interested in the idea of a USB-Video interface (digging produced this: https://github.com/kopasiak/f_dl_ffs), and HID combination for hacking connected devices. One problem with adding a video interface is that you don’t necessarily get to choose how that interface is used by the host OS. It might be mirrored by default, or you may end up with a second desktop. In the latter case, the windows that were on the original desktop may get moved to the new display, or they may not. A couple of other possibilities for attack via USB devices: Some OS’s drivers create the… Read more »

Ade
Ade
6 years ago

I still didn’t fully understand what is the benefit of USB charging for laptops and I mostly see downsides : not only regarding security, but it adds cost since it requires a complex circuitry for handling various voltages, and even cables now have to be authenticated, and this usb-c connector is far less robust ans future-proof than legacy round DC connectors or magsafe… (Or maybe that’s the purpose : having a weak connector that forces you to dispose and buy a new laptop every ~2 years ?)

willy
willy
6 years ago

They could have used a two-part connector. Like micro-USB3 which has the USB2 and the USB3-specific parts apart. Or like SATA which splits power and data. Then it would have been possible to connect power exclusively and have the ability to visually verify that the data lines are not used. At home you’d have your full-length connector for your dock. BTW, I wouldn’t be surprised if in a few months we start to see some USB-C to USB-C adapters which simply short or cut the data lines to protect your laptop against rogue PSUs 🙂

CampGareth
CampGareth
6 years ago

As I posted down below, as far as I know you can run USB-PD with just 3 pins, ground, vbus and cc for the actual communication. I’d love to see someone try this with a breadboard and a couple of breakout USB-C connectors. Heck maybe I’ll do it, it wouldn’t be hard.

CampGareth
CampGareth
6 years ago

Unification is a good reason to charge over USB. Remember how awful it was when every phone came with its own specific charging plug that in some cases was unique to the model let alone the brand? I got a high end PDA that included adapters for nokia barrel jacks (but only those of a specific voltage) which is ridiculous. When we standardised on micro-usb life was good. Laptops are in much the same state, everybody has their own barrel jack that isn’t compatible with anything else. they’re mostly on 19 or 20V but even that isn’t guaranteed. Some check… Read more »

Kleer Kut
Kleer Kut
6 years ago

Isn’t there a way for USB-PD to be set up so it can communicate with other devices for negotiating charging purposes without enabling data lines? Much line a dumb charger you plug in a wall that gives you a USB port for charging, they could do something similar with a small ‘brain box’ to handle charging. Using a separate connection to the battery so the device can monitor the battery and give status updates to the OS would give some separation between the port and data storage. I had read recently about the possibility of hacking data from machines by… Read more »

CampGareth
CampGareth
6 years ago

As far as I know, yes you can disconnect the data pins and still have negotiation happen. Negotiation happens on the CC pin while data is transmitted on UTP_Dp and UTP_Dn, at least on USB 2.0 cable with only 6 pins connected. As for the dell situation, maybe it’s model specific? My Dell XPS 9350 when hooked up to an old universal power brick thing I had kept warning me that it wasn’t an official charger and that it wouldn’t charge the battery off that device. It powered itself though, the battery level didn’t drop, it just didn’t rise either.… Read more »

Boardcon Rockchip and Allwinner SoM and SBC products