> WebBluetooth (yup, talking to bluetooth devices from JS on a webpage) This sounds like a great new attack vector for the black hats of tommorrow. There are just some things that a web browser should not do. Exposing things that previously required escape from sandbox attacks is one of them.
The user experience is similar to webcam/microphone access: nothing works without a prompt and browser-mediated pairing process, and only on secure origins (e.g. https). The spec goes into detail about security/privacy considerations, and includes a blacklist of problematic targets. https://webbluetoothcg.github.io/web-bluetooth/#security-and... Access through web browsers could expose issues in the user's kernel blu…
What happens behind the scenes is not. The microphone and webcam are far easier to secure because they just provide data streams if authorized and the web browser can provide a visual cue when it is in use. Some webcams even have a light to indicate when they are I use. Although that might not be perfect, it is far better than things like browser plugins.
Bluetooth is another story. With WebBluetooth, you are effectively providing access to an Advanced Persistent Threat attack vector. That takes things to a whole different level for black hats. If it is widely adopted, someone somewhere will find a way to target it as compromising the firmware of paired Bluetooth devices should be easier than typical escape from sandbox attacks. How long it takes for us to hear about it is another story.
> Access through web browsers could expose issues in the user's kernel bluetooth stack, but that risk exists with any binding. There should be time to explore this possibility while the feature is still behind a flag
Whether WebBluetooth can attack the Bluetooth stack directly is irrelevant. What matters is the embedded device's Bluetooth stack. Allowing a web site to dictate the contents of an otherwise legitimate communication with an embedded device's Bluetooth stack allows it to compromised with no compromise of the machine required.
Running exploits against the embedded device should just requires gaining control of a webserver hosting a site that the browser permits to use webbluetooth or injecting code through a XSS attack. If the embedded device allows firmware updates over bluetooth, getting malicious code onto it is easy. If not, the embedded code that communicates with a paired device should have been written under the assumption that the other end would not try anything malicious and consequently, it should have vulnerabilities.
Regardless of how a blackhat gets into a paired bluetooth device, once they are inside, they have code execution on the opposite side of the surface typically attacked on modern computers.