| name | cis-ubuntu2004-v300-1-4-1 |
| description | Ensure bootloader password is set |
| category | cis-storage |
| version | 3.0.0 |
| author | cyberstrike-official |
| tags | ["cis","ubuntu","linux","ubuntu-20.04","bootloader","grub","password"] |
| cis_id | 1.4.1 |
| cis_benchmark | CIS Ubuntu Linux 20.04 LTS Benchmark v3.0.0 |
| tech_stack | ["ubuntu","linux"] |
| cwe_ids | [] |
| chains_with | [] |
| prerequisites | [] |
| severity_boost | {} |
1.4.1 Ensure bootloader password is set (Automated)
Profile
- Level 1 - Server
- Level 1 - Workstation
Description
Setting the boot loader password will require that anyone rebooting the system must enter a password before being able to set command line boot parameters.
Rationale
Requiring a boot password upon execution of the boot loader will prevent an unauthorized user from entering boot parameters or changing the boot partition. This prevents users from weakening security (e.g. turning off AppArmor at boot time).
Impact
If password protection is enabled, only the designated superuser can edit a GRUB 2 menu item by pressing "e" or access the GRUB 2 command line by pressing "c".
If GRUB 2 is set up to boot automatically to a password-protected menu entry the user has no option to back out of the password prompt to select another menu entry. Holding the SHIFT key will not display the menu in this case. The user must enter the correct username and password. If unable to do so, the configuration files will have to be edited via a LiveCD or other means to fix the problem.
You can add --unrestricted to the menu entries to allow the system to boot without entering a password. A password will still be required to edit menu items.
More Information: https://help.ubuntu.com/community/Grub2/Passwords
Audit Procedure
Command Line
Run the following commands and verify output matches:
set superusers="<username>"
password_pbkdf2 <username> grub.pbkdf2.sha512
Expected Result
set superusers="<username>" should be present
password_pbkdf2 <username> grub.pbkdf2.sha512 should be present
Remediation
Command Line
Create an encrypted password with grub-mkpasswd-pbkdf2:
Enter password: <password>
Reenter password: <password>
PBKDF2 hash of your password is <encrypted-password>
Add the following into a custom configuration file: