Live data from Hacker News

Blocking Untrusted USB Devices

roussos.cc

21–30 of 31 posts

Re: Blocking Untrusted USB Devices

#21
post #18
post #2

How immune is this solution to VID / PID spoofing? I've thought about this topic before and arrived at the idea that USB devices ought to be treated kind of like user accounts, where I can control what drivers / data / devices they have access to.

Would it also not be possible to measure power draw upon the device and with that, add another metric to device profiling. So if you have say a keyboard that uses 200ma power and then suddenly a device that has the same ID's is plugged in and uses 500ma of power, that would trigger a flag.

Good idea. Though that can also be bypassed rather easily by including a small battery in the malicious device and only drawing the expected amount of power from the USB connection itself.

The real solution needs to be some sort of standardized auth system, where devices are identified by a public key rather than a static serial number. In the absence of that though, I think whitelisting serial numbers is the next best thing. It'll slow down attacks at least, and open the door for future improvements to the system.

Re: Blocking Untrusted USB Devices

#22
post #16

What a nice security improvement, many thanks for developing this! It should be default in all operating systems to only accept known USB devices and in the case of new USB devices prompt the user with a clear warning message.

It is a tricky area to add layers of security to. In theory, you would want a device to refuse any connections unless it is explicitly agreed upon. At the same time, you average user will start calling Tech support everytime they hit the road block of "not being able to use the USB". In orgs with sensitive info, it should be mandatory, but others may be better off without it.

Re: Blocking Untrusted USB Devices

#23
post #16

What a nice security improvement, many thanks for developing this! It should be default in all operating systems to only accept known USB devices and in the case of new USB devices prompt the user with a clear warning message.

It is a tricky area to add layers of security to. In theory, you would want a device to refuse any connections unless it is explicitly agreed upon. At the same time, you average user will start calling Tech support everytime they hit the road block of "not being able to use the USB". In orgs with sensitive info, it should be mandatory, but others may be better off without it.

This is exactly why businesses make software that ends up sucking.

Re: Blocking Untrusted USB Devices

#26
post #18
post #2

How immune is this solution to VID / PID spoofing? I've thought about this topic before and arrived at the idea that USB devices ought to be treated kind of like user accounts, where I can control what drivers / data / devices they have access to.

Would it also not be possible to measure power draw upon the device and with that, add another metric to device profiling. So if you have say a keyboard that uses 200ma power and then suddenly a device that has the same ID's is plugged in and uses 500ma of power, that would trigger a flag.

Currently deployed hardware has no ability to measure that.

Re: Blocking Untrusted USB Devices

#27
post #2

How immune is this solution to VID / PID spoofing? I've thought about this topic before and arrived at the idea that USB devices ought to be treated kind of like user accounts, where I can control what drivers / data / devices they have access to.

Its not. Whats more attackers USB device is able to obtain quite a lot of insight about the host from enumeration alone - operating system, state of the system (boot/fully working etc), configuration (enabled/disabled autostart etc). Its not infeasible for an attacker to keep trying new VID/PID pairs until detecting successful enumeration.

Re: Blocking Untrusted USB Devices

#28
post #26
post #18

Earlier quoted context omitted.

Would it also not be possible to measure power draw upon the device and with that, add another metric to device profiling. So if you have say a keyboard that uses 200ma power and then suddenly a device that has the same ID's is plugged in and uses 500ma of power, that would trigger a flag.

Currently deployed hardware has no ability to measure that.

Yes it does: lsusb -v upon linux shows exactly that information. Not sure upon windows flavours of doing that beyond gui digging some properties, but the values are in there.

Re: Blocking Untrusted USB Devices

#29
post #28
post #26

Earlier quoted context omitted.

Currently deployed hardware has no ability to measure that.

Yes it does: lsusb -v upon linux shows exactly that information. Not sure upon windows flavours of doing that beyond gui digging some properties, but the values are in there.

Sadly the number you are thinking about is self reported by the device - it is required by the spec to report its bMaxPower in USB Configuration Descriptor. This field is merely a convenience and a promise. http://dangerousprototypes.com/docs/Designing_USB_Devices_fo...

Re: Blocking Untrusted USB Devices

#30
post #29
post #28

Earlier quoted context omitted.

Yes it does: lsusb -v upon linux shows exactly that information. Not sure upon windows flavours of doing that beyond gui digging some properties, but the values are in there.

Sadly the number you are thinking about is self reported by the device - it is required by the spec to report its bMaxPower in USB Configuration Descriptor. This field is merely a convenience and a promise. http://dangerousprototypes.com/docs/Designing_USB_Devices_fo...

Aha, my humble apologies for my confusions, appreciate being educated. I learned something today, thank you.
Post reply on HN