A researcher has created a hacking device that allows attackers to easily gain access to a password-protected computer, hijack all its Internet traffic, and install backdoors.
The device, dubbed PoisonTap, is Samy Kamkar’s latest creation. The security expert has developed dozens of tools over the past years, including ones that could be used to hack phones, computers, payment card readers, garage doors, locks, drones, doorbells and cars.
PoisonTap is a $5 Raspberry Pi Zero device running some Node.js code that has been made publicly available by the researcher. Once it’s connected to a Windows or Mac computer via USB, the device starts loading the exploits needed to compromise the machine. The attack works even if the targeted computer is locked.
After it boots up, the hacking tool emulates an Ethernet device over USB. When the operating system recognizes this Ethernet device, it loads it as a low-priority network device and sends it a DHCP request. The response sent to this request tells the system that the entire IPv4 address space is part of PoisonTap’s local network.
By claiming the entire IPv4 space, traffic going to any IP passes through PoisonTap before reaching the legitimate gateway to the Internet. Once it hijacks all Internet traffic, the hacking tool can steal HTTP cookies and sessions for the Alexa top 1 million websites from the victim’s browser.
The expert pointed out that cookie siphoning is possible even if the web browser is not actively used. As long as the application is running in the background, it’s likely that at least one of the open webpages is making HTTP requests.
An attacker can also use the device to install persistent web-based backdoors for hundreds of thousands of domains, and open a remote access channel to the victim’s router.
Since PoisonTap steals cookies and not credentials, the attacker can hijack the victim’s online accounts even if they have two-factor authentication (2FA) enabled. Furthermore, HTTPS protection is bypassed if the “secure” cookie flag and HSTS are not enabled. Kamkar says PoisonTap can also bypass several other security mechanisms, including same-origin policy (SOP), HttpOnly cookies, X-Frame-Options HTTP response headers, DNS pinning and cross-origin resource sharing (CORS).
Even after the hacking tool is unplugged from the targeted device, the backdoors remain and the attacker will be able to remotely gain access at a later time.
There are several measures that can be taken both on the server side and the client side to prevent such attacks. Web server operators can protect their users by properly implementing HTTPS and using HSTS to prevent downgrade attacks.
The list of security measures for users includes closing the web browser when the computer is not supervised, disabling USB ports, and using full-disk encryption applications (e.g. FileVault 2) in combination with “deep sleep” mode.