You likely know by now that plugging a random USB into your PC is the digital equivalent of swallowing a pill handed to you by a stranger on the New York subway. But serial hacker Samy Kamkar‘s latest invention may attain you think of your computer’s USB ports themselves as unpatchable vulnerabilities–ones that open your network to any hacker who can get momentary access to them, even when your computer is locked.
Today Kamkar released the schematics and code for a proof-of-concept device he calls PoisonTap: a tiny USB dongle that, whether plugged into a locked or unlocked PC, installs a define of web-based backdoors that in many cases let an attacker to gain access to the victim’s online accounts, corporate intranet sites, or even their router. Instead of exploiting any glaring security flaw in a single piece of software, PoisonTap pulls off its assault through a series of more subtle design issues that are present in virtually every operating system and web browser, inducing the two attacks that much harder to protect against.
” In a lot of corporate offices, its pretty easy: You walk around, find a computer, plug in PoisonTap for a minute, and then unplug it ,” Kamkar says. The computer is a possibility locked, he tells, but PoisonTap” is still able to take over network traffic and plant the backdoor .”
Rather than installing malware, which can often be easily seen, PoisonTap makes its backdoor access by concealing malicious code in the victim’s browser cache.” This is going to be really hard to detect ,” says Jeremiah Grossman, a web security researcher and chief of security strategy at the firm SentinelOne.” provided you have physical access, I think its actually the most cleverly designed and effective backdoor tool that Ive considered .”
A Long Chain of Weak Links
Kamkar’s trick works by chaining together a long, complex series of apparently innocuous software security oversights that merely together add up to a full-blown menace. When PoisonTap–a tiny$ 5 Raspberry Pi microcomputer loaded with Kamkar’s code and attached to a USB adapter–is plugged into a computer’s USB drive, it starts impersonating a new ethernet connect. Even if the computer is already connected to Wifi, PoisonTap is programmed to tell the victim’s computer that any IP address accessed through that connection is actually on the computer’s local network rather than the internet, fooling the machine into prioritizing its network connection to PoisonTap over that of the Wifi network.
With that interception point established, the malicious USB device waits for any request from the user’s browser for new web content; if you leave your browser open when you walk away from your machine, opportunities are there’s at the least one tab in your browser that’s still sporadically loading new bits of HTTP data like ads or news updates. When PoisonTap sees that request, it spoofs a response and feeds your browser its own payload: a page that contains a collect of iframes–a technique for invisibly loading content from one website inside another–that consist of carefully crafted versions of virtually every popular website address on the internet.( Kamkar pulled his list from web-popularity ranking service Alexa‘s top one million sites .)
PoisonTap’s initial attack isn’t as serious as it may sound: It only works on sites that use HTTP rather than the far more secure HTTPS protocol, which signals to a browser to merely share cookie data with a verified site. But stealing cookies is simply the first in a series of techniques. As the little USB stick loads the collection of site address in the user’s browser, the committee is also tricks the browser into storing its own, carefully manipulated version of those sites in its cache–the feature of browsers that maintains pieces of websites on your computer rather than loading them from the web again and again. That’s called cache poisoning, and it means that even after PoisonTap is unplugged, the browser will still continue to loading the corrupted version of the sites it planted in the browser’s cache.
Each of the manipulated versions of the sites PoisonTap tucks into the browser’s cache includes a kind of persistent communications channel–what’s known as a websocket–that connects the site back to a server controlled by the hacker. Through hidden iframes, the hacker can attain HTTP petitions through the cached site backdoors and receive reactions, continuing to exploit the victim’s browser without detection long after the hacker has pulled out PoisonTap and walked away.” Their browser basically acts as a passageway into their local area network ,” Kamkar says.
PoisonTap’s cached browser backdoors can allow a hacker to pull off either of two attacks, Kamkar says: He or she can connect via the browser to the victim’s router, cycling through IP addresses to find the device, and then either break in with one of the common exploits affecting routers that are frequently unpatched and out-of-date, or try the default username and password that many still use. That can allow the hacker to eavesdrop on nearly all unencrypted traffic that passes over the victim’s network.
Or if the hacker knows the address of a company’s corporate intranet website–and the site doesn’t employ HTTPS, as is often the example for sites restricted to local access–PoisonTap can give the hacker an invisible foothold on the local network to connect to the intranet site and siphon data to a remote server.” If I tell the browser to look up some customer’s data, I can have it sent back to me ,” Kamkar tells.” That might not have been accessible remotely, but I have a local backdoor .”
No Clear Bug, No Clear Fix
Kamkar’s intention with PoisonTap isn’t to make it easier for stealthy invaders to install backdoors on corporate networks. Instead, he says, he wants to show that even locked computers are more vulnerable than security-conscious users might think.” Person feel secure leaving their laptops on their desk at lunch or when they leave the office with a password on the screensaver ,” Kamkar says.” Thats clearly not secure .”
One solution, Kamkar proposes, would be for operating systems to ask permission before they connect to a new network device like PoisonTap instead of silently switching over from trusted Wifi. Apple didn’t responded to a request for commentary. But a Microsoft spokesperson wrote to WIRED in an email that for PoisonTap to work,” physical access to a machine is necessitated. So, the best defense is to avoid leaving laptops and computers unattended and to keep your software up to date.
For the time being Kamkar says there’s no easy fix for users. To avoid an attack, he suggests someone would need to set their computer to hibernate rather than sleep, a setting that suspends all processes on the computer and causes it to wake up far more slowly. Or they can close their browser every time they step away from their computer, assiduously clear its cache, or even take the more drastic measure of filling their USB ports with glue.” I personally havent detected a good, convenient way to solve this on my own computer ,” Kamkar says.
The clearest and most troubling lesson, perhaps, is to beware who gets physical access to your PC. With a tool like PoisonTap in hand, a hacker walking unattended around your office may soon be moving freely around your corporate network, too.