8 ms·
The same logic could be applied to local software, which inevitably is also remote in origin. At least browsers generally have a better permission model than d
by nailer 11y ago
The same logic could be applied to local software, which inevitably is also remote in origin.
At least browsers generally have a better permission model than desktop apps: "do you want to allow this web page for access to USB devices?".
- ZenoArrow 11y agoThe sensible alternative is to not enable this functionality at all. USB security is a joke, the risks for this API are too high.
- pdkl95 11y ago> The sensible alternative is to not enable this functionality at all. Far too many people seem to think the solution to security problems to ignore security and only consider the features you want. This is such a bad idea that I'm starting to question the motives behind it. If I wanted to break the security of an important class of software, it would look something like this "standard". > USB security is a joke Most hardware security - USB or otherwise - doesn't exist. Local peripherals were never designed with security in mind.
- icebraining 11y agoLocal peripherals won't be exposed unless they specific declare they support WebUSB.
- pdkl95 11y agoDo you really think attackers will respect that limitation after they overflow a buffer in the browser? You're only looking at how it's supposed to work. What matters is how it will be exploited.
- icebraining 11y agoWith or without WebUSB, browsers can already talk to USB devices, and so if you can exploit the browser to run your own code, you can too.
- pdkl95 11y agoThen show me the USB interface code in firefox. As far as I know, it doesn't exist.
- icebraining 11y agoIt's in the Win32 DLLs that Firefox links against.
- ZenoArrow 11y agoTo see all potential security issues, you need to look at the whole tech stack. A single USB device can have multiple drivers, and although only one is active at any given time the decision over which one to use can be influenced by applications. https://msdn.microsoft.com/en-gb/library/windows/hardware/hh920375(v=vs.85).aspx https://msdn.microsoft.com/en-gb/library/windows/hardware/hh... "A USB configuration defines the capabilities and features of a device, mainly its power capabilities and interfaces. The device can have multiple configurations, but only one is active at a time. The active configuration isn't chosen by the USB driver stack, but might be initiated by an application, a driver, the device driver. The device driver selects an active configuration. A configuration can have one or more USB interfaces that define the functionality of the device. Typically, there is a one-to-one correlation between a function and an interface. However, certain devices expose multiple interfaces related to one function." So let's say I want to exploit this new WebUSB API. If I infect your computer with malware that installs a second USB driver for the hardware I want access to, and this second driver has support for WebUSB, I could theoretically control the driver being used by making a WebUSB request for the device, thereby exposing the hardware for further exploits.
- icebraining 11y agoThis is what Raymond Chen calls "being on the other side of the airtight hatchway". If you can install an USB driver on my machine, it's because you can run native code on my machine, and so you can use that to talk to the USB device without requiring WebUSB.
- ZenoArrow 11y agoThe difference between using the malware itself to communicate via the web and using WebUSB to do so would be in malware detection. If an unidentified EXE hidden in your Windows partition is communicating via the web that's going to look a lot more suspect than a driver which is trusted by the system. The malware that installed the driver could remove itself after installing the driver, taking out another way to track it down.
- 11y ago
- makomk 11y agoIn order for this to be even vaguely secure, every single device that declares support for WebUSB has to refrain from allowing firmware updates over WebUSB despite how incredibly convenient this is, and despite how much of a support nightmare it would be to roll out bugfixes to users without it, and despite them being developed by hardware manufacturers who generally don't give a fuck about security. I can't see this happening. (Allowing remote firmware updates effectively gives full remote code execution on the host PC to the website behind the device, since it can then emulate USB input devices.)
- icebraining 11y agoOh, I don't disagree; I would bet some of those devices will get owned. My only hope is that the manufacturers will set the "origin allowed" field that says what domains may access the devices.
- asjfkdlf 11y agoI am not sure I agree "browsers generally have a better permission model than desktop apps". Yes, browsers ask the user if they would like to allow, but do desktops apps have rampant XSS vulnerabilities? If you allow a site to use USB, you have to be worried that any XSS vulnerability will compromise your USB devices.
- ZenoArrow 11y agoExactly. Combine a XSS attack with USB keyboard monitoring and you've got ridiculously powerful password harvesting. That's just one potential attack of many.
- justinschuh 11y agoThat's not at all an accurate framing. I'm not aware of any implementation that plans to allow access to HID devices (keyboard, mouse, etc.) or other device classes that are already handled natively by the browser/OS. Even ignoring security, just think of what a mess the user experience would be if sites could unbind and override native devices.
- pdkl95 11y agoImplementations are always perfect? When - not if - someone finds an implementation bug in either the browser or the USB hardware, we will see exploits far worse than keylogging passwords. The bug could be in any USB device, not just the subset you're thinking about. Do you really want to trust your host-controller, every USB device, and the browser interface to be bug free? Are you sure there are no subtle non-bug interactions between devices? Have you even seen how USB devices are designed? Limitations like "no HID devices" are how it's supposed to work, which is different from how it will actually work. edit: Also, did everyone forget about BadUSB?
- justinschuh 11y agoSorry, but I'm at a loss for what you believe you're responding to here. I made a clear, factual statement regarding the handling of bound USB devices for known devices and classes. Specifically, HID and other native device classes that are already bound by the OS should not be exposed to WebUSB -- the reasons for and robustness of that guarantee should be self-evident to anyone moderately familiar with USB in modern OSes. Now, if you have a specific argument to make against my statement, then please share it. I have direct experience with the subject here, and ideally can provide context to address such arguments or clear up confusion. However, I really don't think it's productive to respond with non sequitur arguments and personal attacks.
- donatj 11y ago> At least browsers generally have a better permission model than desktop apps The flaw with that is desktop apps have the ultimate permission model, you choose to have them, and don't just stumble across them.
- cm3 11y agoAnd your local apps don't self-modify the code all the time, whereas that's exactly what the dynamic browser environment with 3rd-party scripting is.
- nsgi 11y agoHow are users supposed to know whether they can trust a desktop app with near-unlimited access to their computer? Generally they don't, but blindly install it anyway because it seems to do something they need.
- erikpukinskis 11y agoYes, that's called "opt in" and it's the same security model this standard is proposing.
- spriggan3 11y ago> The same logic could be applied to local software, which inevitably is also remote in origin. One big difference is that one chooses to download the software and install it on a computer. In a browser, everything gets downloaded and executed automatically, including scripts. It's just a matter of opening or being redirected to a URL.
- abjorn 11y agoFor the average user the two concepts are not so different. Most people wouldn't think twice about downloading an executable, just like they wouldn't think twice about clicking a link.
- cm3 11y agoWhich is why it's even more dangerous to browse the web with all receptors (features) enabled. Add preloading of links on pages, and you have yourself a constant modifying environment (browser) which is controlled by third parties that don't first require a permission dialog. So, this is much unsafer than consciously running an executable you've downloaded.
- nsgi 11y agoYou have to give it permission to use USB, though. The USB functionality might also be something included in software you downloaded for another purpose, without your knowledge.
- mtgx 11y agoDo they, though? I just tested this on the phone today - it sees even my damn ambient light, in real-time. Why the hell is stuff like this allowed to be seen by default in a browser? http://webkay.robinlinus.com/ http://webkay.robinlinus.com/
- pests 11y agoThat website is not using specific browser features to find other devices. It is using standard JavaScript networking functions to check for known classes of devices on your internal network. Might be splitting hairs, but it's not like the browser is providing a direct API to that data.