First and foremost, I have no affiliation with any of the authors previously mentioned. However, I would like to pose a question to the community: Is it feasible to exploit these undocumented HCI commands to develop malicious firmware for the ESP32? Such firmware could potentially be designed to respond to over-the-air (OTA) signals, activating these hidden commands to perform unauthorized actions like memory manipul…
This would require you to have root access to the thing, at that point you might as well write literally any code you like and not bother with the HCI commands.
ESP32 Undocumented Bluetooth Commands: Clearing the Air
31–40 of 92 posts
Re: ESP32 Undocumented Bluetooth Commands: Clearing the Air
#32Storm in a teacup. But it raises an interesting question. Why are these HCI commands "undocumented"? A phrase I hear around security nowadays is "Shadow API" [0, 1] A shadow API is an undocumented one, and it tends to set-off massive alarm bells. The researchers were clearly too keen to make a splash, and that reflects a sad state of wannabeism and hustling for crumbs these days. What exacerbates it is proprietary so…
Espressif, as well as all other manufacturers of such BLE enabled SoCs provide at least some parts of their RF stack as precompiled binary. However, Espressif took the decision to deliberately not publish the registers used at lowest level to configure and command the RF peripheral on the IC. All other manufacturers I am aware of publish these registers, just like all the others. Ultimately this minor obfuscation offers no additional security benefit, nor does it create any security loophole above any that exist on any other chipset.
Re: ESP32 Undocumented Bluetooth Commands: Clearing the Air
#33Storm in a teacup. But it raises an interesting question. Why are these HCI commands "undocumented"? A phrase I hear around security nowadays is "Shadow API" [0, 1] A shadow API is an undocumented one, and it tends to set-off massive alarm bells. The researchers were clearly too keen to make a splash, and that reflects a sad state of wannabeism and hustling for crumbs these days. What exacerbates it is proprietary so…
... everything ever always had factory-use-only interfaces. Manufacturers don't document every bits of everything on public datasheets. Granted, the dynamics of this change if they can be used as backdoors, and those might have to be either disclosed or securely disabled, but "why they exist in the first place" is just nonsensical question; they exist for necessary internal purposes.
That question should be "how should factory use interfaces be handled going forward".
Re: ESP32 Undocumented Bluetooth Commands: Clearing the Air
#34First and foremost, I have no affiliation with any of the authors previously mentioned. However, I would like to pose a question to the community: Is it feasible to exploit these undocumented HCI commands to develop malicious firmware for the ESP32? Such firmware could potentially be designed to respond to over-the-air (OTA) signals, activating these hidden commands to perform unauthorized actions like memory manipul…
As the article states "These undocumented HCI commands cannot be triggered by Bluetooth, radio signals, or over the Internet, unless there is a vulnerability in the application itself or the radio protocols.". Hence I dont think there is any security risk here assuming the application and radio is safe. It differs in a way that the person must have access to the device to flash firmware I believe. In x86 as you descr…
Re: ESP32 Undocumented Bluetooth Commands: Clearing the Air
#35In other words, this was a beatup for internet points, not, in any way, an actual security issue.
People in the real world report things - people on the internet read 3 out of 4 of the words in the headline and screech hysterically and run around spouting prophecies about the end of the world.
I am a person on the internet.
Re: ESP32 Undocumented Bluetooth Commands: Clearing the Air
#36> Espressif will document all Vendor-specific HCI commands to ensure transparancy of what functionality is available at the HCI layer I'm very glad they're going to be more transparent rather than try to lock things down more. I've been impressed with Espressif over the years and I'm glad they're continuing to impress.
Re: ESP32 Undocumented Bluetooth Commands: Clearing the Air
#37Related: Undocumented backdoor found in Bluetooth chip used by a billion devices https://news.ycombinator.com/item?id=43301369
On the HCI interface. That's not a OTA attack. If an attacker can write raw data the HCI interface you are doomed anyway.
Re: ESP32 Undocumented Bluetooth Commands: Clearing the Air
#38Those proprietary implementations should not exist. Bluetooth is open protocol and there's no reason to not use open source implementations.
> The ESP32 series of chips support open-source NimBLE and Bluedroid as Bluetooth host stacks.
The undocumented commands in question (which implement the debug interface) are about to become documented, and Espressif was both transparent in their publication, and pledged for more transparency moving forward.
How much more do you want?
Re: ESP32 Undocumented Bluetooth Commands: Clearing the Air
#39Re: ESP32 Undocumented Bluetooth Commands: Clearing the Air
#40Storm in a teacup. But it raises an interesting question. Why are these HCI commands "undocumented"? A phrase I hear around security nowadays is "Shadow API" [0, 1] A shadow API is an undocumented one, and it tends to set-off massive alarm bells. The researchers were clearly too keen to make a splash, and that reflects a sad state of wannabeism and hustling for crumbs these days. What exacerbates it is proprietary so…
The only difference between devices is whether such debug features remain accessible to users or they are completely disabled after production.
In this specific case, as well explained in TFA, the debug commands do not really provide any additional exploitable capabilities for a malicious programmer, especially because the Bluetooth controller is already hosted on the same CPU as the potentially malicious application, so if that could use the debug commands it could already do anything it wants, like sending arbitrary Bluetooth packets. The Bluetoth driver also can already do anything it wants on the shared CPU, so if it had bugs or backdoors that can be triggered by received Bluetooth packets the existence of these debug commands does not change anything.
Unlike this case where there is nothing to criticize in the reply of ExpressIf or on what they have done, an example of atrocious handling of the undocumented debug features has been provided by Apple, whose devices had for several years, until the end of 2023, a backdoor created by non-disabled debug registers, which allowed a total bypassing of the memory protection, enabling (in conjunction with some bugs in Apple system libraries) complete remote control of an iPhone, and which has been exploited for the remote and undetectable spying of some iPhone owners (discussed on HN at the time of the public revealing of the CVEs).