(no title)
iracigt | 11 months ago
Undocumented debugging commands like this are common. I've worked with at least two chips, a WiFi adapter and a GPS receiver, that had similar functions. Neither was documented, but found by reverse engineering the chip firmware or vendor drivers. It's not exactly an impactful issue on its own. Anything that allows unsigned firmware is equally vulnerable.
If I'm misunderstanding and this is usable from anything other than the host, that would be a very different story.
iracigt|11 months ago
Espressif has been an almost unique level of open for this space. They've contributed to open source Rust toolchains for their chips. They've even publicly encouraged reverse engineering of their modem stack because it contains licensed code they can't release. I hate to see bad and damaging publicity be the reward for being just a little bit open.
hy4000days|11 months ago
[deleted]
AlotOfReading|11 months ago
With that said, HCI extensions can easily be a security hole. The problem is that HCI mixes attacker-controlled inputs with a complicated interface and a lot of fiddly parsing. It's easy to get wrong, as the BleedingTooth [0] vulnerability demonstrated a few years back.
Having these kinds of things around also makes it easier to pivot a vulnerability elsewhere, though that's low hanging fruit on most systems.
[0] https://google.github.io/security-research/pocs/linux/bleedi...
usrusr|11 months ago
But let's ignore that web API worst case. Imagine that you have some semi-trusted software and because you don't want to take any risks, you run in nested VMs three layers deep. The software has some plausible excuse to require access to the Bluetooth (perhaps it's a beacon demo?) so you grant an exception. You're not happy with the result (the beacon demo does not work as promised?), you remove the software and you also reset all three VM layers for good measure. Gone for good, nice. Unfortunately, the guest the malware installed on the ESP when it had access is still there...
Yes, undocumented access to your own subdevices can be a really bad thing, in particular when persistence is in the picture.
gruez|11 months ago
There are approximately 0 people who have the type of setup you described. Moreover, the chipset in question is only used in IOT devices, so it can't even be used in the way you described. Finally, does the chipset even have writeable memory? Or is it an exploit that only persists until the next reset?
laurowyn|11 months ago
You're hopping through 4 security boundaries and granting direct hardware access. If you don't understand the decisions you're making by doing that, all bets are off.
Better to give a virtualised bluetooth device and let the hypervisor drive the real one. Will hit performance a little, but it's far more secure.
20after4|11 months ago
Imagine the ESP32 is being used as a wifi/bluetooth "modem" via a serial link to a host system (rather than the ESP32 used as a standalone SOC.)
In theory, the attacker could then use the undocumented commands to scan, spoof, or otherwise attack any near by bluetooth devices. Perhaps this could even be achieved without gaining root on the device which is hosting the esp32.
iracigt|11 months ago
gruez|11 months ago
How's this any different than a laptop getting pwned and attackers being able to run aircrack-ng or whatever on it?
tru3_power|11 months ago
huang_chung|11 months ago
So? Device is 0wned. Did you think Bluetooth chip is magic protection device for rest of the network?
How would you stop physical external actor? Do you have "No ESP32 permitted on this property" signs on windows?
unknown|11 months ago
[deleted]
huang_chung|11 months ago
Wait until they learn you can rewrite disk drive firmware from inside OS with root access.
2OEH8eoCRo0|11 months ago
vaxman|11 months ago
The proof that you clearly seek of the "backdoor" can come one of three ways, another Snowden-like leak from inside the CCP-controlled Chinese chip fabricators, or more of this inexpensive novice-level probing/jailbreaking of such devices through their digital interfaces and protocol implementations, or via expensive and time consuming analog analysis (eg, TEMPEST, etc.) that study the device's radiology across the whole spectrum. (But even with imaging of the die, there is now a published technique that allows for the FAB to hide new or altered functionality until a sequence of opcodes are executed --in the field!) Nobody outside of government is going to spend much on trying to "(de)certify the integrity" of incredibly cheap ($7!) Chinese SoCs that suspiciously began "flooding the market" during the Pandemic-induced chip "shortage" simply because the circumstantial evidence and technical feasibility of their threat is so overwhelming. Just ask the manufacturer if they included a backdoor: If they know you are a credible questioner and/or may already have the answer, they will typically respond with something like "the other party does the same thing" or "its for debug purposes and will be removed." If they don't believe you to be credible, they will simply not answer you or may, as required by their law, lie. So, until there is another Snowden-like data dump involving CCP-controlled Chinese chip fabrication, you probably won't have access to any proof.
Bottom line: Master computer scientists warn that it is likely modern CCP-controlled Chinese SoC manufacturers are producing products that are vulnerable to RF-side exploitation (think of the signal that the Greeks used to know when to jump out of the Trojan Horse and start killing Romans). I would not ever trust these devices to critical infrastructure or even in many in-home scenarios, like boiler/water/gas operations, cameras/telemetry or automotive. A recommended Western alternative is the Raspberry Pi PICO 2 W. Perhaps one day Apple will be run by a new generation of executives that see another way to Change The World by entering this market.
https://youtu.be/ZO9M4zi4uGw
vlovich123|11 months ago
> Armed with this new tool, which enables raw access to Bluetooth traffic, Targolic discovered hidden vendor-specific commands (Opcode 0x3F) in the ESP32 Bluetooth firmware that allow low-level control over Bluetooth functions.
The exploit happens over bluetooth. They used a USBC driver to explore the potential attack surface.
Shit like this is what happens when you don’t have good separation between functionality you give QA for production firmware & commands for factory firmware bringup. Almost certainly this is because the vendor used the same image for factory bringup & shipping to end users.
seba_dos1|11 months ago
haswell|11 months ago
“Buy this super cheap home automation product” turns into installing an APT in your network.
Aurornis|11 months ago
> “Buy this super cheap home automation product” turns into installing an APT in your network.
That doesn't make any sense. If you buy a device with a radio, it's reasonable to assume that a malicious firmware could send/receive arbitrary things. That doesn't mean they have control of your network.
EDIT: It's like if you plugged an ethernet IoT device into your network and then someone told you the Ethernet chip on the device was capable of sending arbitrary packets or changing its MAC address if the device chooses to do so.
seba_dos1|11 months ago
If a malicious actor can leverage these commands, it means they already have control over your device and can use its Bluetooth radio however they want.
The only security problem that this causes is when your firmware gives someone else ability to use ESP's Bluetooth via HCI over UART without validating their inputs, not expecting it to allow them to take over the device. This is a rather uncommon scenario though - the user of such interface would usually be still you, just from a different chip.
huang_chung|11 months ago
If that was intention, no need to hide code in the Bluetooth, just write it in the firmware. The device itself it the trojan horse.
stragies|11 months ago
alt227|11 months ago
Surely thats a risk with buying any of the cheap chinese IoT gadgets on amazon or alibaba and plugging them into your home network?
excalibur|11 months ago
Were we not already assuming this was the case?