| name | cis-ubuntu2004-v300-5-3-3-4-3 |
| description | Ensure pam_unix includes a strong password hashing algorithm |
| category | cis-iam |
| version | 3.0.0 |
| author | cyberstrike-official |
| tags | ["cis","ubuntu","linux","ubuntu-20.04","pam","authentication"] |
| cis_id | 5.3.3.4.3 |
| cis_benchmark | CIS Ubuntu Linux 20.04 LTS Benchmark v3.0.0 |
| tech_stack | ["ubuntu","linux"] |
| cwe_ids | [] |
| chains_with | [] |
| prerequisites | [] |
| severity_boost | {} |
5.3.3.4.3 Ensure pam_unix includes a strong password hashing algorithm (Automated)
Profile Applicability
- Level 1 - Server
- Level 1 - Workstation
Description
A cryptographic hash function converts an arbitrary-length input into a fixed length output. Password hashing performs a one-way transformation of a password, turning the password into another string, called the hashed password.
The pam_unix module can be configured to use one of the following hashing algorithms for user's passwords:
md5 - When a user changes their password next, encrypt it with the MD5 algorithm.
bigcrypt - When a user changes their password next, encrypt it with the DEC C2 algorithm.
sha256 - When a user changes their password next, encrypt it with the SHA256 algorithm. The SHA256 algorithm must be supported by the crypt(3) function.
sha512 - When a user changes their password next, encrypt it with the SHA512 algorithm. The SHA512 algorithm must be supported by the crypt(3) function.
blowfish - When a user changes their password next, encrypt it with the blowfish algorithm. The blowfish algorithm must be supported by the crypt(3) function.
Rationale
The SHA-512 algorithm provides a stronger hash than other algorithms used for password hash generation. A stronger hash provides additional protection to the system by increasing the level of effort needed for an attacker to successfully determine local user passwords.
Note: These changes only apply to the local system.
Audit Procedure
Command Line
Run the following command to verify that a strong password hashing algorithm is set on the pam_unix.so module:
Expected Result
Output should be similar to:
/etc/pam.d/common-password:password [success=1 default=ignore] pam_unix.so obscure use_authtok try_first_pass yescrypt
Verify that the line(s) includes sha512.
Note: yescrypt will be acceptable - IF - it becomes supported.