Kernel lockdown vis-à-vis secure-boot
Kernel lockdown vis-à-vis secure-boot
Posted Apr 8, 2018 9:13 UTC (Sun) by darwish (guest, #102479)Parent article: Kernel lockdown locked out — for now
I've written a number of remote exploits (white-hat; merged in Metasploit), and the ability to modify the boot chain is not as easy as the lockdown authors claim. It might be much easier in the servers world due to extreme PC boot-protocol standardization, but it's hard as hell in the embedded world due to esoteric SoCs, unknown custom-built boot-loaders, and read-only storage.
In these cases, and even without secure-boot, basic kernel hardening features like disabling /dev/mem, /proc/<pid>/mem, /proc/kcore, etc. etc. are __invaluable__ in making the attackers life much harder -- even if they got execute access as UID 0.
Yes, with UID0 the attacker can create a kernel module to re-expose all that, but again this is embedded: (f)init_module() might be removed from the kernel. Even funnier: you might only have a root _shell_ access, but not pure uid 0 binary execution context; and then you find yourself with a busybox having wget and insmod removed ;-) You try to write your exploit ELF, byte by byte, using 'echo' to a tmpfs partition; on a lot of devices this will succeed, but others might have a brain-dead 'echo' version that does not support the necessary "-en" parameters, and so on.
So, honestly, Linus is __absolutely__ right:
"Because as long as the explanation is just some 'you must use secure boot or you've already lost and further security is pointless' hocus-pocus magical thinking, I immediately go 'no, that sounds completely bogus and it makes testing and coverage much worse, we've done other things quite like that without this secure boot tie-in'".
Posted Apr 8, 2018 17:00 UTC (Sun)
by bluca (subscriber, #118303)
[Link]
Posted Apr 9, 2018 0:22 UTC (Mon)
by nivedita76 (subscriber, #121790)
[Link] (4 responses)
embedded doesn't seem very relevant in any case, it's not going to have UEFI secure boot in any case. The argument is about whether you should turn lockdown on automatically if secure boot is enabled, which is really only a PC/x86 server thing for the most part.
Posted Apr 9, 2018 6:16 UTC (Mon)
by darwish (guest, #102479)
[Link]
Posted Apr 9, 2018 9:53 UTC (Mon)
by excors (subscriber, #95769)
[Link] (2 responses)
Posted Apr 9, 2018 11:01 UTC (Mon)
by kugel (subscriber, #70540)
[Link] (1 responses)
Posted Apr 10, 2018 13:12 UTC (Tue)
by arekm (guest, #4846)
[Link]
Kernel lockdown vis-à-vis secure-boot
Kernel lockdown vis-à-vis secure-boot
Kernel lockdown vis-à-vis secure-boot
Kernel lockdown vis-à-vis secure-boot
Kernel lockdown vis-à-vis secure-boot
Kernel lockdown vis-à-vis secure-boot
