Back to 28: Grub2 Authentication 0-Day
hmarco.org
hmarco.org
the details of this are amazing. by pressing backspace you overflow a variable, which overwrites the return address with zero & jumps
the code at address zero Just Happens to be a valid self-modifying loop (!) that also Just Happens to jump somewhere into grub_rescue()
The only place where a bootloader can defend is when it's on a virtual environment and the user can interact, but even then, if the user is interacting during grub startup, they probably have root access as it is.
You can have physical protection, like locks. And you can disable boot sources. So of course this password protection can make attacks much more difficult.
You don't have to be physically in front of the machine to access the bootloader. You could be controlling a physical machine via KVMoIP and/or as you mention it could be a virtual machine to which you similarly have pre-boot control.
In both cases it would take at least one other exploit to get into the position where you could consider using this one, and maybe that exploit gives you full access anyway, but even though it is unlikely that this is going to be actually useful to attackers it is possible this it could play a role in a chain of exploits culminating in an effective attack.
When the screen is locked with password, if I hold ENTER after some
seconds the screen freezes and the lock screen crashes. After that I
have the computer fully unlocked.So on any of my PCs, you could just press F10 to get access to the grub rescue shell.
I think that bios/uefi passwords and disk encryption are much more commonly used to prevent unauthorized access to an intruder with physical access to the computer when it boots.
Time to start fuzzing other bootloaders.