101 points · by moondev · 3y ago · 96 comments
https://stadia.google.com/controller/index_en_US.html
Today I discovered the VIA project can configure my QMK keyboards
Both of these implementations worked perfectly on my framework Chromebook. What are some other cool examples folks have seen?
But with WebUSB a page _can_ communicate directly to a yubikey and pretend it's being asked to authenticate on a different origin. It's been fixed now but it was an interesting bypass:
- https://www.yubico.com/support/issue-rating-system/security-...
- https://www.wired.com/story/chrome-yubikey-phishing-webusb/
What is the advantage of yubikey over TOTP in that scenario though?
You have no cash, no wallet, no cards, no phone, no yubikey, nothing.
There's a public library next door where you can use an internet terminal to log into your Google Voice and G-mail and send an e-mail for help or call your family without needing cash on hand. Those websites enforce 2FA, so this is the solution to that.
(I realize this breaks the premise of 2FA, but it will get you back safely, which is probably more important on your Maslow hierarchy than some infosec policy.)
It's amazing for students to be able to quickly get a program they've written in their browser onto a device in their hands that can respond to and interact with the real world.
Also great because with MicroPython and the Python Editor you get a standalone Python environment including REPL that's completely isolated from the PC - schools love it because no matter what the students do they're not going to break the host PCs.
(The firmware that implements web USB on the micro:bit's USB interface chip is open source, DAPLink https://github.com/ARMmbed/DAPLink)
as well. I don't use Android anymore, but it's seriously cool that you can reflash the OS from a webpage.
https://usefulangle.com/web-updates/post/80/firefox-decines-...
I assume this is because of security concerns.
The idea is that your browser can mediate and scope access to specific devices. There are some edge cases where Web USB is equally as dangerous as the status quo, but in the common case it is far better and never worse.
The situation today is you buy a random USB gadget (e.g. a fitness tracker), but you can't use it without also installing the accompanying software/drivers. That effectively gives the manufacturer complete control of your computer. All you really wanted was for them to sync your step count, but you have no option but to give them complete remote access to your computer.
With Web USB you can allow vendor.com to access device 1234:5678 only, and revoke that access whenever you like.
Sure, maybe you could be tricked into clicking through all the confirmations and granting https://fakevendor.com access to a device. That could be bad - but no worse (and probably a lot better) than being tricked into downloading and running fakedriver.exe.
(disclaimer: I work for Google, have nothing to do with Chrome)
I reject this way of thinking. Letting bad guys dictate how you live your life and how you use your computer just doesn't scale that well.
To be fair I'm still exploring it, once you choose a USB device when prompted, is that access for the session or longer?
Sometimes they implement a seemingly innocuous API like WebMIDI, and boom, fingerprinting: https://twitter.com/denschub/status/1582730985778556931?s=20...
I just wish that VIA was a bit more robust, particularly around macros... I want to do something that does separate key down and key up events with pauses between. Unfortunately, VIA doesn't do that. And worse, my keyboard (Keychron K3 Pro) doesn't yet have a public firmware build for QMK, so I can't do it directly in there either...
(I'm trying to write a macro for blanking the screen in macOS. Normally this is ctrl-shift-eject with eject held for a brief moment, but a macro of that rarely works from VIA. It needs a little delay at the end. If I add a no-op key to the end it then works, but also leaves ctrl and shift stuck down until I manually press each of them, which is no good.)
</digress>
My only gripe is that they moved to web-only from “native” apps instead of offering both, but if that’s what needed to happen to bump up the development velocity, so be it.
Re: the delays, I think I recently saw something about delays being possible in macros now, or perhaps soon — it might have been in QMK nightly, I can’t remember.
But I otherwise agree, it really does make things easy. I just wish it did a little bit more...
https://gist.github.com/alexanderson1993/5e280410dd10639555b...
https://docs.arduino.cc/learn/starting-guide/the-arduino-web...
I created a two-part project: a web app you configure ad simulate a few* peripherals in, and a bridge device that can interact with the simulated peripherals. Essentially, a bridge between the physical microprocessor you've programmed, and the web app. Doesn't work on Firefox because those APIs aren't available however.
* few being one of seven-segment display, "ultrasonic sensor", and a simple LED.
On the USB device you can implement the WebUSB descriptor to link to your own website. This will give a notification on your desktop to open your website.
More info here: https://web.dev/build-for-webusb/
Pretty wild first experience doing it for me - I'm used to the hassle of sideloading a bootloader and then flashing.
For instance configure a thumb drive to be storage for a WebApp and the landing page is the WebApp itself. Is this this easily doable (as a file on the drive with WebUSB info) or would it require diving into the thumbdrive firmware itself.
(Also you can write your own fw)
https://github.com/skybrian/serialviz
Also a hack to connect to a Lego NXT brick. (Not shared since I'd need to polish it up.)
Blew my mind that it worked flawlessly almost 3 years ago already.