194 points · by Foxboron · 3y ago · 149 comments
Most people who are building their own computer are not going to be an expert in UEFI and secure boot (some may have never even heard of these things). These people are almost guaranteed to need to install their own OS. So if they try, and it "doesn't work", they are going to need tech support or most likely return the motherboard as defective. Thus it makes more sense to make the default permissive.
On the other hand, someone who does want to run secure boot securely is probably an expert, so they can probably figure out how to actually turn it on and harden their setup. As long as you can lock stuff down, having these people jump through a few more hoops seems like a reasonable trade-off.
(Also FWIW, most pre-builts or integrated devices do have real secure boot enabled, since the expectation is that users of these will likely never need to install an OS that won't work with a strict secure boot enforcement policy.)
Great for game cheat developers for example, who often want very deep hooks on the system to bypass anti-cheat tooling and with some modern games requiring secure boot to be enabled, this could provide an interesting alternative strategy.
Since Windows will force secure boot, this is a very welcome convenience feature.
DRTM is a credible (sort of) alternative, but at that point Secure Boot isn’t really necessary — the whole point of DRTM is that you verify the current state of the system, not how it got there.
This means that even if Windows "checks" (via measured boot) that Secure Boot is on, they are still being lied to by the motherboard firmware.
Not only that, a popular tool for creating windows USB installers[1] fails to boot if secureboot is enabled. I looked into it a few years ago and it was because it defaults to NTFS formatting if install.wim is greater than 4GB (because of FAT32 limitations), which is most windows ISOs. Most UEFI implementations don't support NTFS, so it installs a shim loader, which is unsigned and therefore fails to boot with secureboot enabled.
https://github.com/pbatard/uefi-ntfs
Edit: https://old.reddit.com/r/sysadmin/comments/pl2jqg/creating_b... This is the last time I read anything about it from the Rufus dev (which was over a year ago)
1. Every computer I've used supports NTFS in its UEFI. I even thought it was standard. So simplest way to create a bootable USB stick: format it with GPT, create one big enough NTFS partition and copy ISO contents inside. That's it.
2. Converting install.wim to sub-4GB chunks is trivial one command. Create one big FAT32 partition, copy all but install.wim, convert install.wim with `dism` and copy it.
That's it. Much easier and faster than using some tool doing strange things with shim loaders and whatnot.
Linux sticks could be created exactly the same way. UEFI is awesome.
I've never seen a motherboard supporting anything else than FAT for an UEFI partition. What is likely happening is that you're booting using a small EFI System Partition (ESP) formatted in FAT32 which contains a bootloader with an NTFS driver.
It can get confusing because the EFI bootloader generally registers new boot entries for each non-ESP partition, but these are booting the ESP with the selected partition GUID.
I doubt people installing their OS will run into this. Even still, the firmware contains the ability to prompt the user about secure boot failures, so if you're going to neuter it, at least pick that as the default option so people notice.
Instead, my suspicion is that these policies are in place so non-OS firmware can run, such as firmware update tools for upgrading the BIOS itself or perhaps management chips/HDDs/SSDs/peripheral controllers. If I were to lock down my previous laptop with secure boot, HP's firmware updates would no longer be able to run without enrolling their signature keys.
I installed Fedora on a Thinkpad recently and it most definitely did not work OOTB. I had to enable the third party cert in the BIOS. Not sure about other vendors
People don’t read error messages. By this I don’t mean that no one ever in the history of the universe has, but rather that a high percentage will just contact tech support or RMA the board as broken. I can’t really blame mobo manufacturers from making the choice that minimizes tech support costs from consumers who won’t read and understand an error message.
Well that's... really dumb and shows why OEM's are terrible at security, as there isn't a reason I am aware of on why Secure Boot can't trust two keys simultaneously (one for OS and one for vendor). Heck, Microsoft themselves seems to do it with "Windows + 3rd Party UEFI CA."
It makes sense to use UEFI programs to update the UEFI, but secure boot adds a layer of complexity on top of that which requires taking special notice.
Hum... I can't recall a single person that brought a personal computer and then installed Windows on it on the last 2 decades.
That happens with corporate computers, sure. But sysadmins know how to enable secureboot.
Interesting bubble. 50% of the programmers I know installed Windows and the rest use prebuilts that came with Windows. Same 50/50 statistics for gamers in my bubble.
Any windows version after windows 10 isn't going to work nicely without extra process if you want to do a usb install. Because the ISO file already exceed FAT 32 4GB limit.
And DVD burner? Who still have them these days?
So most people will going to use one of these 3 party tools. And some of them will use an old version tool, fail, going into support queue.
1: This is what the media creation tool essentially does, but automatically: https://learn.microsoft.com/en-us/windows-hardware/manufactu...
You don't need to store the entire ISO file on the drive as a 4GiB+ file, as long as the contents can be extracted onto FAT32 the installer can be booted.
MSI's BIOS falsely reports to Windows that Secure Boot is enabled. This is very different from just shipping with Secure Boot disabled but available. That would be pretty normal (at least of a few years ago) - but shipping with a mode where it is "enabled," and Windows is convinced that it is "enabled," even though it is doing practically nothing - that's an inexcusable situation. Assuming that I interpreted this rather vague statement correctly, of course:
> When we enter the menu, we can see the disappointing default settings. It's doing no verification. It's useless. It's just there to satisfy Windows 11 requirements. OS has no idea that Secure Boot is doing nothing, it just knows that it's "enabled".
As he says, this would totally break UEFI Spec. Secure Boot being available but disabled is OK and common - Secure Boot being available and saying enabled while actually not checking is a violation.
EDIT: Actually... the author may be wrong and, counter-intuitively, it may not break spec. https://news.ycombinator.com/item?id=34407911
I have a brand new desktop and Windows just flat out says you can't install it when I'm sure it just involves changing some settings.
Windows 11 requires information from the BIOS that Secure Boot is available, not that it is enabled.
EDIT: I stand corrected. Windows 11 is OK with Secure Boot capable if you are upgrading from Windows 10, but requires enabled for a fresh install, though Secure Boot can be disabled after installation.
> While the requirement to upgrade a Windows 10 device to Windows 11 is only that the PC be Secure Boot capable by having UEFI/BIOS enabled, you may also consider enabling or turning Secure Boot on for better security.
https://support.microsoft.com/en-us/windows/windows-11-and-s...
Almost all major Linux distributions (i.e. the ones with an easy install disc image you write to a USB stick) use a signed bootloader, and shim or mok or another way to validate the boot chain - the installer will boot fine, and after install, the OS will boot fine, under secure boot.
Windows since 8.0 (?) has also shipped signed - installer and resulting install will both work.
Unless you're dealing with an edge case (i.e. you want to install a non-secure boot capable Linux OS, or BSD or something less common, which isn't using a signed loader), an end user should never really encounter secure boot issues in theory. That's not to say there shouldn't be an "off" switch; but that these days there are very few scenarios where an end user doing their own OS install will hit a secure boot failure.
The failure rate of motherboards is only ~3%, imagine adding an extra 1% on top...
(I know you're trying to make a point with the 1%, but _any_ reduction in support tickets by adjusting the secure boot default (which is essentially free) is going to be worth it to the manufacturer. )
And it’s there to disable if you don’t want it.
What's funny is that "Allow Execute" and "Query User" options are breaking UEFI specification
They're giving the user freedom, which the specification is against. IMHO they chose the right path. Willful disobedience applies to software too. My opinion of MSI just got a little better.
MSI did not add any of these features, they are available in EDK II. https://github.com/tianocore/edk2/blob/9ce09870e721efacc41fa...
It's been a sad state of affairs.
So it's not that some evil maid could replace the boot chain and update the firmware settings to make it behave as if nothing happened.
Just for those folks who use and want it.
And maybe also introduce a TOFU model i.e. "allow execute" but ask when the hash changes, so booting the same unsigned binary is OK but updates aren't silently allowed and require a quick confirmation (possibly with a timer for unattended reboots). Won't help against physical attacker but should help against a malware that manages to get root and tries to install itself into the boot chain.
Meanwhile, there is a really weird segment of "security people" that focus a whole lot about attestation and signatures and "secure boot" and the like but very little about what actually ends up breaking systems. Call it the Sony syndrome where you ship 15 layers of chainloaded bootloaders and security systems but don't bother updating the years old WebKit. Apple has it too, always money around for implementing another mitigation scheme in XNU but if you ask why nobody updated the outdated open-source PDF library embedded in their Objective C messaging program it's crickets.
Well, it's another level of sophistication, requiring some more investment?
Replacing a bootloader or a kernel (or initrd) and disabling Secure Boot is easy for just about anyone with 5-10 minutes access to a machine. A modified keyboard is less so.
Given that often physical access allows secure boot to be turned off, it’s clearly not made to protect against a physical attacker.
Now, what’s left is a bit of a mixture of a political issue and developer laziness that makes secure boot a binary toggle of on=boots only microsoft-sanctioned OSes and off.
Ideally there was a safe way for a user to get their own boot loader and OSes signed to allow them to safely boot their own OS while still being sure that it was the user‘s intention to boot that thing.
Ironically, walled-garden Apple went exactly there with their secure boot implementation on their Apple Silicon macs (source: https://social.treehouse.systems/@marcan/109679905123512668)
It helps if you remember the context in which Secure Boot was created. Back then, boot sector viruses and similar malware were common. The way they operated was by hooking the operating system while it was being loaded. The operating system (or software running on top of it, like anti-virus and other anti-malware stuff) could protect itself against something which loaded after the kernel and device drivers, but not against something which loaded before the operating system kernel itself.
That is: the main threat model Secure Boot protects against is boot sector viruses and similar. Even if some malware gets write access to the full raw disk, it still cannot inject itself before the kernel in the startup sequence.
At the time the Secure Boot was conceived, boot sector viruses were extinct by about a decade. What was new, was the VM* set of instructions, and the scare that there could be a new kind of boot sector viruses slash hypervisors, which could do a bad things to your computer. There was never such a virus in reality, only hypothesized.
Not really, Petya was in 2016.
(It's not to secure your computer -- that will remain a roach motel of unpatched exploits. But it will be a roach motel that runs Windows rather than something else).
They really cannot. Of course, this means you have to properly secure other knobs as well: Setup password, custom certificates (so a compromised Redmond certificate is irrelevant, configure your OS to use measured boot and abort on all changes, ...
This would mean: Secure Boot cannot be disabled; Software cannot be swapped out; DMA devices cannot be added.
If properly implemented, Secure Boot, a TPM and full-disk encryption will create a PC that cannot be internally compromised by regular thread actors. External additions (keyloggers and the like) are still possible of course.
Installing linux.
Yes yes you can disable it (for now), put your own keys (very unlikely) but if you do windows will not boot any longer, unless you also disable disk encryption before disabling it.
Do like rms and think long term. The feature is there to lock which software can run on the machine, and prevent the machine to be used to rip movies.
Secure Boot has always been an anti-feature, at least from the user's point of view. It seems really strange to complain your device isn't locked down enough by default: the restrictions can always be enabled manually if that's your kink.
It adds a DOS partition (!!!) to the disk, and prevents me from for example dual booting two versions of Debian on the same machine.
The whole thing has a bad smell of Microsoft around it, which translates to hidden motives (make it hard to not run Microsoft on this hardware) and insecurity (because they don't do "secure". They never did).
If you want "secure boot" - get hardware that support "legacy boot" and boot something else than Microsoft Windows ;)
It is a FAT32 partition; most DOS versions are unable to read it.
> prevents me from for example dual booting two versions of Debian on the same machine.
It doesn't; UEFI doesn't care what is the boot image, only that there is some. You can register as many boot targets as you want. Check efibootmgr in one of your debian instances, if your installer is not capable of doing that.
It absolutely does not.
This means that even if you setup FDE correctly (binding to say PCRs 0, 7, and 11), you would be able to bypass FDE using this MSI bug. For example, BitLocker binds to PCR 7.
You could get around this bug by sealing to PCR 4 (which contains the _hash_ of the bootloader). But then you have to redo FDE sealing every time your bootloader updates.
You can defend against the bad guy disabling SB in the UEFI settings by password locking the UEFI setup. I don't know how common it is but all the mobos I've used for home PCs have such an option. Of course whether mobo manufacturers implement password locking correctly is another matter.
Another line of defence is a chassis intrusion alarm to prevent the attacker from switching to alternate BIOSes and such, but those are normally only found in enterprise cases in my experience, and of course are not completely attacker-proof either.
It's the standard bike lock tradeoff - perfect security is unattainable so you just put more and more roadblocks in the attacker's way to deter them hoping that they give up and go for an easier target. Although, unlike a bike lock, someone attacking your PC is probably doing a targeted attack anyway.
Of course blocking execution is orthogonal to verifying the boot chain, but unfortunately those issues are conflated in the UEFI spec.
If instead the decision had been made to have the user set up some keys and authorize the OS, the process would have to be streamlined and easy.
In conclusion, signing your operating system is too hard, unless you are in the happy path where your OS is signed by Microsoft it is far easier to just disable the infernal subsystem as it gets in the way.
This is false.
The issue is that nobody has written user-friendly tooling to manage keys and sign stuff. Not that actually implementing this is hard.
https://www.cl.cam.ac.uk/~rja14/tcpa-faq.html
https://www.notcpa.org/about.html
Windows 11 and TPM are about locking down the PC and turning it into a mobile device.
What do you think MMO's and steam were for the last 23 years? There's been a war on local exe's and your file system, driver signing in hte windows 2000 and XP days was Microsoft and hardware vendors working out the bugs of moving us to encrpyted input output.
They are selling it as "trusted computing" but its all for enforcing software licenses so you can't access the files. That's what NTFS was for in reality, it was about the return of mainframe computing, that's why windows 10/11 is a client-server OS and why windows 10 has forced updates.
The whole thing is to turn the PC into a console where app developers can update the firmware/bios with new encrpytion keys if the exe's get cracked.
That was the whole point of Secure boot, it was first used in consoles and the same tech in phones.
Apple, google, and the entire industry has wanted to kill piracy and enforce copyright ruthlessy.
Ever notice the rental ad on Youtube? Google would like to turn files into bits of property you can sell via encrpytion and can't accesss.
The big lockdown is coming because they saw the profits of locked down computing devices.
So no Secure boot is about killing Win32 EXE's and moving us to win 3, with Denuo levels of protection on executables.
With Trusted computing microsoft can force update security policy over all EXE's with the new exectuable model and the mmo/steam generaiton enabled all this over the last 23+ years starting from 1997 with ultima online and everquest in 1999.
That's why basic features like multiplayer game hosting inside local apps (like quake 3 and Unreal tournament 2004) disappeared.
The whole point was to move us back to mainframe computing of the 60's with draconian copyright enforcement.
Pretty much. The mainframe security model used by desktop OSes is fundamentally broken.
A sane setup might not be using TPM because, e.g.: they don't need it.
I don't use TPM for FDE, just a passphrase. Using TPM means that if my motherboard dies, I can no longer access my disk. Far from ideal.
> a bad guy could easily disable secureboot inside bios settings
Can this be usually reconfigured without the firmware passphrase?
> use shim loader to bypass it.
They'd need to get it signed with the key trusted by the local firmware.
I'd have preferred this to what happened on my MSI MEG X570 Unify motherboard when I recently updated the BIOS and installed a TPM module - grub was prevented from loading up my debian system because secure-boot got activated by default. I had to hunt around and de-activate to continue using the system.
Might be better to disable it by default, though. Do other motherboards support this "feature"?
IIRC EVGA and Gigabyte have "Audit mode" option in their firmware, which does only logging.
Much better than the all or nothing model of secure boot.
Thanks, MSI.
For a motherboard I updated a week ago (B350 PC Mate) I did notice the following item in the changelog:
> - Change the default setting of Secure Boot.
So it was mentioned in the changelog, just very vaguely.
I applied an update with that changelog line recently and it definitely now turns Secure Boot on (presumably in this "non-enforcing" state mentioned in the article) by default when it previously didn't.
In the end I just disabled the secure boot all along. It's just broken and didn't work.