iOS and Android juice jacking defenses have been trivial to bypass for years

You might have seen news about recent iOS and Android updates aimed at blocking USB-based attacks from forensics devices like Cellebrite. While it is a step forward, note that this isn’t the first time mobile operating systems have tried to address USB security risks.

Take “juice jacking,” an attack in which hackers could compromise your device through malicious public chargers. Although fixes were rolled out against it over 12 years ago, they have been shown to be easily bypassed.

About a decade ago, Apple and Google started updating iOS and Android, respectively, to make them less susceptible to “juice jacking,” a form of attack that could surreptitiously steal data or execute malicious code when users plug their phones into special-purpose charging hardware. Now, researchers are revealing that, for years, the mitigations have suffered from a fundamental defect that has made them trivial to bypass.

“Juice jacking” was coined in a 2011 article on KrebsOnSecurity detailing an attack demonstrated at a Defcon security conference at the time. Juice jacking works by equipping a charger with hidden hardware that can access files and other internal resources of phones, in much the same way that a computer can when a user connects it to the phone.

An attacker would then make the chargers available in airports, shopping malls, or other public venues for use by people looking to recharge depleted batteries. While the charger was ostensibly only providing electricity to the phone, it was also secretly downloading files or running malicious code on the device behind the scenes. Starting in 2012, both Apple and Google tried to mitigate the threat by requiring users to click a confirmation button on their phones before a computer—or a computer masquerading as a charger—could access files or execute code on the phone.

The logic behind the mitigation was rooted in a key portion of the USB protocol that, in the parlance of the specification, dictates that a USB port can facilitate a “host” device or a “peripheral” device at any given time, but not both. In the context of phones, this meant they could either:

  • Host the device on the other end of the USB cord—for instance, if a user connects a thumb drive or keyboard. In this scenario, the phone is the host that has access to the internals of the drive, keyboard or other peripheral device.
  • Act as a peripheral device that’s hosted by a computer or malicious charger, which under the USB paradigm is a host that has system access to the phone.

Researchers have discovered that such USB charging devices can simply approve the connection request prompt, completely bypassing user input at all. This means that you could be fooled into thinking a “juiced jacked” charger is a real charger. Thankfully, juice jacking attacks are mostly theoretical and haven’t been observed in public yet.

Researchers at the Graz University of Technology in Austria recently made a discovery that completely undermines the premise behind the countermeasure: They’re rooted under the assumption that USB hosts can’t inject input that autonomously approves the confirmation prompt. Given the restriction against a USB device simultaneously acting as a host and peripheral, the premise seemed sound. The trust models built into both iOS and Android, however, present loopholes that can be exploited to defeat the protections. The researchers went on to devise ChoiceJacking, the first known attack to defeat juice-jacking mitigations.

3 Likes

If you plan on using public chargers a lot, it might be worth it to buy a data blocker.

Read the article and I was quite surprised by the methods, being very simple.
Tested and graphene os ls partially affected.

  • it ask for pin or fingerprint to enable file access
  • it allow keyboard and mouse when connected and screen is unlocked.
    I know I can increase usb security settings, but its not always worth it.
2 Likes

Or just use GrapheneOS.

1 Like