Live data from Hacker News

Pwn the ESP32 Forever: Flash Encryption and SEC. Boot Keys Extraction

limitedresults.com

51–60 of 78 posts

Re: Pwn the ESP32 Forever: Flash Encryption and SEC. Boot Keys Extraction

#51
I've heard e-fuses in general are vulnerable to optical inspection under polarized light after deliding a part. So if someone capable really wanted to clone a device, it's very possible they already were able to get the e-fuse key values.

I once used the e-fuse feature of another part for bootloader integrity. I wasn't worried about encryption, but the part would validate the bootloader integrity when encrypted. If integrity failed, the part would keep searching for a valid image. It was an easy way for some protection against flash corruption.

Re: Pwn the ESP32 Forever: Flash Encryption and SEC. Boot Keys Extraction

#52
post #17

Earlier quoted context omitted.

Almost all computing devices are broken when given physical access. And if they aren't it's just because someone hasn't worked it out yet or is broken secretly by governments.

This is kind of a myth. There is such thing as tamperproof hardware components and they can protect against plenty of threats. Security isn’t all or nothing, it’s about understanding what the different threats are and adequately protecting against them. Not everyone is trying to protect against attackers with millions of dollars at their disposal. There is plenty of value to deterring 99% of attackers with physical a…

when you consider that just about every security system depends on proper behavior by trusted human beings, who are never 100% reliable

...and I think that's perfectly fine and IMHO required. I've long been a proponent of the philosophy that a little bit of insecurity is what keeps society in general from turning into complete dystopia; but unfortunately, paranoia and the search of "perfect security" is driving it in that direction.

In other words, striving for perfect security is treacherous precisely because humans are not 100% reliable. The same way you would probably not want "perfect" law enforcement by the government.

Re: Pwn the ESP32 Forever: Flash Encryption and SEC. Boot Keys Extraction

#53

This is an interesting attack, and certainly looks highly successful in terms of allowing a determined hardware hacker to gain root/bootloader access to a device that the manufacturer has attempted to lock them out of. Glitching with a 6V supply on a 3.3V bus is certainly something I'd want to be a little cautious of if the hardware was more expensive than a $10 dev board - I wouldn't buy a $800 IoT fridge and use th…

Some hardware comes with firmware that can't be overwritten unless it's properly signed by the manufacturer to prevent an attacker from being able to get low-level control of devices that couldn't otherwise be detected. Example: https://www.cisco.com/c/en/us/products/collateral/security/c...

It is, of course, possible to replace an entire physical device with your own hacked one, and have nobody be the wiser. But the theory goes, that would be a lot harder than just copying rooted firmware into a device remotely. (The above system was hacked this year, though)

Re: Pwn the ESP32 Forever: Flash Encryption and SEC. Boot Keys Extraction

#54

Earlier quoted context omitted.

This is kind of a myth. There is such thing as tamperproof hardware components and they can protect against plenty of threats. Security isn’t all or nothing, it’s about understanding what the different threats are and adequately protecting against them. Not everyone is trying to protect against attackers with millions of dollars at their disposal. There is plenty of value to deterring 99% of attackers with physical a…

I don't disagree with other parts of your post, but I still think protecting against the scenario where an attacker has physical access to your computer is basically pointless. Especially if it comes with a very significant loss of freedom. If a malicious person has entered your home or workplace, access to your computer should be low on the list of worries.

Android handles this decently well it allows you to install whatever you want to the device but to unlock the device for custom firmware the device is first wiped so user data is perfectly safe.

Re: Pwn the ESP32 Forever: Flash Encryption and SEC. Boot Keys Extraction

#55

Props for the effort, but who expects a cheap china MCU for consumer products to be resilient against glitching attacks? You don’t use that stuff in high-security settings anyway. For consumers products resilient to advanced hardware attacks, I can only think of the iPhone and some consoles. Anything else?

[deleted]

Re: Pwn the ESP32 Forever: Flash Encryption and SEC. Boot Keys Extraction

#56
post #3

Synopsis: Secret keys are embedded in the device's e-fuses and are not readable by normal means because of a protection e-fuse. By measuring current draw during power up an interval is determined to be the time when the CPU is reading the e-fuses. At that time the power supplies are "glitched" from 3.3v to 6v using unspecified patterns from a signal generator. This causes errors in the e-fuse reading, one of which is…

Just piggy backing on the top comment to point out that the primary concern here is not necessarily for the security of the devices that you own and physically control (although that could be an issue in some cases, if others can access them too), but for the IP of the OEM which can now be extracted and flashed to cloned boards. So this may well be a serious issue for some of Espressif's customers, who are mostly OEM…

I have a product in the field, Chinese clones are on the market using my firmware that was pulled via voltage glitch.

Two things,

1. You know you’ve made it when there is a Chinese clone of your product.

2. I’ll never use that chip again.

Re: Pwn the ESP32 Forever: Flash Encryption and SEC. Boot Keys Extraction

#57
post #9

Some additional info is in Espressif's notification (CVE-2019-17391) which is linked to in the write up: https://www.espressif.com/en/news/Security_Advisory_Concerni... The fix is in ESP32-D0WD-V3 and ESP32-WROVER-E, but of course that doesn't do you any good if you've already shipped product.

I wonder why they weren't using Public-Private crypto in the first place? Perhaps because it would use up more space in the ROM? If so, I wonder what functionality they dropped from the ROM to add it now? I somehow doubt they made the ROM bigger - that would be very expensive at this stage of the chips lifecycle.

They do have ecc for signing. They just use the AES for encryption because it’s way faster.

Re: Pwn the ESP32 Forever: Flash Encryption and SEC. Boot Keys Extraction

#58
post #9

Some additional info is in Espressif's notification (CVE-2019-17391) which is linked to in the write up: https://www.espressif.com/en/news/Security_Advisory_Concerni... The fix is in ESP32-D0WD-V3 and ESP32-WROVER-E, but of course that doesn't do you any good if you've already shipped product.

I wonder why they weren't using Public-Private crypto in the first place? Perhaps because it would use up more space in the ROM? If so, I wonder what functionality they dropped from the ROM to add it now? I somehow doubt they made the ROM bigger - that would be very expensive at this stage of the chips lifecycle.

the original solution was probably just brought over from ESP8266 with little or no modifications. The 8266 had less resources then ESP32.

Re: Pwn the ESP32 Forever: Flash Encryption and SEC. Boot Keys Extraction

#59
post #3

Synopsis: Secret keys are embedded in the device's e-fuses and are not readable by normal means because of a protection e-fuse. By measuring current draw during power up an interval is determined to be the time when the CPU is reading the e-fuses. At that time the power supplies are "glitched" from 3.3v to 6v using unspecified patterns from a signal generator. This causes errors in the e-fuse reading, one of which is…

Just piggy backing on the top comment to point out that the primary concern here is not necessarily for the security of the devices that you own and physically control (although that could be an issue in some cases, if others can access them too), but for the IP of the OEM which can now be extracted and flashed to cloned boards. So this may well be a serious issue for some of Espressif's customers, who are mostly OEM…

> So this may well be a serious issue for some of Espressif's customers, who are mostly OEMs

I highly doubt that. From what I know, that feature was more of a nod to their customers from the West.

To most Chinese entrepreneurs, it makes no sense how your software being copied be an issue:

1. If you have a real specific reason why disclosure of your code be an end to your business, it will get hacked and copied anyways.

2. If you rely on that to stave away competition, you are already are in a such competitive market where this will make no difference, and your business will be cloned anyways.

3. You will get bad rep for that

Re: Pwn the ESP32 Forever: Flash Encryption and SEC. Boot Keys Extraction

#60
post #59

Earlier quoted context omitted.

Just piggy backing on the top comment to point out that the primary concern here is not necessarily for the security of the devices that you own and physically control (although that could be an issue in some cases, if others can access them too), but for the IP of the OEM which can now be extracted and flashed to cloned boards. So this may well be a serious issue for some of Espressif's customers, who are mostly OEM…

> So this may well be a serious issue for some of Espressif's customers, who are mostly OEMs I highly doubt that. From what I know, that feature was more of a nod to their customers from the West. To most Chinese entrepreneurs, it makes no sense how your software being copied be an issue: 1. If you have a real specific reason why disclosure of your code be an end to your business, it will get hacked and copied anyway…

So how do Chinese Entrepreneurs maintain competitive advantage and profit ?
Post reply on HN