Hacker News new | ask | show | jobs
by warkdarrior 4 days ago
Would this work over WebUSB?
2 comments

WebUSB lets web apps talk to USB devices that are attached to the host running the browser. It doesn't have the browser present an emulated USB device to the kernel (at least not to my knowledge).
Nothing stopping webUSB flashing the firmware of a device to run this exploit though presumably.
If you give the site access to your device, sure. But ultimately so could any other firmware updater.
Which is part of why Mozilla has been so bearish on WebUSB/MIDI/etc.

Performing software updates of essentially soft USB devices in a microcontroller is pretty much the primary use case of WebUSB currently.

I don't support Mozilla stance.

It's about the alternative.

Manufacturer can either provide WebUSB page, so you can flash your device. Or they can provide you with UPDATE.EXE which will do the same, but additionally your entire system will be exposed to arbitrary executable file.

WebUSB is always safer route.

And if Mozilla afraid about users randomly clicking (like they can already randomly download whatever exe and click on them) hide these permissions and turn off them by default. That's what I do on fresh chrome installation anyway, I disable every possible permission by default which still allows me to enable selected permissions on specific website if I need it.

The difference for me is the difference in expectations between what a website can do to your computer, and what random .exes can do.
not really, WebUSB is on the other side of (it allows you to interact with USB devices, it can not emulate a malicious device)

you would need to use WebUSB to hack a usb device connected to the computer, overwrite it's firmware and then make it restart so that it can "hack back" into the computer

which to be fair isn't impossible, but seems unlikely to be an relevant attack vector

That's totally feasible.
yes,

but you need to go through a lot of hoops, like

- have a wide range of USB devices which can be hacked through the web

- run a website (domains need human registration, so you need to have some "stolen" domains)

- make people visit that website

- make people grant WebUSB permissions to that website

- have people happen to have the right USB devices plugged in

....

like I'm sure someone could find some use for some high investment spear fishing attack

but such attacks often have much better approaches (which either are more likely to succeed or cheaper or leave less traces)

and it's unlikely to be worth the investment for typical "scattershot everything and see what sticks" attacks

so it's not that it isn't feasible, just that there so much better options

> - have a wide range of USB devices which can be hacked through the web

> - have people happen to have the right USB devices plugged in

Really the same argument, rehashed

> (domains need human registration, so you need to have some "stolen" domains)

Not true. Has it ever been true?

What remains is then some pretty normal hoops, such as:

    - plug in the "right" usb device
    - make user visit website
    - make user grant permissions
Doesn't sound like rock science now, does it?
Oh but surely next thing WebUSB people will demand would be usb host browser-side.
WebUSB is half dead.

Chrome OS is EOL

Firefox OS died long ago

Chrom dev loved PWAs but Google doesn't so that is dying too

on of the major caved points for PWAs and similar which need and easily could have been improved on are web permissions, and they are pretty much in a lot of way still more in an MVP state then anything else (which makes sense from a Google POV, having well implemented web permissions is in direct conflict with spying on people and forcing them to use native apps, eh I mean ads). E.g. web notifications do theoretically work grate but the way chrome handled them on Windows was absurdly ab-usable, instead of fixing it they removed it, it was _very_ fixable.

anyway the point I'm wanting to make is that I don't think WebUSB will be expanded on. It still likely will stay around, it's too useful for a wide variety of slightly niche cases (like firmware updates without needing a native app, widely used by modern customizable Keyboards). But that's it.

The shovel-everything-into-the-browser people never run out of terrible ideas.