18 ms·
NSA Technical Report on UEFI Secure Boot Customization [pdf]
- boomboomsubban 6y ago"Technical report" meaning "guide created for government system admins." It's crazy that the NSA cybersecurity mission seems so similar to one of a thousand generic tech how-to blogs.
- ganzuul 6y agoIt's their charter to do this kind of work. They should be working on defense, not offense.
- airstrike 6y agoYou know what they say about the best defense...
- 082349872349872 6y agoThat's obviously true of ball games. With swords, it's not only possible, but common, for two parties on offense to lose simultaneously. I would guess "offense" in the digital domain to be even less of a rivalrous good than in the analogue.
- waihtis 6y agoWhy should they not be on the offensive also? Wouldn’t it be a bit naive to think that the US would sustain from offensive cyber ops, when the other major world powers actively do so?
- saagarjha 6y agoWe already know they’re on the offense, so much so that if you asked any random American on the street what the NSA did their response would likely be “spying on me/other countries/terrorists”. Very few people know that the NSA is expected to (and sometimes does) spend its effort on defensive measures, and it would be a good idea for the agency to improve this record.
- samoa42 6y ago> Wouldn’t it be a bit naive to think that the US would sustain from offensive cyber ops you mean 'abstain'? and no, it would be responsible to abstaint because offensive cyber relies on knowledge of vulnerabilities in software and hence creates a incentive to not fix them which in turn weakens security for everyone.
- DarthGhandi 6y agoWould you extend that to bioweapons and depleted uranium munitions that are well documentated to have caused tens of thousands of birth defects in innocent children? X terrorist does it, so why can't the US right? Is this line in the sand really drawn at cyber? And does cyber not kill people in meatspace? Last I looked you drone strike weddings based on metadata. https://www.globalresearch.ca/horrors-of-war-us-uk-munitions-cause-birth-defects-in-iraq/5308406 https://www.globalresearch.ca/horrors-of-war-us-uk-munitions...
- ganzuul 6y agoYou could still read their charter online 10 or so years ago. Their mission was defense. Today they have replaced it with "Mission & Values" which they define without any immediately apparent legal basis.
- meowface 6y agoI believe the organization is silo'd into defensive and offensive sub-organizations. My blind guess is the defensive side is pretty separate from the rest of what's going on (any intelligence agency naturally tries to compartmentalize as much as possible). I wouldn't be surprised if there's internal politics where the defensive side may want to release a security advisory or other defensive guidance but the offensive side blocks them due to wanting to hoard something as a potential weapon in the arsenal. And I'm very likely in the minority of HN on this one, but I think this is generally probably fine and warranted. That kind of hoarding is exactly what I would expect and want them to do, as opposed to the warrantless domestic dragnet surveillance I don't want them doing. If you're in a non-stop ever-changing arms race, you want every edge you can get, as long as there's a carefully considered cost-benefit analysis (which they likely at least attempt to perform).
- robin_reala 6y agoThis was the same in the UK: GHCQ had offensive and defensive arms. But they’ve since officially split; the defensive role is now taken by NCSC. Having said that, GCHQ is still its parent organisation and I have no doubt that they maintain strong ties.
- boomboomsubban 6y agoFrom what various related sources have said, the defense budget is miniscule compared to the offense one. I get the feeling anyone on the defense team is someone unlikely to try and oppose what else is going on >That kind of hoarding is exactly what I would expect and want them to do, as opposed to the warrantless domestic dragnet surveillance I don't want them doing Why do you think they aren't collecting these exploits for more domestic surveillance?
- meowface 6y ago>Why do you think they aren't collecting these exploits for more domestic surveillance? They may very well be. But, first, because a 0-day in Microsoft Word or something isn't really helpful for spying on hundreds of millions of people; it's for rare, highly targeted spear phishing and other kinds of very precisely-aimed operations, and I think that's the type of stuff they generally discover and/or are given/sold In theory some kind of major flaw in TLS or networking equipment could enable it, but the latter is risky to be doing all the time (dragnet implies constant surveillance), and the former is as well unless it can be done purely from passive observation of traffic, and I think such a critical vulnerability in modern TLS requiring no active interference (e.g. not Heartbleed) is fairly unlikely and rare - though of course definitely not impossible. Also, I think after all the leaks and recent high-ranking court rulings, it's just not very tenable for them to keep that going as it existed before. Even if only due to future leaks and backlash. Plus, PRISM and XKEYSCORE are cool and have rad cyberpunk codenames and stuff, but from what I can tell the actual valuable, actionable intelligence they got out of it wasn't worth even 1% of what they put into it, due to having so much raw data to deal with. Trying to filter the signal out of the noise is like a needle in a galaxy-sized haystack. Future ML and other software developments could maybe make finding the needle, but it'll always be a very technically challenging problem. And now that there's a precedent of leaking, there's a higher risk that a future dragnet surveillance program might get exposed by people who otherwise wouldn't have exposed different programs. "Vacuum everything, ask questions later" / "collect them all and let God sort them out" just seems technically, politically, legally, and practically not worth continuing. I'd also like to think some percentage of employees have probably been swayed and now morally oppose it, even if they wouldn't say it openly. And, finally, I actually don't personally care much about being caught in that dragnet myself, so the thought of it doesn't really bother me. I work in infosec and am very privacy-conscious, too, to the point of some friends thinking I'm paranoid - I've just been in enough positions to know that it's like being the Earth: you feel important, but relative to the universe you're so small you might as well not exist. My threat model and risk profile is just very different. However, it's of course unconstitutional and unethical, and the fact that many other people feel very violated by it is more than enough reason for me to oppose it, even if it's more on abstract, philosophical grounds.
- ExcavateGrandMa 6y agoThe trick into that... Is that you cannot know if your technology is secure or not, because it needs testingz... And they knowz they are far away to master things (into the wild) :)
- batsigner 6y agoWhat do you expect? That they're going to publish guides on how to break into Windows Vista servers?
- raxxorrax 6y agoTPM should still be scrutinized in my opinion. It is mainly used to bind licenses to hardware. The keys act as a identifiable serial number. Yes, it is possible to shield against third party manipulation and there are some cryptographic benefits, but not in any practical sense. Not supporting it can even be a security boon, spies probably would have incentives to not use it. So I think it is fair to stay critical if the NSA supports unique identifiers for hardware.
- thudson 6y agoThe TPM is not a DRM enforcement mechanism if you set it up for your own use. It is a very useful tool for taking control of machine that you own - it provides a way to prove* to yourself that the system booting with the firmware that you've approved, in the configuration that you setup, and running the kernel and initrd that you've signed. https://safeboot.dev/attestation/#i-thought-remote-attestation-and-tpms-were-only-for-drm https://safeboot.dev/attestation/#i-thought-remote-attestati... *: Depending on your threat model and risks, some of which are discussed here https://safeboot.dev/threats/ https://safeboot.dev/threats/
- raxxorrax 6y agoNo it is not, but I am fairly sure that is one of the main use cases. And you have a uniquely identifiable machine which creates new security problems. We also know from smartphones that manufacturers can indeed be motivated to lock bootloaders. I think the main reason we don't have that on PC is that there are still multiple manufacturers and legacy considerations. Aside from that it remains true: https://ieeexplore.ieee.org/document/5283799 https://ieeexplore.ieee.org/document/5283799 I cannot read the minds of Microsoft, but I have my assumptions that I believe are quite safe. https://trustedcomputinggroup.org/ https://trustedcomputinggroup.org/ has rebranded themselves because they got a bad name. Justified in my opinion. People have identified the motivation on day one. But again, yes, it can have some security advantages against the numerous disadvantages. I think it is bad for open computing overall. There are certainly mechanisms to secure your OS that don't rely on TPM. It may benefit you, but I would actually like to see it removed from my machine with all the consequences (which would be not being able to play DRM protected media).
- mhh__ 6y agoEven the CIA's leaked internal PowerPoints look fairly similar to what you'd get in the valley, for the most part. The budgets big but - especially for defensive operation - it's the same kind of thing most other people do in that sector. For offensive work, then the motto (of one of the NRO's satellites) comes to mind: Doing god's work with other people's money. Everything is tapped, we should assume at least a proportion of what we take for granted now is unsafe. It's unlikely they'll have broken any big fry protocols or schemes but planting a backdoor is trivial for them (if you can manipulate the entropy on 10% of computers so you should be able to crack it 10 years, think of all the kids you could save!).
- ThisIsTheWay 6y ago> the motto (of one of the NRO's satellites) comes to mind: Doing god's work with other people's money. This was not an NRO mission patch, but one for the Air Force Rapid Capabilities Office. https://www.theatlantic.com/politics/archive/2012/02/youre-mad-about-wrong-part-doing-gods-work-other-peoples-money/332049/ https://www.theatlantic.com/politics/archive/2012/02/youre-m...
- kube-system 6y agoOf course it's the same. Their offices are full of the same boring Dells that you'd find in any other office. Best practices are best practices anywhere.
- thudson 6y agoThis NSA report is a wonderfully thorough guide to configuring UEFI Secure Boot, although it is another example of how unusable security tools can be. This conplexity was my motivation for writing the safeboot[1] scripts, which wrap all of the signing key management, TPM key sealing, and attestation into a hopefully easier to use package. 1: https://safeboot.dev/ https://safeboot.dev/
- ComodoHacker 6y agoThank you! Please update your main page title, so a quick-made bookmark remains searchable when needed.
- strstr 6y agoIt’s cool to see other uses of the TPM in the wild! My coworkers and I maintain go-tpm-tools[0] for trying to make using the tpm straightforward. [0] https://github.com/google/go-tpm-tools https://github.com/google/go-tpm-tools.
- mjg59 6y ago(additional plug) portions of which are used to enable github.com/google/go-attestation, which aims to make it practical for verification of system boot state in a heterogeneous environment and is now being actively used inside Google.
- nextgens 6y agoIt's amazing that you disregard the most basic attack in your threat model (https://safeboot.dev/threats/ https://safeboot.dev/threats/): going after the TPM itself. TPMs are usually FIPS 140-2 L2: not something that's meant to be hardened against even basic hardware attacks. IMHO the TPM should be a required piece but not the only piece of the puzzle. If I loose my laptop, I don't want the goods to be protected exclusively by a key that's trivial to recover from it (stored in something that's not a secure-element). I've covered it in a talk I gave at 44con: https://www.youtube.com/watch?v=YZTWjLTz4AE https://www.youtube.com/watch?v=YZTWjLTz4AE tl;dr; Use the TPM (and potentially other technologies like SGX) as part of your KDF to strengthen PIN/passphrase that the user provides. This breaks the asymmetry of offline attacks (attacker will always be bound by TPM/SGX-speed). Do NOT give it the only key required to decrypt your data.
- moonchild 6y agoI said this last time the topic came up, and I'll say it again: secure boot should not be trusted. Fortunately, there's an easy alternative if you want to protect against evil maid attacks: use full disc encryption and keep the bootloader (and key) on a usb drive on your person.
- cookiengineer 6y agoWhat most people don't understand is that secureboot means trusting a foreign overseas company with financial motivations. And additionally trusting them even with the possibility for a NSL that very likely was sent to them in the past already and means they probably have an automated pipeline for handing over the keys to federal institutions. I'd never trust any OEM BIOS with anything. Just as I won't trust Intel ME.
- bawolff 6y agoThen you don't trust anything. Or are you literally replacing all OEM firmware, using purely open hardware. Using purely open source firmware. Verifying the firmware you have corresponds to the sources you have. Verifying that there is no additional secret firmware you don't know about, verifying that the hardware you have actually corresponds to the open hardware specs you have, etc. i.e. Doing an insane amount of steps that are so impractical, you might as well make your own computer starting from first principles.
- cookiengineer 6y agoI totally agree with you there that most things are super unpractical and impossible to realize for end-users (or even engineers). What you can do though is trying your best that you can influence with your own skillset. I would never claim that any device is secure (heck, eversince BadUSB not even my power transformator is) but I'd have a better feeling when using coreboot that I configured, built and flashed via my CH341a adapter instead of an OEM SeaBIOS, for example. I mean, software is my skillset. Software I can influence. Hardware: not so much. I don't know whether there are government-level exploits available for coreboot or libreboot, but I think that's the level of security where we can just dump our hardware into the trash anyways. Additionally I don't have the skillset of verifying that a RISC-V chipset is really open, verified or secure. Therefore I would have to trust somebody else to do it, which might become the centralized point where the red tape fails for all of us. When it comes to open hardware, mntmn [1] got pretty far already. Even though I personally think that the touchpad is still unusable in terms of modern UX. But I really admire them for what they do, and that they do not compromise on their core principles. [1] https://github.com/mntmn https://github.com/mntmn
- transfire 6y agoDoes secure boot matter if you never turn the computer off?
- fsflover 6y agoAnd you never update your kernel? Ans you never ever have downtime?
- raxxorrax 6y agoNo. You can also turn of secure boot and I would recommend it. It is mostly a scam and was probably introduced to try to lock down PCs like mobile devices. Microsoft being the usual offender here. Security benefits are questionable. There is no scenario where non-technical users boot into a malignant OS. They open mails with strange attachments. The security analysis leading to this initiative is some kind of fantasy novel.
- hvdijk 6y ago> There is no scenario where non-technical users boot into a malignant OS. According to the report there is, and I believe the report is correct, when the "malignant OS" is not actually a full OS, but rather a rootkit. This rootkit might have been the result of a non-technical user opening a mail with a strange attachment.
- raxxorrax 6y agoRight, there are such scenarios, but it comes with disadvantages that are also relevant to security, to a larger degree in my opinion, and the mechanism is not excluding every form of rootkit. If you open a malignant attachment and execute it, there is just so much you can do.
- shawnz 6y agoThere are no security disadvantages that come with enabling Secure Boot. Doing so doesn't give anyone any additional control over your workstation.
- Foxboron 6y agoMuch like Trammell I have been annoyed by the complexity of the current secure boot tooling ecosystem. This has lead me to a 2500 long UEFI specification and written some tooling from scratch. sbctl is essentially a secure boot key manager. It enrolls keys and ensures the relevant files are signed on your system. It works fine and I use it day-to-day these days, but it lacks several nice UX features. https://github.com/Foxboron/sbctl https://github.com/Foxboron/sbctl The second thing I did was reimplement the UEFI API portion in native Go code from scratch. It currently is feature comparable to sbsigntools, but in pure Go. The top-level API is not completely nailed and It lacks some granularity, but I have written several test tools that replicates the sbsigntools binaries. https://github.com/Foxboron/goefi https://github.com/Foxboron/goefi I think more development in these area can help make Secure Boot as accessible as full disk encryption is these days.
- wing-_-nuts 6y agoCan someone ELI5 what secure boot does? Does it just prevent malware from overwriting the MBR? I turned it off on my most recent install, even though I still use full disk encryption. Had some issues with VirtualBox VMs that indicated secureboot might have been the cause.
- aaronmdjones 6y agoUEFI Secure Boot only applies to UEFI booting. So if you're booting via an MBR (courtesy of a UEFI Compatibility Support Module) then Secure Boot won't help you. You need to turn the CSM off for any decent booting guarantees, and then MBRs are ignored and malware overwriting an MBR is of no consequence -- it won't even stop the machine from booting if it zeroes it out completely [1]. The purpose of Secure Boot is to verify that the binaries (e.g. bootloader) that the firmware is executing from your EFI System Partition (Yes, UEFI systems are aware of both partitions and filesystems, unlike BIOS systems) are digitally signed with a key in its database. Likewise, those binaries are themselves supposed to verify that the things they're loading (e.g. kernels) are signed with a trusted key, which can either be a key built into the Secure Boot database, or a key built into the bootloader (where changing such a key would invalidate the signature on the bootloader itself). If you're running Linux, you can even eschew a bootloader entirely, by building the kernel itself as an EFI binary and relying on the UEFI Boot Manager to load it directly. This is called EFI stub mode, and is still compatible with Secure Boot if you sign the kernel binary yourself, with a key that you provision into the database. This is how my NAS boots. Note that nothing here implies any sort of encryption. Whether you use disk encryption or not is independent of whether you use Secure Boot or not -- Secure Boot does not require, or even provide, any disk encryption services. Something like Microsoft's BitLocker can use a TPM to store the decryption key, and Windows will not require that UEFI Secure Boot is enabled to do this. However, changing the system firmware settings after the fact (e.g. turning Secure Boot on or off) will make the TPM (correctly) refuse to divulge the disk encryption key you've sealed into it during BitLocker setup, rendering the machine unbootable again until you either (a) undo your configuration change or (b) enter your BitLocker recovery code and set up BitLocker all over again. [1] Speaking only of the bootloader portion, which is the first 440-ish bytes. The disk identifier and partition table is in the rest of the first 512 bytes, but on a UEFI system booting in UEFI mode, there is (usually) only a single "partition" in the table here anyway: a protective MBR containing a single whole-disk GPT. The actual GPT with the real list of partitions follows after. Implementations differ on whether they actually require a protective MS-DOS partition table, so a GPT-only disk (no protective MBR) could be bootable on some systems anyway.
- OminousWeapons 6y agoThis guide does a good job of discussing Secure Boot, but what I've always been curious about is the feasibility of enrolling my LUKS key in the TPM in order to roll my own Bitlocker. I've seen a few guides on this but I'm hesitant to mess around with my encryption key on my everyday systems. Has anyone successfully done this along with Secure Boot and if so can they point me to the guide they used?
- thudson 6y agoIf you want LUKS encryption with signed policies to prevent brittle PCRs, rollback prevention with monotonic counters, and user pin to prevent dictionary attacks, plus TPM sealed TOTP to attest to the state of the firmware: https://safeboot.dev/ https://safeboot.dev/
- ARandomerDude 6y agoThe header and footer remind me of the limitless budgets government agencies have. Nobody in the private sector would put that much color on a print-ready security document for wide distribution.
- HashingtheCode 6y agoVery nice of the NSA to provide. BTW, anyone who downloaded this pdf has voluntarily provided their IP address to them
- alhirzel 6y agoI think it's pretty cool that Linus Torvalds is the only name in this document (edit: other than the references section).
- Snawoot 6y agoI'm author of project which addresses concerns from report for Linux systems: https://github.com/Snawoot/linux-secureboot-kit https://github.com/Snawoot/linux-secureboot-kit It performs bootchain hardening, eliminating any vendor secureboot certificate and replacing with own. Entire bootchain gets signed, including ramdrive and grub configs.