More information on Linux and the UEFI secure boot feature.
mjg59.dreamwidth.org
mjg59.dreamwidth.org
Hilariously, Microsoft's signing tool gets this wrong by also adding the contents of gaps between sections in direct contravention of their own specification. This is fine for binaries generated by Microsoft's toolchain because they don't have any gaps, but since our binaries do contain gaps[2] and since the standard firmware implementation[3] does implement the specification correctly, any Linux-generated binaries signed with the Microsoft tool fail validation. Go team. [2] Something that is, as far as we can tell, permitted by the PE-COFF specification [3] Written by Intel, not Microsoft
1) Build kernel
2) Generate key
3) Sign kernel with key
4) Install key in UEFI key manager
But the question I have is, what do we do with the key now? Is it kept on disk? If so, does that open up a new vector for attack? A Linux virus/worm that finds the signing key, generates a new hacked kernel, signs it, and then installs itself?I know that's a lot of steps, but then again, if a malevolent program gains root on a box, you can't really trust anything on it anymore. So I guess there isn't really anything too different about this approach, except that it may give you a false sense of security.
I'd hope that there could be some warning about booting a new kernel. Maybe something like "You are booting a new operating system 'OSName v3.1.021b' with fingerprint: AB AD C0 DE AA ..., do you wish to continue? Yes / No / Always: _ "
Hopefully, the spec will require that I can install a new key. If I'm going to the effort to generate a public/private keypair, I should really save the private key on, oh, a removable drive. Then on a separate removable drive (Matthew Garrett's suggestion) I create the UEFI bootable kernel and add the public key.
1. The BIOS asks me if I want to install the new public key on the removable drive - I say yes
2. I tell the BIOS to boot from the kernel on the removable drive
3. I install the kernel and OS to the internal drive
4. Each time I reboot, the BIOS already has the new key saved, so it accepts the kernel
5. If I build a new kernel and sign it with the same key, I can install it on the internal drive or on a removable drive, and the BIOS will boot it
But what I'm more worried about: "the growing threat of pre-OS malware". I'm a saavy nerd, but I don't really know what this means. I'm sure that I could Google it, but it feels like we've missed the boat on security: I don't need Fort Knox, but, even as a geek, I need something that isn't confusing and restrictive.
This has been a problem for 25+ years.
The other pre-OS-malware meaning is HDs and flash devices shipped with viruses on them.
But you will be able to turn it off if you know how to use a BIOS, unless your hardware vendor has disabled the ability to turn it off in order to reduce their support burden.
Although some PC vendors might not implement the proposal, you can say that of any proposal.
Very good proposal IMHO.
Deleted comment
Deleted comment
Validating the integrity of the operating system using code stored as part of the operating system doesn't buy you anything - a prospective virus writer would just make sure to patch that checking code as well. You need to check integrity from outside that sandbox for it to be meaningful.
While the bios code does run on the same CPU as everything else, the important part is that it runs first - and the correct way of handling the keystore is to prevent it from being written to once non-bios code has started executing.
I am an Airman at a secret facility in Nevada and want to install a new secure OS to experiment so I download this new OS and install to removable media and answer yes boot the alternative OS....
But the whole alternative OS was infected with virus as the new malware rootkit so now we have keyloggers on all computers controlling US drone fleets..
Pretty picture is it not?