How To 'PoisonTap' A Locked Computer Using A $5 Raspberry Pi

White hat hacker Samy Kamkar has come up with a way of to hijack Internet traffics from a password-protected computer.

3 Min Read

Serial white hat hacker Samy Kamkar has developed a new exploit for breaking into a locked computer and installing a persistent web-based backdoor on it for accessing the victim’s online accounts.

The exploit involves PoisonTap, a $5 Raspberry Pi Zero device, that can be plugged into the USB port of a locked or unlocked computer and used to hijack all Internet traffic from the machine.

An attacker with even momentary physical access to a computer can attach PoisonTap to it, siphon out HTTP sessions and cookies and expose the internal router so it can be controlled remotely.

Rather than a single vulnerability, PoisonTap takes advantage of the inherent trust that exists in various network and machine mechanisms, like DHCP, DNS, USB and HTTP. It produces what Kamkar described this week as a “snowball effect of information exfiltration, network access and installation of semi-permanent backdoors.”

When PoisonTap is inserted into a USB port it emulates an Ethernet device. By default, Windows and OS X automatically load it, typically as a low-priority device, and perform a DHCP request across the device regardless of whether the victim machine is locked or not.

PoisonTap takes advantage of this process to trick the victim machine into giving it higher priority than the WiFi or other gateway actually connecting the computer to the Internet.

“Normally it would be irrelevant if a secondary network device connects to a machine as it will be given lower priority than the existing (trusted) network device,” Kamkar said.

But by getting PoisonTap to tell the victim machine that the entire IPv4 space is part of its local network, the device supersedes the legitimate Internet gateway to which the computer is connected. As a result, all network traffic that normally would have passed from the machine through the legitimate gateway, ends up hitting PoisonTap instead, Kamkar said.

PoisonTap then waits for any open browser pages on the computer to make an HTTP request - for example, to load a new ad or to send data to a tracking application. PoisonTap intercepts that HTTP request and spoofs a response that causes the HTTP request to hit its own web server.

The PoisonTap webserver responds to the HTTP request with a list of iframes for the top one million websites on Alexa, which it caches on the victim’s browser while simultaneously stealing all cookies being sent to any websites on that list.

“The iFrames are not just blank pages at all but rather HTML+Javascript backdoors that are cached indefinitely,” on the victim’s browser, Kamkar noted.

“Because PoisonTap force-caches these backdoors on each domain, the backdoor is tied to that domain,” he said. As a result the attacker can use the domain’s cookies for malicious access even if the user is not logged into the domain, he said.

Clever as the exploit is, securing against PoisonTap is simple, according to Kamkar.

It doesn't work on HTTPS content, for instance. So using HTTPS exclusively is one way to neutralize the threat from exploits like PoisonTap he said.

Ensuring that Secure flag is enabled on cookies is another effective measure because it prevents HTTPS cookies from leaking over to HTTP, said Kamkar whose previous exploits have included a drone hijack proof-of-concept, and an exploit involving remotely starting any General Motors car featuring OnStar RemoteLink.

Craig Smith, research director of transportation security at Rapid7, described PoisonTap as brilliant for its simplicity.

Unlike similar exploits in the past, one key difference with PoisonTap is that it attacks all outbound traffic from a victim system by emulating a network device, he said in a statement.  “This attack works on both Windows and Mac operating systems and can hijack a large number of connections, even if the machine is locked,” he noted.

“On a $5 Raspberry Pi, Samy pulled together several clever attacks that add up to something really masterful.”

Related stories:

 

About the Author(s)

Jai Vijayan, Contributing Writer

Jai Vijayan is a seasoned technology reporter with over 20 years of experience in IT trade journalism. He was most recently a Senior Editor at Computerworld, where he covered information security and data privacy issues for the publication. Over the course of his 20-year career at Computerworld, Jai also covered a variety of other technology topics, including big data, Hadoop, Internet of Things, e-voting, and data analytics. Prior to Computerworld, Jai covered technology issues for The Economic Times in Bangalore, India. Jai has a Master's degree in Statistics and lives in Naperville, Ill.

Keep up with the latest cybersecurity threats, newly discovered vulnerabilities, data breach information, and emerging trends. Delivered daily or weekly right to your email inbox.

You May Also Like


More Insights