V2R5 changes
Canonical Ubuntu 20.04 LTS SCAP Benchmark V2R5 (2025-08-27) replaced V2R4 (2025-05-16): 2 rules added, 4 updated. It has 111 rules, against 109 in V2R4.
V2R5 benchmarkV2R4 benchmark Compare V2R4 and V2R5 in SCAP Compare
- 2 added
- 0 removed
- 4 updated
Updated fields: Check text 4Discussion 1
Added in V2R5 (2)
Updated in V2R5 (4)
V-238204CAT IUbuntu operating systems when booted must require authentication upon booting into single-user and maintenance modes.Check text
Check text
AND
- /boot/grub/grub.cfg uses password_pbkdf2 for root
textfilecontent54_test (check: all, existence: all_exist)
object textfilecontent54_object: filepath equals "/boot/grub/grub.cfg"; pattern pattern match "^\\s*(password\\S*)\\s+root\\s+"; instance greater than or equal "1"
state textfilecontent54_state: subexpression equals "password_pbkdf2"
Run the following command to verify the encrypted password is set:
$ sudo 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.
V-238216CAT IIThe Ubuntu operating system must configure the SSH daemon to use Message Authentication Codes (MACs) employing FIPS 140-2 approved cryptographic hashes to prevent the unauthorized disclosure of information and/or detect changes to information during transmission.Check text
Check text
AND
- /etc/ssh/sshd_config:MACs == FIPS-approved message authentication codes
textfilecontent54_test (check: all, existence: at_least_one_exists)
object textfilecontent54_object: filepath equals "/etc/ssh/sshd_config"; pattern pattern match "^\\s*(?i)MACs(?-i)[ \\t]+\\\"?([\\w,-]+)\\\"?[\\s]*(?:|(?:#.*))?$"; instance greater than or equal "1"
state textfilecontent54_state: subexpression pattern match "^(hmac-sha2-512)|(hmac-sha2-512,hmac-sha2-256)|(hmac-sha2-256)$"
Verify the SSH daemon is configured to only use MACs that employ FIPS 140-2 approved ciphers with the following command:
$ sudo /usr/sbin/sshd -dd 2>&1 | awk '/filename/ {print $4}' | tr -d '\r' | tr '\n' ' ' | xargs sudo grep -iH '^\s*macs'
MACs hmac-sha2-512,hmac-sha2-256
If any ciphers other than "hmac-sha2-512" or "hmac-sha2-256" are listed, the order differs from the example above, or the returned line is commented out, this is a finding.
If conflicting results are returned, this is a finding.
V-238217CAT IIThe Ubuntu operating system must configure the SSH daemon to use FIPS 140-2 approved ciphers to prevent the unauthorized disclosure of information and/or detect changes to information during transmission.Check text
Check text
AND
- /etc/ssh/sshd_config:Ciphers == DoD-approved ciphers
textfilecontent54_test (check: all, existence: at_least_one_exists)
object textfilecontent54_object: filepath equals "/etc/ssh/sshd_config"; pattern pattern match "^\\s*(?i)Ciphers(?-i)[ \\t]+\\\"?([\\w,-]+)\\\"?[\\s]*(?:|(?:#.*))?$"; instance greater than or equal "1"
state textfilecontent54_state: subexpression pattern match "^(?:(aes256-ctr,aes192-ctr,aes128-ctr)|(aes256-ctr,aes192-ctr)|(aes256-ctr,aes128-ctr)|(aes192-ctr,aes128-ctr)|(aes256-ctr)|(aes192-ctr)|(aes128-ctr))$"
Verify the SSH daemon is configured to only implement FIPS-approved algorithms by running the following command:
$ sudo /usr/sbin/sshd -dd 2>&1 | awk '/filename/ {print $4}' | tr -d '\r' | tr '\n' ' ' | xargs sudo grep -iH '^\s*ciphers'
Ciphers aes256-ctr,aes192-ctr,aes128-ctr
If any ciphers other than "aes256-ctr", "aes192-ctr", or "aes128-ctr" are listed, the order differs from the example above, the "Ciphers" keyword is missing, or the returned line is commented out, this is a finding.
If conflicting results are returned, this is a finding.
V-238337CAT IIThe Ubuntu operating system must generate error messages that provide information necessary for corrective actions without revealing information that could be exploited by adversaries.Check text, Discussion
Check text
AND
- All files in /var/log except /var/log/btmp, /var/log/lastlog, and /var/log/wtmp are mode 640 or less permissive
file_test (check: all, existence: any_exist)
object file_object: filter equals "oval:mil.disa.stig.ubuntu2004unix:ste:2090323833705"; path equals "/var/log"; filename pattern match ".*"; behaviors equals ""
state file_state: gexec equals "false"; oread equals "false"; uexec equals "false"; sticky equals "false"; sgid equals "false"; suid equals "false"; oexec equals "false"; owrite equals "false"; gwrite equals "false"
Verify the Ubuntu operating system has all system log files under the "/var/log" directory with a permission set to "640" or less permissive by using the following command:
Note: The btmp, wtmp, and lastlog files are excluded. Refer to the Discussion for details.
$ sudo find /var/log -perm /137 ! -name '*[bw]tmp' ! -name '*lastlog' -type f -exec stat -c "%n %a" {} \;
If the command displays any output, this is a finding.
Note: If output regarding history.log or eipp.log.xz is displayed, this is not a finding.
Discussion
Any operating system providing too much information in error messages risks compromising the data and security of the structure, and contentorganizations ofmust error messages needs to be carefully consideredconsider by the organization.content
and
Organizations carefully consider the structure/content of error messages.
The extent to which information systems are able to identify and handle error conditions is guided by organizational policy and operational requirements. Information that could be exploited by adversaries includes, for example, erroneous logon attempts with passwords entered by mistake as the username, mission/business information that can be derived from (if not stated explicitly by) information recorded, and personal information, such as account numbers, socialSocial securitySecurity numbers, and credit card numbers.
The /var/log/btmp, /var/log/wtmp, and /var/log/lastlog files have group write and global read permissions to allow for the lastlog function to perform. Limiting the permissions beyond this configuration will result in the failure of functions that rely on the lastlog database.
How these changes are found
Rules are matched across the two benchmark releases by their STIG V-number. A rule counts as updated when its rule id changed and its title, severity, discussion, fix text or OVAL check logic changed — the same comparison SCAP Compare makes.
Comparing other releases, or this one against an older release? Pick any two in SCAP Compare.