Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blacklist Nordic DFU service #7

Closed
jyasskin opened this issue Mar 24, 2016 · 7 comments · Fixed by #9
Closed

Blacklist Nordic DFU service #7

jyasskin opened this issue Mar 24, 2016 · 7 comments · Fixed by #9

Comments

@jyasskin
Copy link
Member

00001530-1212-efde-1523-785feabcd123
The latest version, v11, of the nRF5 SDK doesn't support checking signatures of transferred firmware images. That introduces what I think is an unacceptable risk of users being phished to update their devices to malicious firmware. There's some experimental support, for manufacturers who go looking for it, but it's undocumented, and I don't expect enough to adopt it to justify the risk to everyone else.

Let's discuss here if there are any mitigations I've missed that would argue against blacklisting.

@beaufortfrancois
Copy link
Member

It seems unfair to penalize the Nordic DFU service when you can already do this with any other service UUID. How about adding some whitelisted URLs to https://github.com/WebBluetoothCG/registries/blob/master/gatt_blacklist.txt?

That way, we will let trustworthy websites use this DFU service while it doesn't yet support checking signatures of transferred firmware images.
Obviously, we'll remove these URLs once signatures check are enabled by default.

# This file holds a list of GATT UUIDs that websites using the Web
# Bluetooth API are forbidden from accessing.

## Services

# org.bluetooth.service.human_interface_device
# Direct access to HID devices like keyboards would let web pages
# become keyloggers.
00001812-0000-1000-8000-00805f9b34fb 

+ # Nordic DFU Service
+ 00001530-1212-efde-1523-785feabcd123 https://example.com

WDYT?

@ketile
Copy link

ketile commented Mar 29, 2016

What Francois is suggesting seems reasonable. Note that there will probably be a new UUID for the Nordic DFU service that supports signing, to guarantee against any fallback insecurities.

@mjdietzx
Copy link

@faune: Any thoughts on this?

@jyasskin
Copy link
Member Author

@beaufortfrancois What would the process be for getting on the list of trusted firmware updaters for a given manufacturer's service? Would a malicious actor just need to release some hardware using Nordic's service in order to get access to every other device using the same service?

The centralized firmware-update services are, in general, a bigger risk than one-off UUIDs, because a hostile site could attack them all at once, rather than needing to discover the update-UUID of each device individually. The presence of the Nordic UUID also tells the attacker some things about the hardware, that they could use to write a better attack, while a custom UUID would again make them do work specifically for that UUID. That said, we should be trying to blacklist every unsigned firmware-update UUID; I'm just focusing on the big ones first.

@ketile Adding a new UUID for the signed service would be great because it won't make us debate whether a large enough fraction of users of the old service have upgraded. Is there any chance the new service can check signatures by default? So, for instance, the code won't build until you either plug in your public key or take some other action to intentionally disable security?

@ketile
Copy link

ketile commented Mar 30, 2016

@jyasskin Yes, the new signed DFU service UUID will check signatures by default and there is no option to turn it off. Any unsigned DFU code will simply be discarded.

@beaufortfrancois
Copy link
Member

If there is indeed a new UUID for the signed DFU service, then we can/should definitely blacklist the unsecure 00001530-1212-efde-1523-785feabcd123 DFU service. It would be better than a whitelist for sure.

@beaufortfrancois
Copy link
Member

@jyasskin I was more thinking about whitelisting "generic" tools like Web IDEs rather than specific official device URLs for the unsecure DFU service.

The centralized firmware-update services are, in general, a bigger risk than one-off UUIDs, because a hostile site could attack them all at once, rather than needing to discover the update-UUID of each device individually. The presence of the Nordic UUID also tells the attacker some things about the hardware, that they could use to write a better attack, while a custom UUID would again make them do work specifically for that UUID.

I don't see how that's that much more difficult. All it takes is to add all "known" DFU service UUIDs to the optionalServices filters key and try all of them.

That said, we should be trying to blacklist every unsigned firmware-update UUID; I'm just focusing on the big ones first.

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants