658 points · by transpute · 3y ago · 373 comments
But secure boot at the OS level (in the PC world, at least) is basically guaranteed to give users the ability to enable or disable it, change the policy to something that uses their own keys, and ensure that the system runs the software they want. When applied to firmware, that's not the case - if Boot Guard (or AMD's equivalent, Platform Secure Boot) is enabled, you don't get to replace your firmware with code you control. There's still a threat here (we've seen firmware-level attacks for pre-Boot Guard systems), but the question is whether the security benefit is worth the loss of freedom. I wrote about this a while back (https://mjg59.dreamwidth.org/58424.html) but I lean towards thinking that in most cases the defaults are bad, and if users want to lock themselves into only using vendor firmware that's something that users should be able to opt into.
A switch that can’t be controlled via software is at least more secure than the alternatives. If you check the jumper before booting up you can still be 100% sure even if someone previously flashed stuff onto it. Remember, it is called secure boot, not secure flash, so fw get verified again during boot up.
So, isn't this firmware protection with BootGuard only really meant to prevent rootkits from getting persistence?
PS: thanks for all the blog posts you share on the matter! they are really golden
But even this is a potential risk all by itself if you aren't making sure this can only be done by someone with physical access to the hardware. Case in point is Dell and AMD EPYC CPUs that were locked to Dell firmware if they had been booted on a Dell motherboard in the past. It's bad enough that processors were being locked to Dell only without the user making the choice but that also allows for the possibility of some pretty potent ransomware. Not just holding data for ransom but holding hardware as well and with the same durable cryptographic guarantees.
At least as far as Benjamin Franklin would tell you: No.
https://apnews.com/article/congress-data-breach-hack-identit...
https://www.nytimes.com/2014/08/01/world/senate-intelligence...
I'm pretty sure a lot of lawmakers still take this shit seriously.
By the time millennials and gen z are running the place, we’ll have moved on to misunderstanding AI or something like that.
[0] https://en.wikipedia.org/wiki/Intel_Management_Engine#%22Hig...
There is no scheme that only gives good people access. We can and must hammer this home.
Yes. That's the simple message to keep pushing. Especially when some attack demonstrates that it's true.
my tinfoil hatted guess? china this past week had talks with FR, RU, BR and others. they probably got 3+ favors in exchange of this leak.
Or, someone wanted to blacklist someone else's key without a public name and included it in this leak. i wouldn't doubt MSI, intel and safe-pc-for-criminals-r-us keys happen to be present there.
And more and more governments are making demands about decrypting users data on demand, about blowing up security for their own greedy needs. They have no idea the awful horrific mess, the buggy by design systems we get when we forgoe security for their paranoid snooping. This is such a textbook lesson. Alas that we need another blow to the face to remind ourselves.
Monopoly practice hidden as security.
Secure Boot is part of UEFI. TPM2.0 is used only by bitlocker (at least for the average person, enterprises do store other keys in it).
This isn't true at all, Windows Hello uses it as a secure credentials store.
> Monopoly practice hidden as security.
Actually you can, it's only checked by installer, if you modify it there is nothing stopping you from installing it. I have installed one on my parents computer. CPU wasn't supported but after installation everything worked ok.
It was dumb because they thought the key would remain secret only to them, and thus provide an elegant balance of security and safety.
The rest of the story is that my wife and I literally have everything we own - aside from our former home that’s now a rental and our “winter home” thats rented out 7 months a year - in 4 suitcases and two carryon book bags.
If we lost all four of our suitcases, it would be a nuisance. But we could rebuy everything for less than $1000.
The only time that our stuff was mishandled was when I made a mistake and put her portable mixer (Amazon - not an affiliate link https://a.co/d/iBQivv5) in my checked bag. I could see why X-rays thought it looked suspicious. They broke the power cord.
On the other hand, never underestimate the ability of the "security" establishment to spin this as a bad thing and instill more fear and paranoia.
All these user-hostile in the name of "security" features do is take control away from and put it in the hands of some centralised entity whose interests certainly do not align completely with yours.
Such keys should be in the hands of users, not Intel.
Part of the blame, imo, lies with how clunky tools are at the lower levels. I've seen plenty of hardware based signing protocols that don't allow for key hierarchies.
Higher level tools push this along as well. Hashicorp Vault also, last I checked, doesn't allow for being a front end to an HSM. You can store the master unlock key for a Vault in an HSM, but all of the keys Vault works with will still be in Vault, in memory.
But then we still also have things like Crypto AG.
I agree that master private keys are bad security design, and we can and should do better. I'm just not willing to say that all past security value is retroactively nullified. That feels polemic more than realistic.
Real but temporary security -> This 2048 bit key you generated will be commercial grade protection until at least 2030. Sometime after that computers will be strong enough to brute force it. Do not store anything with this key that will still be highly sensitive in 7 years. It's possible the underlying algorithm is cracked, or a leap in quantum computers happen that will make the key obsolete sooner.
Security theater -> All software running on this chip must be signed with our master key. Please trust all software we sign with this key, and no malicious party will have access to it. You are not allowed to run arbitrary software on your hardware because it is not signed with our key.
In the first case, the security is real. You own the lock, you own the key, and you control the entire security process. In the second case, you neither own the lock, the key, and basically have limited access to your own hardware.
As for games, lots of people play games and want good anticheat. If you don't like that you don't have to play those games but no need to act like the way you are because other people want decent anticheat.
I like it, going to hang on to this one
These evil maids are even more implausible than that. Has to be ridiculously targeted. If you are really targeted by such a powerful state-like entity, wouldn't it make much more sense for them to just send a NSA letter to Intel (or whatever the weakest link in your chain is, and there are plenty of extremely weak chains here, like the BIOS manufacturer) and/or backdoor the hell out of it?
Secure Boot was never about security for normal users nor security for the majority of us. This is like https://xkcd.com/1200/ all over again. At the point the attacker can write arbitrary bytes to your hard disk, its way past the point where the majority of users care.
it'd just be a matter of replacing a binary with a iffy'd version that runs before any decryption happens, e.g. replacing plymouth.
This isn't hard to do in the slightest? I think even you or I could do it.
But with secureboot, replacing a binary in the loading chain isn't an option.
I don't think I could convince intel to install a bug for me.
https://blog.invisiblethings.org/2011/09/07/anti-evil-maid.h... is a good descriptor of how it all comes together
At least if it was user controlled we can ensure that other people's leaked keys don't bypass our security.
https://en.wikipedia.org/wiki/Evil_maid_attack
"The name refers to the scenario where a maid could subvert a device left unattended in a hotel room – but the concept itself also applies to situations such as a device being intercepted while in transit, or taken away temporarily by airport or law enforcement personnel. "
As far as we know, if MSI had paid no one would know that Intel shipped shared private keys to multiple vendors who could then lose them like drunken monkeys.
People ask why these weren't on HSMs.. The article seems to claim that they weren't even able to generate the most important ones in the correct locations, let alone on HSMs with non-extractable settings.
I think we have to assume Intel was willing to put together a broken system with total incompetents. I think the US is better off with foreign chips watched closely than Intel watched poorly.
Announcement: http://blogvl7tjyjvsfthobttze52w36wwiz34hrfcmorgvdzb6hikucb7... (link likely to be invalid over time, since the number seems to change)
Link with the actual data: http://vkge4tbgo3kfc6n5lgjyvb7abjxp7wdnaumkh6xscyj4dceifieun...
(Links found via https://www.ransomlook.io/group/money%20message)
https://github.com/binarly-io/SupplyChainAttacks/blob/main/M...
Hasn't intel heard about locking keys in hardware, e.g. like with hardware security key modules similar but faster/flexibler then a TPM. Surly one of the main developers of TPM does understand that concept.... right? /s
>The leaked private keys affect Intel’s 11th, 12th, and 13th generation processors and were distributed to various OEMs, including Intel itself, Lenovo, and Supermicro.
there are more then just one or two ways to not have that risk and still have HSK
best many of this solutions scale pretty much to any arbitrary company size
So even if they push an update, people can pretty easily downgrade to a vulnerable version if they want to.
Why is a project like, say, Debian, even bothering signing kernels:
https://wiki.debian.org/SecureBoot
What's their rationale for supporting SecureBoot?
People might not like who holds the commonly preinstalled keys (Microsoft and motherboard OEMs) but even then you can add your own keys and sign your own images if you want (there was just a post yesterday about doing this for raspberry pis),
I like SecureBoot, and I like that I can select my keys to sign things the UEFI will run, but I don't like that I can't replace the UEFI itself since it's protected by bootguard.
Now if I can edit the UEFI, that's a gamechanger: I could have my signed UEFI payloads check the UEFI firmware has the parts I want (or don't want) and refuse to keep booting if it doesn't
That's just creating more ewaste, nobody can ever use that device normally again and it cannot be resold.
Of course if you lose your keys you can't sign anything else and that would make it basically ewaste, but most things end up as waste when you take actions that are reckless and can't be reversed (which is what losing the keys would be). Plus tech tends to ends up as ewaste after less than a decade anyways. Like sure you could still be using an AMD steamroller CPU but realistically after 10 years you'd be better off using a cheaper more power efficient chip anyways.
> Other Linux distros (Red Hat, Fedora, SUSE, Ubuntu, etc.) have had SB working for a while, but Debian was slow in getting this working. This meant that on many new computer systems, users had to first disable SB to be able to install and use Debian. The methods for doing this vary massively from one system to another, making this potentially quite difficult for users.
> Starting with Debian version 10 ("Buster"), Debian included working UEFI Secure Boot to make things easier.
Sounds plausible, but I don't know how seriously to take it, when that wiki page also includes very generous and regurgitated-sounding bits like:
> UEFI Secure Boot is not an attempt by Microsoft to lock Linux out of the PC market here; SB is a security measure to protect against malware during early system boot. Microsoft act as a Certification Authority (CA) for SB, and they will sign programs on behalf of other trusted organisations so that their programs will also run. There are certain identification requirements that organisations have to meet here, and code has to be audited for safety. But these are not too difficult to achieve.
I normally look to Debian to be relatively savvy about detecting and pushing back against questionable corporate maneuvers, but it's not perfectly on top of everything that goes on.
I've also seen Debian very responsive when I pointed out that a particular package was phoning home before consent given.
And one of the notable annoying parts of the Debian installer forever is when you think it's started a long unattended period of installing packages, but it soon pauses to ask you for opt-in to some package usage telemetry (so at least they're asking before doing it).
I definitely get the understaffed vibe from Debian, but I'm also still pleasantly surprised how well they execute in general.
Contrast with a certain commercial derivative -- which snoops, installs closed software without the user understanding that's that they're doing, pushes an IMHO horrible different package manager, is sloppier about regressions in security updates, etc.
I wish I had time to volunteer right now to scratch some of the itches I have with Debian, and very much appreciate all the work that others have done and are doing on it.
As a sidenote for having installed Debian with SecureBoot on on several systems, I'd say I still had to muck around quite some in the BIOS/UEFI. Latest one I scratched my hair for a bit was an AMD 3700X on an Asrock mobo where I somehow had to turn "CSM" (Compatibility Support Module) off otherwise Debian would stubbornly start the non-UEFI (and hence no SecureBoot) installer. On my Asus / AMD 7700X things were a bit easier but I still had to toggle some SecureBoot setting (from "custom" to "default" or the contrary, don't remember). All this to say: it's still not totally streamlined and users still need to muck around anyway.
I just want to specify the root of trust.
Even if you were to completely replace all of the signatures with your own, you are going to have to trust some of the MS/manufacturer ones (unless you replace all the manufacturer-signed firmware modules with your own).
... of which there might not be any. Eg none of my half-dozen SB-using systems (desktops and laptops) have anything in the ESP other than the booloader and UKIs I put there, and boot with my own keys just fine.
Afaiu, this key is specific to certain generations of Intel CPUs.
Depends of the legislation.
That's questionable in the US since the keys are 100% machine generated and thus not copyrightable.
In most of the EU, it's clear though, there's interobability exceptions and those keys can be shared freely.
How can you test the leaked key say to edit your bios, resign it, then reflash it?
According to the Twitter thread above, you would upload the original OEM firmware for your device to Binarly's web portal at https://fwhunt.run. The firmware file matching your device could be obtained from the OEM's website, rather than the running system. I haven't tried this myself, don't know if it requires unpacking or pre-processing the OEM firmware file format.
It seems safe, but I'd rather do that locally.
Obviously it isn't in everyone's skillset, but if you have the means there is nothing preventing you from generating and using your own key.
Honestly it seems like a good basic security precaution, not only to prevent against leaks like this, but also to counteract any backdoors (although kind of a moot point with chipmakers).
1. some EFIs are broken in ways that make using private platform keys hard or impossible
2. there are PCIe cards which need option ROMs to be executed (most commonly that dedicated GPUs), this ROMs are not always but often signed by one of the Microsoft Keys and removing it from the trust db will prevent the ROMs from running and lead to all kinds of problems, e.g. not having any video and in turn not being able to undo to EFI setting/disable secure boot. You can make sure the specific ROMs are whitelisted, but then you need to be very very careful about e.g. graphics drivers updating the GPU firmware and similar. And putting the right data in the trust db isn't easy either.
If you're using a TPM for Secure Boot, you can use the commands in https://github.com/Foxboron/sbctl/wiki/FAQ#option-rom to know for sure.
Most option ROMs are signed by the same set of Microsoft keys, You can make sure to enroll this keys alongside your custom platform key (e.g. the tool sbctl can do so for you). While this does tend to work it has one drawback which is if someone has that key they can break your secure boot chain, i.e. it weakens the benefits custom platform keys give you.
Option ROMs signed by vendor keys are somewhat rare, but sometimes (parts of) firmware update tools are signed by vendor keys, in which case you can choose between not updating your firmware, disabling secure boot while doing so or hoping you can find the (pub)keys for the keys they used somewhere on the internet.
In the end you probably want to see if someone already tried it and had success.
In many BIOSes were you can apparently remove all keys and the firmware still loads its own builtin components, that's because the manufacturer has put a backdoor so that their own components can always be loaded irregardless of Secure Boot state. (Otherwise users would be able to brick their own machines). MSI, for example, does this. And guess what: with these leaked keys, now anyone can claim to be a "manufacturer's own component". Secure Boot is useless.
You are going to tweak them again, and check down the line (ex: grub) that they match the hash you've stored, say inside you secureboot, or in your TPM
This should get you MORE security: before, you had to accept whatever the board manufacturer though it was ok (ex: any WWAN or WLAN cared with just these Ids). Now you can add more checks (just this serial or mac address) and refuse to boot.
Someone could do the same, but if you verify at the next level (ex: grub, etc) that you tweaks are present, you can refuse to boot if they aren't.
Give me a break.
For the sake of convenience we ended up with an inversion of control. There can still be a chain of trust. However the owner of the machine should be the root of the chain, not the vendor/manufacturer. the vendor should sign their firmware and the owner should authorize that sig on the machine.
>>In April, MSI fell victim to a cyberattack perpetrated by the ransomware group Money Message, who successfully infiltrated MSI’s internal systems and exfiltrated a staggering 1.5TB of data, predominantly comprising source code.<<
https://securityonline.info/intel-oem-private-key-leak-a-blo...
that's a lot of source code it makes my typing fingers tired just thinking of it
It's possible they could have written it if all 2,672 MSI employees typed this source code constantly in 8-hour shifts seven days a week for five years with no lunch break no restroom break and not allowed to think before typing.
If Intel Boot Guard works by including a public key in a fuse in all CPUs from a set of series and now the corresponding private key is leaked, why isn't this a global problem? The same CPU with the same public key must be in every machine with an Intel CPU from these generations. What am I missing here?
> The boot chain uses an RSA public key (its hash is hard-coded inside the CPU) and an OEM private key. The OEM sets the final configuration and writes it to one-time-programmable Intel chipset fuses during the manufacturing process, thus making it almost impossible for an attacker to modify the BIOS without knowing the private part of the OEM Root Key. However, because some OEMs might fail to properly configure Intel Boot Guard, attackers could end up injecting code and permanently modifying BIOS.
> At Black Hat 2017, security researcher Alex Matrosov presented some vulnerabilities in poor BIOS implementations, explaining that not all vendors enable the protections offered by modern hardware. Because of that, attackers could elevate privileges, bypass protections, and install rootkits, he explained.
Some HP business devices don't use Intel BootGuard, because HP has their own proprietary solution for firmware integrity verification, https://news.ycombinator.com/item?id=35845073
> The TPM's measurement can be subverted by an attacker who can re-flash the computer's firmware .. the attack .. can be defeated by having the initialization microcode hash the computer's firmware (specifically, the PEI code in UEFI) and communicate the hash to the TPM module. This is marketed as the Measured Boot feature of Intel's Boot Guard.
> Sadly, most computer manufacturers use Verified Boot (also known as "secure boot") instead of Measured Boot (also known as "trusted boot"). Verified Boot means that the processor's microcode only boots into PEI firmware that contains a signature produced by a key burned into the processor's e-fuses. Verified Boot does not impact the measurements stored on the TPM, so it does not improve the security.
On a related note, some HP devices have a dedicated security co-processor (SureStart) to verify and/or fix system firmware, instead of relying on a CPU vendor root-of-trust like Intel BootGuard. Since HP's proprietary security co-processor can be disabled by a device owner, those HP devices may be amenable to OSS firmware like coreboot.
2017 HP Labs research paper, https://ronny.chevalier.io/files/coprocessor-based-behavior-...
> We apply this approach to detect attacks targeting the System Management Mode (SMM), a highly privileged x86 execution mode executing firmware code at runtime .. We instrument two open-source firmware implementations: EDKII and coreboot. We evaluate the ability of our approach to detect state-of-the-art attacks and its runtime execution overhead by simulating an x86 system coupled with an ARM Cortex A5 co-processor.
2021 HP marketing whitepaper, https://www8.hp.com/h20195/v2/GetPDF.aspx/4AA7-6645ENW.pdf
> Every time the PC powers on, HP Sure Start automatically validates the integrity of the firmware to help ensure that the PC is safeguarded from malicious attacks. Once the PC is operational, runtime intrusion detection constantly monitors memory. In the case of an attack, the PC can self-heal using an isolated “golden copy” of the firmware in minutes.
For OS-specific measured boot of coreboot open-source firmware with a reproducible build, there would be a 1:1 mapping between the measured firmware hash and the coreboot source code revision used to generate the firmware.
Separately, the issue of firmware blobs (Intel FSP, AMD AGESA) would remain, although AMD OpenSIL is promising to reduce those binary blobs by 2026.
"To boot windows 69, you are now required to have a CPU with the newest Microsoft Chip, full of backdoors btw, but shhh" :p
Always self-sign the secure boot keys, do not use any third-party keys.
Unfortunately, this complicates the kernel & boot loader upgrade process as one shouldn’t keep private keys in the same machine.
Either you implement it with security features hidden from the device holder, in which case it will always be broken eventually, or you guarantee the capabilities with mathematics - in which case a security break cannot happen even if the physical machine's description is completely public.
There are certainly layers to this that I'm missing, but I think homomorphic compute is the only unbreakable answer to secure compute in general.
The issue here, of the key holder leaking the key, also seems impossible to work around in general, since the requirements are: 1) there exists someone who can sign code. 2) that person cannot screw up (e.g. leak the key) and allow the wrong code to be signed. These are pretty contradictory requirements, that no amount of crypto can fix. Ultimately it is a social problem not a technical one; there is no full technical definition of misusing a key. There are things that can help - like HSMs, splitting the key between multiple parties, having better methods of revoking and replacing compromised keys (hard without network access and an unwillingness to brick old devices). Not the same domain, but AACS is an interesting example of a system somewhat resiliant to key compromise.
Holomorphic encryption allows someone's interests to be secured. But I'm dubious that I'm the one who will actually benefit here.
Microsoft solved this problem on the latest Xbox. Many years after it was launched, it's still not jail-broken.
They are now working on bringing that technology to regular Windows/PCs - Pluton.
I've got an MS-7E07 which is in theory not affected, but who knows...
So, you need to do a manual BIOS update to fix it.