Vulnerability Discussion
To mitigate the risk of unauthorized access to sensitive information by entities that have been issued certificates by DoD-approved PKIs, all DoD systems (e.g., web servers and web portals) must be properly configured to incorporate access control methods that do not rely solely on the possession of a certificate for access. Successful authentication must not automatically give an entity access to an asset or security boundary. Authorization procedures and controls must be implemented to ensure each authenticated entity also has a validated and current authorization. Authorization is the process of determining whether an entity, once authenticated, is permitted to access a specific asset. Information systems use access control policies and enforcement mechanisms to implement this requirement.
Access control policies include: identity-based policies, role-based policies, and attribute-based policies. Access enforcement mechanisms include: access control lists, access control matrices, and cryptography. These policies and mechanisms must be employed by the application to control access between users (or processes acting on behalf of users) and objects (e.g., devices, files, records, processes, programs, and domains) in the information system.
Check
Verify that an encrypted root password is set. This is only applicable on systems that use a basic Input/Output System BIOS.
Run the following command to verify the encrypted password is set:
$ grep –i password /boot/grub/grub.cfg
password_pbkdf2 root grub.pbkdf2.sha512.10000.MFU48934NJA87HF8NSD34493GDHF84NG
If the root password entry does not begin with “password_pbkdf2”, this is a finding.
Fix
Configure the system to require a password for authentication upon booting into single-user and maintenance modes.
Generate an encrypted (grub) password for root with the following command:
$ grub-mkpasswd-pbkdf2
Enter Password:
Reenter Password:
PBKDF2 hash of your password is grub.pbkdf2.sha512.10000.MFU48934NJD84NF8NSD39993JDHF84NG
Using the hash from the output, modify the "/etc/grub.d/40_custom" file with the following command to add a boot password:
$ sudo sed -i '$i set superusers=\"root\"\npassword_pbkdf2 root ' /etc/grub.d/40_custom
where is the hash generated by grub-mkpasswd-pbdkf2 command.
Configure grub to only require a password when accessing the bootloader:
$ sudo sed -i -E 's/^CLASS="[^"]*/& --unrestricted/' /etc/grub.d/10_linux
Generate an updated "grub.conf" file with the new password by using the following command:
$ update-grub