186 points · by adunk · 7y ago · 121 comments
The smallest attack surface is no attack surface at all.
Users are already installing local applications from untrustworthy hardware vendors just to interact with bluetooth devices. I think a web bluetooth standard is an improvement on that.
Some of the other issues that crop up are:
* Sites "adding" increased security mentions to their customers by profiling their connected bluetooth devices * Is the browser only able to see connected devices and not the master list of devices? * Bluetooth devices come in such a wide array of formats that I wouldn't want to ever offer the browser access to these tech (it's clunky enough through the OS most of the time) Last time I let this site access my devices and now it's watching me * All those other options you listed below in another reply, are all high susceptible to a man in the middle attack, and all the sudden your headphones have been turned into a weapon, all because you clicked a link. * Getting your laptop's battery drained even more because of some nefarious website preventing your devices from sleeping
I feel like we need to build a pretty big moat around USB devices and Bluetooth devices, as they're often the easiest points of entry that can lead to further system compromise.
I think this mitigates these security concerns and improves security around Bluetooth devices generally.
Today if I want to do use the advanced configuration features of for my headphones I need to download a local application and install it. A local app from has way more unwanted permissions and tracking ability than a website. In the future it could be as simple as visiting their website and clicking allow when the site requests bluetooth access.
That does seem like a common feeling people have. Do you feel your OS is also doing too much as well?
> what are the chance that this won't be used for tracking somehow?
Are you referring to Browser vendors tracking people or Websites? Surely there will be Websites using this for tracking, they use everything they can. The same is true for apps in App Stores, such a shame.
And we never get these things right at launch.
The issue is exploitation of the USB devices being turned around and used to exploit the OS, or remain persistent in the device. Bluetooth has similar problems but also more.
Here are the ways in which "random websites" can gain access to USB/Bluetooth:
1) Prompt the user to download a native app. 2) Prompt the user to follow a link to an app store for their OS. 3) Prompt the user to allow the website access to the Web USB / Web Bluetooth APIs.
My follow up question then is how is option #3 less good than #1 and #2, and "less good" in what ways?
We as developers know the technology is not safe. We know users can't know what we know. But we still push it to users.
We are not protecting users. We are just transferring responsibility to users and we know that's know "gonna end well" but we're doing it anyway because of what? Because we can? Profit? Chromeos? Why?
Going to the app-store allows for reading opinions (i.e. somewhat independent) compared to just clicking, go-on. It shows some download/usage statistics and the like.
Also removal of the app guarantees removal, removal of web-works, etc. is significantly more cumbersome. Personally, I have very little trust in browsers (with their constant updates, sort of rushed) and have set deletion of all cookies/storage/etc. on exit - hence convenience is not there.
Overall web browsers make for a poor man OS w/o any specific hardware support (unless you count virtualization to a degree) for privileged layer access.
99.9999999999999999% of the websites out there doesn’t or shouldn’t need HW-access.
100% of the malicious websites out there will use this the second it lands. That’s one line of code to land seriously serious exploits.
Before their only option was your 1, 2, 3 steps above.
Clearly this is a quantum leap forward, for malicious sites first and foremost.
The rest of the web isn’t going to give a fuck.
So why are we investing in this?
No. But I wouldn't grant a "random" website hardware access either.
A reputable native program with a legitimate reason for requesting hardware access though? Sure. Why shouldn't I be able to do the same for a reputable website?
We’ve trained people unskilled in IT that’s apps are dangerous and websites are safer. They’ve finally gotten it.
So let’s make websites unsafe, only one click away (which we know users will click)! What a great idea!
The one exception I can think of might be WebAssembly, but to date most native features (like location, filesystem access, even manipulating the DOM) require interop with JS to be used by wasm.
* It's multiplatform.
* You can rapidly upload the changes (it's web)
* Bluetooth 4.0+ is faster than semihosting (and Bluetooth 5 even more).
* You don't have to use wires.
but what worries me is that there is a visible slowdown in the development of Web Bluetooth (at least when we compare it to the rapid growth in 2015-2017). Is it going to be a dead technology soon? Because it is way behind being a mature tech.
I was afraid I had to write an Android App to connect to the device via Bluetooth, which sucks because I am neither an app nor a java dev. With the web BT functionality I can now put a simple interface somewhere on the web, open it on my device and control the ESP (I am not a web dev either, but simple JS toy stuff is easy enough).
Of course this might require swapping the ESP8266 for an ESP32 if BLE is strictly necessary (the former doesn't support BLE, afaict).
Configure a default AP/hotspot, Android and iOS will connect and follow their respective flows for captive-portals. This allows you to grab config from the user and save it. It's a very configurable framework.
Prompting the user is good but it's not good enough for web api context because users can't be fully informed by a one line prompt.
I was asked to help my mother in law with her PC. When I looked at the screen it was half covered by W10 notifications from web sites. I asked her, how do you use this. And she sad, I don't know how that happened and I don't know how to stop it. Of course she gave permission but she could not understand how bad web sites would abuse notifications so she couldn't make a fully informed decision . It was sad. I turned all off.
Now, developers will say that it's impossible to fully inform a user but when that's the case should we really push that anyway to the user?
This is a bit of a tangent, but as tech support workers soon learn, it's unrealistic to expect everyone in a large pool of users to be independent of tech support. We have a myth of competent independence that works for some but it's not reality.
This goes double when your business includes retirees. As people age, many businesses have to figure out how to handle cognitive decline and death of their customers gracefully. (I'm thinking financial institutions in particular.)
Browsers try to make the open web safe for everyone, but it seems to be based on the median user and many users are well below average.
What I did find is that it can give a very good UX when it's working: connect directly from the browser to the ESP32, without requiring any WiFi setup or other hack to find and pair the device.
IMO this API should be off by default. Then you would get a native popup when an application is trying to access them for an user to approve it, like this was something Falsh did many years back when you attempted to access the webcam or microphone. Speaking of Flash there were pages that had to use an invisible Flash player(or Java apple) to work around missing features of browsers. So personally I would like if it would be possible to have a browser based, cross platform wideo chat, screen sharing or other cool application as long is using free standards(I mean real ones not Chrome/Google wants it so is a standard now ) . Sorry for the long response.
Yes. 100%. And I say that as a Linux-user.
If someone needs access to low level system and platform specific stuff, I would like to have that confined and isolated in an app 100% separate from my browser, which is already having a hard time staying secure.
That will also make such apps harder to make, so people will not make the decision to require such APIs lightly, or “just” to profile a user.
This is the same position I have on WebDRM, and the way WebDRM has gone only solidifies my stance.
So instead of having all of the security features that browsers have you would prefer to run the application in an environment where code has all of the permissions as the user running it. I'm sure malicious actors are onboard with this proposal!
The solution is to use a browser you trust and ask for browsers to have this modules off by default, maybe have the option to compile without pdf, webcam support, I am sure there will be people that would compile this browsers with the things they do not like out.
In Linux you could probably sandbox your borwser so it will not even see your real webcam or other hardware. So I prefer installing a full featured open source browser then 10 closed binary executables.
As a developer I could write detailed instructions on my website how to install Linux, what OS and packages to use, instructions for git clone etc. Or I could just have a button that the user can click on.
Hardware manufacturers suck SO badly at the web and software in general, the idea of having to use their website to configure something makes me feel nauseous.
I understand where you are coming from and I would also like Firefox not to force on me the PDF reader and other options, if they could have this extra features as plugins that you could as a power users uninstall and use your preferred thing would be nice.
Can you also make more clear why you don't trust someone making a webpage that calls an hardware related API but you trust them if instead of the page is a binary or a python script.
Make a real native app all the other decent people if you need this. Let the user assess the risk that way, and see how the market votes.
That's great for one-off things that you only interact with once.
Who is going to pay for this? How many ideas will die because nobody can afford to pay for 3+ native developers across Windows/Mac/Linux? How many teams will decide to axe Linux support because it's not worth it?
Why develop natively when you can just hire one JS developer to write once, deploy anywhere?
Native apps failed to democratize the market. We are stuck with platform-specific applications that will remain intertwined with their vendor of choice presumably forever.
PWA or bust.
(parent can replace the "" with whatever he likes, but since I find swearing doesn't quite fit HN, I've put some more appropriate terms next to them)
Eh, I'd much rather just visit a website where I have actual control (ublock, noscript, developer console) than download and install yet another native app black box.
For instance, only Qt 5.13+ has support for discovering and connecting BLE devices on Windows without pairing first -- if you are stuck on an LTS version (5.12), BLE is awkward in use.
Clearly nobody cares about the security of the user anymore anyway.
This article from 2016 goes into some of the security of Web Bluetooth:
https://medium.com/@jyasskin/the-web-bluetooth-security-mode...
I recently had to make a iOS app that embedded a webview that catches web bluetooth calls and implemented them natively, to work around the fact that Web Bluetooth doesn't work on Safari. I think that would be a maintenance nightmare going forward.
This just broke my mind. Could you explain how/why this infinity mirror contraption was built?
The app is mostly just a (safari) webview, but with hooks to satisfy the web bluetooth api, by using native code.
I want to understand the industry support behind this protocol/standard and the what they hope to gain from it.
Was this previously impossible or something ?
Its like if you needed to download a new web browser for every website you visit, absolutely ridiculous.
You say it like it's a bad thing.
>Its like if you needed to download a new web browser for every website you visit, absolutely ridiculous.
I really do hope websites do not try and enumerate Bluetooth on their right own. I know I'd never enable access to Bluetooth to a browser.
Actually the web is an OS: it has api for gui, for persistent data, for networking, for all kind of periphericals (gpu, gps, bluetooth) ... The problem you're raising (which i agree with) is that we already have an OS and we'd like to use that one.
I think this is actually superior to the security offered by mobile apps on android, which can enumerate bluetooth devices as soon as they have bluetooth permission.
Are you suggesting that I don't need to download anything to view a website ? I beg to differ.
If you check the article, namely the photo of the phone you can see there's a browser opened from localhost, so something must have been downloaded on the phone.
As opposed to downloading 1 app per vendor/product, each of which has its own attack surface and special way of doing things that may or may not support your specific hardware implementation.
Yeah there is, it’s called screen.
That's precisely what it is. Accessing bluetooth devices from a progressive web app affords a lot of interesting new functionality for web app developers.
Was this previously impossible or something ?
Web bluetooth has been around since Chrome 42 behind a flag, but it's only recently appeared in other browsers so maybe now is the time to start taking an interest.
Does anyone actually use progressive web apps?
Yes, is the correct but perhaps overly terse answer.
A more useful answer depends on exactly what you mean by PWA, as there are several common interpretations of the term.