8 ms·
I get the feeling UEFI can never be entirely secure with the set of functionality it offers and thus huge surface it is exposing. Call me crazy, but security m
by lizardactivist 5y ago
I get the feeling UEFI can never be entirely secure with the set of functionality it offers and thus huge surface it is exposing.
Call me crazy, but security means doing only what is necessary and no more, in particular in this early part of starting up a computer system.
- ______-_-______ 5y agoUEFI needs ~complete access to the machine so it can initialize hardware devices and pass control to the OS (which also has ~complete control of the hardware). How do you think sandboxing it would work, practically?
- profile53 5y agoWhat’s scary about UEFI is that it has both direct hardware access and a massive attack surface: GUI, Ethernet stack, occasionally an 802.11 stack, etc.
- blibble 5y agocustomers want to be able to boot their machines off the network this would be difficult without a network stack if you're so inclined: you can remove unneeded modules from your UEFI firmware
- bayindirh 5y ago> this would be difficult without a network stack This was possible with Ethernet cards with boot ROMs for more than two decades. Network booting via UEFI is nothing new, nothing revolutionary. I've been installing fleets of servers with PCI ethernet cards w/ boot ROMs a decade before. Token ring systems were booting from network two decades before.
- blibble 5y agowhat's the difference between having the code running in ring0 in a ROM vs the code running in ring0 from UEFI?
- bayindirh 5y agoWhen a boot ROM fires (it was via INT19 IIRC), the boot ROM runs, terminates and leaves the system. The size is smaller, it's not persistent, and it can't communicate with anything on the OS. When booted from the ROM, it just downloads pxelinux.0 binary in most cases, and transfers control to it, and just vanishes. The UEFI is persistently running at the background, has communication pipes with the OS (some of it is visible via /sys/firmware/efi), and has much larger surface like direct access to disks and network stack via drivers (it can directly read your files and work on them via proper FS driver modules). There's also at least one open source sound driver too (https://github.com/Goldfish64/AudioPkg https://github.com/Goldfish64/AudioPkg), so it can listen to your environment if it wants, at least in theory.
- blibble 5y ago> The UEFI is persistently running at the background, has communication pipes with the OS this isn't true, it ceases running once it transfers execution you're thinking of the SMM, which is something else entirely
- bonzini 5y agoSMM is also part of the firmware, it is set up by UEFI.
- blibble 5y agoyes, the UEFI initialises the machine such that it is in a state that it can boot that's it's job it's not the fault of the UEFI as a standard or implementation that your processor manufacturer chose to require the SMM to have its firmware loaded to boot the UEFI also isn't suddenly persistent because there are other devices inside the machine that had firmware loaded into them (would you say the UEFI is persistent because it uploaded new third-party supplied microcode into the CPU?)
- dijit 5y ago> if you're so inclined: you can remove unneeded modules from your UEFI firmware this is so disingenuous as to be offensive. I'm not saying you're wrong, but the practical options for replacing a UEFI BIOS are vanishingly small. Also: booting over the network is a feature of a smaller ROM on a network card, that ROM usually had a much smaller surface area and had to be explicitly called as a boot option. Given the people who care most about network boot are people running servers: IPMI/iDRAC/iLO are much stronger options for initiating network boot.
- blibble 5y ago> this is so disingenuous as to be offensive. > I'm not saying you're wrong, but the practical options for replacing a UEFI BIOS are vanishingly small. what? you can download a GUI editor, click remove on the modules you don't want and then save it https://www.trishtech.com/2017/12/uefitool-view-and-edit-uefi-firmware-for-motherboard/ https://www.trishtech.com/2017/12/uefitool-view-and-edit-uef... I've done it
- dataflow 5y agoDoes it not need a digital signature or something?
- dijit 5y agoCool tool, didn’t know it existed but there are so many variations on UEFI bios’s that I can’t help but feel it will not universally work, and it depends a lot on things being compartmentalised. I also draw your attention to: > UEFITool is only meant for the advanced users who have all the knowledge needed to modify the UEFI BIOS files. Because of you make any mistake and flash the faulty file to your motherboard, it can turn the motherboard into a dead brick. Which is more worrying when you look at what is presented (just a bunch of UUIDs). Not exactly usable for average person who wants to minimise the attack surface of their machine. Given that average people aren’t networking booting, wouldn’t it be wiser to have it enableable? Instead of on by default.
- lmz 5y ago
- Filligree 5y ago> if you're so inclined: you can remove unneeded modules from your UEFI firmware I’ll bite. How, concretely, do I do this? What’s the procedure to follow? How can I get the new BIOS image signed, so my motherboard will accept it?
- blibble 5y agothere are plenty of forums dedicated to this, here is a guide to do exactly what I described above: https://www.win-raid.com/t3061f16-Guide-How-to-extract-insert-replace-EFI-BIOS-modules-by-using-the-UEFITool.html https://www.win-raid.com/t3061f16-Guide-How-to-extract-inser... they don't need to be signed or you can dig through the manufacturers official documentation (often accessible behind NDA) don't blame me if you brick your hardware
- tomc1985 5y agoYou can boot to a stub OS on the system that can chainload whatever you want afterwards. This is how GRUB et al work.
- saghm 5y agoYeah, every time I have to update my bios over ethernet, I kind of just shudder internally. Downloading and flashing is a pain, but it still just feels wrong for some reason.
- m463 5y agoMany uefi systems do lots of "fun things" because they have network access. Take a look at ASUS motherboards, which has Armory Crate in UEFI. It will download and install software in your windows install. ...automatic bloatware from the bios.
- profile53 5y agoLenovo’s superfish was my favorite example of that
- khaledh 5y agoAs demonstrated by MoonBounce: https://securelist.com/moonbounce-the-dark-side-of-uefi-firmware/105468/ https://securelist.com/moonbounce-the-dark-side-of-uefi-firm...
- dmix 5y ago> Due to its emplacement on SPI flash which is located on the motherboard instead of the hard disk, the implant is capable of persisting in the system across disk formatting or replacement Lovely, so you’d have to reflash the firmware to fix it.
- bayindirh 5y agoWe've past this point with Intel ME, AMD's counterpart, and UEFI being an embedded OS which can run arbitrary binaries with free pass to everything on the system, almost ~10 years ago. The processors and the platform is so complex now, even with a secure UEFI, there are many points into the system both with add-on cards and your Ethernet port and bowels of the platform which has many controllers with Ring -1 (and deeper) access, where Ring 0 is the OS kernel level access.
- tomc1985 5y agoYeah I really don't understand why this crap needs to be so capable. You can already do all sorts of tricks with net booting, any HTTP stack needs can be deferred to run in the OS. I worked extensively with UEFI in a past job and every implementation I could find had large bugs of some kind. It is fine at booting the system but managing it is a nightmare, and it seems like UEFI prompt is designed to be as obtuse as possible. And I didn't even know it could do HTTP calls!