logoalt Hacker News

Usb2shell: Root on Linux from a USB Plug-In

138 points • by matanyall • yesterday at 9:26 PM • 52 comments • view on HN

Comments

jcul • yesterday at 11:22 PM

Hmm... people seem to be dismissing this in the comments.

It's more than a normal rubber duck attack, like pretending to be a mouse and keyboard, it is a proper exploit of the SCSI driver IIUC.

Someone with access to a physical device for one or two minutes can get root pretty much undetected.

It works even if locked or if the device is booted with no one logged in. That's pretty cool IMO.

Not as worrying as a remote exploit of course.

➕ show 1 reply
rpdillon • yesterday at 10:58 PM

Was fixed in 7.2.8, my machines are updated on occasion by me, and are running 7.2.15, which came out on 01 Nov.

Looks like 7.2.8 was cut on 25 Sep: https://lwn.net/Articles/1096820/

So if you're on a maintained distro and update more often than every couple of months, you probably already have the fix for this.

koolba • today at 2:14 AM

> usb2shell is the physical version: instead of a crafted request, the attacker plugs in a crafted USB device.

This is the kind of bug from movies I’ve always wanted to see in real life. The kind that lets James Bond plug something into a computer for 2 second and hack the entire system.

hxorr • today at 12:25 AM

From what I understand, linux filesystems aren't hardened against malicious malformed filesystems on disk. The assumption is that the disk (at least the filesystem structure) is trusted. This is usually fine, but there would be a large class of exploits waiting to happen if say a USB drive found on the pavement is plugged in and automounted.

Please correct me if I'm wrong

➕ show 2 replies
gadtfly • yesterday at 10:48 PM

I just always assumed this was the case

➕ show 2 replies
negura • today at 12:08 AM

An excellent endorsement for the QubesOS security model. USB devices are attached to a disposable, unprivilleged VM and only the data to/from the device is passed through to other VMs. So the scope of an exploit in how the kernel handles the USB device is limited to a VM that is insulated from the rest of the system.

➕ show 2 replies
imoverclocked • today at 2:09 AM

So, a lot of people are assuming that this only works in-person ... however, with devices like a GL.iNet Comet Remote KVM which emulates a USB device, nothing stops someone from doing a remote exploit of a kvm node (likely running a 4.19.x or 6.1.x. linux kernel) which then allows an exploit of the node it is plugged into. This is just another tool in the sandbox of someone who already has a lot of remote exploit tools.

ie: Just because it required physical USB access doesn't mean it's not remote-exploitable in some/many cases.

mort96 • yesterday at 10:47 PM

AFAIU, Linux considers physically connected devices to be "trusted", and doesn't place a ton of importance on securing drivers against hardware acting maliciously. I myself think that this policy is pretty bad, but I see how it could be the only reasonable policy for a monolithic kernel written in C where all drivers run in ring 0..

..I'm surprised though that there's an ACE which can be triggered from the generic USB Mass Storage Device driver without even mounting the filesystem I guess. This is gonna affect even many systems which disable all USB drivers they don't need for security reasons. I expected it to be from a driver for some ancient piece of hardware nobody has maintained for 15 years.

➕ show 2 replies
Naru41 • today at 1:29 AM

However, the redundant 3 times `if` statements in this patch can clearly be reduced to one.

kortzeus • yesterday at 10:32 PM

Finally something my server can't be reached by!

dvh • yesterday at 10:12 PM

>curl -fsSLO https://usb2shell.com/tools/usb2shell-check.sh

>less usb2shell-check.sh

>sh usb2shell-check.sh

I LOLed. Use "less -nU" to prevent black text on black background attack vector. Maybe.

kamk3 • yesterday at 10:49 PM

Clickbait2shell, a new exploit where you blindly add "2shell" at the end of a random word. Sequel to Clickbleed.

➕ show 2 replies
pizzafeelsright • today at 1:43 AM

I patch with superglue.

➕ show 1 reply
cyberax • yesterday at 11:07 PM

Hm, it looks like it can be used to jailbreak the Tesla Model 3. I wonder if I can use it to add AndroidAuto.

_blk • today at 12:11 AM

Is Android vulnerable to it?

➕ show 1 reply
orinvalevpk • today at 1:48 AM

[dead]

ALSOPSS • yesterday at 11:09 PM

[dead]