News for hackers. Stuff that matters.
Re:Windows Hello bypassed using infrared image by gregmac on Monday July 19, 2021 @09:05PM (#27889071)
It seems like it wouldn't be a stretch to make a USB webcam that presented an "animated" infrared image -- would that defeat this fix?

What I'd really like is the system to consider every new USB device untrusted, and require specific approval before it's added as a device. This should apply to its capabilities too (eg: if a "keyboard" suddenly is presenting itself as storage, that causes a prompt). Think along the lines of "Acme WebCam XYZ wants to add a Camera and Microphone. Allow?"

And while the computer is locked this should absolutely be impossible.

I went looking for some commercial stuff, and there seems to be products aimed at businesses -- but seems these are centrally-managed, work by whitelisting specific devices ahead of time, and are more focused on data exfiltration than preventing a rogue keyboard, badusb or rubber ducky. Is there something that does this?

Re:Windows Hello bypassed using infrared image by vladvasiliu on Tuesday July 20, 2021 @07:47AM (#27892571)
> What I'd really like is the system to consider every new USB device untrusted, and require specific approval before it's added as a device. This should apply to its capabilities too (eg: if a "keyboard" suddenly is presenting itself as storage, that causes a prompt). Think along the lines of "Acme WebCam XYZ wants to add a Camera and Microphone. Allow?"

There's USBGuard on Linux that seems to do some of this. Can't vouch for it, as I've never used it, though.

https://wiki.archlinux.org/title/USBGuard

https://github.com/USBGuard/usbguard

Re:Windows Hello bypassed using infrared image by tyingq on Monday July 19, 2021 @10:09PM (#27889419)
>if a "keyboard" suddenly is presenting itself as storage, that causes a prompt

I'm not clear on how you would know it was the keyboard changing identities and not just a new device. Does the USB protocol provide anything where you would know, assuming devices can change Base Class, VID, PID, and so on?

For that matter, I don't think it needs to change. It can just emulate a hub and present both.

Re:Windows Hello bypassed using infrared image by gruez on Monday July 19, 2021 @10:30PM (#27889512)
What you'd described would require each USB device to cryptographically sign its communications with an unique key. AFAIK USB doesn't have this, but thunderbolt does (it's called "secure connect"). Even if it does get implemented though, it probably won't help much because most users can be social engineered into trusting the new device.
Re:Windows Hello bypassed using infrared image by ohazi on Monday July 19, 2021 @11:05PM (#27889669)
The common USB device classes (video device, HID keyboard/mouse, etc.) don't have this, but anybody can define a new device class that does.

It seems like maybe Microsoft should have required something like this for Windows Hello cameras, if they intended for people to use the hardware as a single factor authenticator.

i.e. the camera generates internal crypto keys and tells Windows about them when you set up Windows Hello, then Windows does a challenge/response to make sure it's getting an image from the authentic camera during login attempts.

Apple did something like this with the fingerprint reader home buttons on iPhones, which is why you had to replace the motherboard + home button as a single unit on damaged devices. They could have provided a reprovisioning tool, but it's Apple, so they didn't.

Re:Windows Hello bypassed using infrared image by nasut on Tuesday July 20, 2021 @03:56AM (#27891066)
” They could have provided a reprovisioning tool, but it's Apple, so they didn't.”

They did

Re:Windows Hello bypassed using infrared image by ohazi on Tuesday July 20, 2021 @06:11AM (#27891877)
Re:Windows Hello bypassed using infrared image by djxfade on Tuesday July 20, 2021 @06:09AM (#27891862)
Source?
Re:Windows Hello bypassed using infrared image by dhx on Tuesday July 20, 2021 @04:52AM (#27891391)
There exists the USB Authentication Specification Rev. 1.0 [1] which states in section 3.3:

"A private key used by one Authentication Responder shall not be used by any other Authentication Responders. For example, one instance of a USB PD power supply cannot have the same private key as another instance of the USB PD power supply, even if they are otherwise identical model."

[1] https://usb.org/document-library/usb-authentication-specific...

Re:Windows Hello bypassed using infrared image by numpad0 on Monday July 19, 2021 @11:51PM (#27889883)
Current USB host controllers aren’t built in the way they can distinguish between physical removal and electronic self reset.

Maybe if you’re NSA you could roll your own USB xHCI and a USB A receptacle that could characterize and identify individual units down to a machine in China used to assemble it, but that will be lightyears ahead of commercial USB host controllers.

Re:Windows Hello bypassed using infrared image by gregmac on Monday July 19, 2021 @11:37PM (#27889814)
My point was if the class, VID or PID changes then treat it like a "new" device. If it presents subdevices or is suddenly a hub, those are new devices.

You'd have to also detect PID/VID brute force attacks. Short of a cryptographic key (as gruez talked about), a device being able to guess a valid class+PID+VID combo would be bad, so this would have to be treated similar to a password brute-force attack: too many "new" devices in a short time (especially unplugged without clicking the authorization UI) would cause the system to stop accepting new devices for a time.

Ideally you can also detect something else -- eg: serial number -- but I think that starts getting into manufacturer/device-specific implementations. (If only there was a company with billions of dollars and huge facilities and relationships with USB vendors and the capability to test tons of devices..)

Re:Windows Hello bypassed using infrared image by tyingq on Monday July 19, 2021 @11:47PM (#27889855)
>My point was if the class, VID or PID changes then treat it like a "new" device

Yes, I understood that. What I'm saying that USB wouldn't give you any context for that. A device changing would be indistinguishable from one being removed and a new one going in. Or future "rubby duckies" could emulate a hub, and add multiple devices, all operating simultaneuously.

Re:Windows Hello bypassed using infrared image by gregmac on Tuesday July 20, 2021 @12:33AM (#27890111)
I don't see why you need context?

> A device changing would be indistinguishable from one being removed and a new one going in. Or future "rubby duckies" could emulate a hub, and add multiple devices, all operating simultaneuously.

In all of these cases, the system should show a prompt asking the user for authorization. Hopefully in a way that makes it clear if they didn't just physically attach a new keyboard, they should be extremely suspicious about what's currently connected to their USB ports.

Re:Windows Hello bypassed using infrared image by tyingq on Tuesday July 20, 2021 @12:46AM (#27890177)
Yes, you could prompt for every USB device detection. You would have to do that on boot too, though, which would probably give users security notice fatigue. There's basically no persistence, serial numbers, etc.
Re:Windows Hello bypassed using infrared image by gregmac on Wednesday July 21, 2021 @08:50PM (#27914079)
Only initially. I guess maybe I wasn't clear in my original post, but my idea was always that the system would remember any authorized device (presumably by VID+PID+capabilities, but maybe also serial or other identifying info if the device+OS supports it). You'd only get the UI prompt the very first time you plug in a new keyboard -- after that, you can plug it in at will and it continues to work. This is also why I mentioned about VID/PID brute force attacks.

It would be rare to see multiple devices at once -- eg: the very first boot, or plugging in a new complex device like a dock -- but the experience of this hinges on having the right UI. Having a series of pop-ups like "Do you accept Generic USB Hub 06 (connected to Root USB Hub 2)?" is going to cause them all to be ignored, but, for example, showing a tree of devices and making it easy to accept all at once would probably be ok. And hubs in particular may be a special case, where you don't bother to prompt, but I don't know if that opens an attack vector.

Re:Windows Hello bypassed using infrared image by mavhc on Tuesday July 20, 2021 @06:05AM (#27891838)
What input device do you use to accept the prompt?
Re:Windows Hello bypassed using infrared image by colejohnson66 on Tuesday July 20, 2021 @09:24AM (#27893365)
A PS/2 mouse would work, but who has those anymore?
Re:Windows Hello bypassed using infrared image by mavhc on Tuesday July 20, 2021 @05:01PM (#27899281)
Plus you'd have to teach people to turn off their computers before plugging them in, which would be hard with Windows these days, when Shutdown is actually Hibernate
Re:Windows Hello bypassed using infrared image by lrvick on Tuesday July 20, 2021 @07:11AM (#27892322)
> What I'd really like is the system to consider every new USB device untrusted, and require specific approval before it's added as a device.

QubesOS does this by quarantining your USB controllers in a dedicated virtual machine.

https://www.qubes-os.org/doc/usb-qubes/

Usb-guard for Linux also uses kernel features to accomplish similar.

I dont know of any methods to do this on MacOS or Windows though.

Re:Windows Hello bypassed using infrared image by noobermin on Monday July 19, 2021 @09:09PM (#27889094)
Seems like a recipe for severe headaches and cursing when devices fail while you're logged out and now you can't log in by just connecting a new keyboard.
Re:Windows Hello bypassed using infrared image by nitrogen on Monday July 19, 2021 @09:20PM (#27889162)
"Please press this key sequence, then type your password, on the newly attached keyboard to enable it for use."
Re:Windows Hello bypassed using infrared image by ivegotnoaccount on Tuesday July 20, 2021 @01:03AM (#27890253)
Then you will (probably) get malwares that open a window in fullscreen that imitates that prompt and sends data to a server.

You probably could add some kind of fingerprint that allow identifying the legit prompts, but since it is not done with login screens...

Re:Windows Hello bypassed using infrared image by nitrogen on Tuesday July 20, 2021 @01:05AM (#27890258)
This is why Windows used to ask for Ctrl-alt-del before login. And if you have malware already on your system, it's already too late.
Re:Windows Hello bypassed using infrared image by gregmac on Wednesday July 21, 2021 @05:36PM (#27912523)
Aside from already having malware making this irrelevant, if you didn't just physically attach a new keyboard, the message about a new keyboard is also going to seem very suspicious.
Re:Windows Hello bypassed using infrared image by banana_giraffe on Monday July 19, 2021 @09:55PM (#27889336)
Now I'm curious if there's some device that presents itself as a keyboard, types some Powershell script and "copies" files off of the computer using numlock/capslock/scrolllock signals.
Re:Windows Hello bypassed using infrared image by nightfly on Monday July 19, 2021 @09:56PM (#27889345)
That's a USB Rubber Ducky
Re:Windows Hello bypassed using infrared image by banana_giraffe on Monday July 19, 2021 @10:00PM (#27889363)
Hah.

Never played with one, but I just assumed it was a macro playback engine, not surprising, I suppose it would do more.

Re:Windows Hello bypassed using infrared image by schmorptron on Tuesday July 20, 2021 @02:53AM (#27890773)
Yes! Look into BadUSB, there's some really cool, but also scary, stuff out there.