Select any old version/release of this SCAP to view the previous requirements
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 <hash>' /etc/grub.d/40_custom where <hash> 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
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 <hash>' /etc/grub.d/40_custom where <hash> 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: $ grub-mkconfig -o /boot/efi/EFI/ubuntu/grub.cfg
Configure the Ubuntu operating system to produce audit records at system startup. Edit /etc/default/grub file and add "audit=1" to the GRUB_CMDLINE_LINUX option. To update the grub config file run, sudo update-grub
Configure the system to run in FIPS mode. Add "fips=1" to the kernel parameter during the Ubuntu operating systems install. Enabling a FIPS mode on a pre-existing system involves a number of modifications to the Ubuntu operating system. Refer to the Ubuntu Server 18.04 FIPS 140-2 security policy document for instructions. A subscription to the "Ubuntu Pro" plan is required to obtain the FIPS Kernel cryptographic modules and enable FIPS.
Configure Advance package Tool (APT) to prevent the installation of patches, service packs, device drivers, or Ubuntu operating system components without verification they have been digitally signed using a certificate that is recognized and approved by the organization. Remove/Update any APT configuration file that contain the variable "AllowUnauthenticated" to "false", or remove "AllowUnauthenticated" entirely from each file. Below is an example of setting the "AllowUnauthenticated" variable to "false": APT::Get::AllowUnauthenticated "false";
Configure APT to remove all software components after updated versions have been installed. Add or updated the following options to the "/etc/apt/apt.conf.d/50unattended-upgrades" file: Unattended-Upgrade::Remove-Unused-Dependencies "true"; Unattended-Upgrade::Remove-Unused-Kernel-Packages "true";
Configure the Ubuntu operating system to disable non-essential capabilities by removing the Network Information Service (NIS) package from the system with the following command: # sudo apt-get remove nis
Configure the Ubuntu operating system to disable non-essential capabilities by removing the rsh-server package from the system with the following command: # sudo apt-get remove rsh-server
Configure the log service to collect failure events. Install the log service (if the log service is not already installed) with the following command: # sudo apt-get install rsyslog Enable the log service with the following command: # sudo systemctl enable rsyslog Restart the log service with the following command: # sudo systemctl restart rsyslog
Install the Uncomplicated Firewall by using the following command: # sudo apt-get install ufw
Configure the Ubuntu operating system to enforce a delay of at least 4 seconds between logon prompts following a failed logon attempt. Edit the file "/etc/pam.d/common-auth" and set the parameter "pam_faildelay" to a value of 4000000 or greater: auth required pam_faildelay.so delay=4000000
Configure the Ubuntu operating system to provide users with feedback on when account accesses last occurred by setting the required configuration options in "/etc/pam.d/postlogin-ac". Add the following line to the top of "/etc/pam.d/login": session required pam_lastlog.so showfailed
Configure the Ubuntu operating system to utilize the "pam_faillock" module. Edit the /etc/pam.d/common-auth file. Add the following lines below the "auth" definition for pam_unix.so: auth [default=die] pam_faillock.so authfail auth sufficient pam_faillock.so authsucc Configure the "pam_faillock" module to use the following options: Edit the /etc/security/faillock.conf file and add/update the following keywords and values: audit silent deny = 3 fail_interval = 900 unlock_time = 0
Add or update the "/etc/security/pwquality.conf" file to contain the "ucredit" parameter: ucredit=-1
Add or update the "/etc/security/pwquality.conf" file to contain the "lcredit" parameter: lcredit=-1
Configure the Ubuntu operating system to enforce password complexity by requiring that at least one numeric character be used. Add or update the "/etc/security/pwquality.conf" file to contain the "dcredit" parameter: dcredit=-1
Configure the Ubuntu operating system to require the change of at least 8 characters when passwords are changed. Add or update the "/etc/security/pwquality.conf" file to include the "difok=8" parameter: difok=8
Configure the Ubuntu operating system to encrypt all stored passwords. Edit/Modify the following line in the "/etc/login.defs" file and set "ENCRYPT_METHOD" to SHA512. ENCRYPT_METHOD SHA512
Remove the telnet package from the Ubuntu operating system by running the following command: # sudo apt-get remove telnetd
Configure the Ubuntu operating system to enforce a 24 hours/1 day minimum password lifetime. Add, or modify the following line in the "/etc/login.defs" file: PASS_MIN_DAYS 1
Configure the Ubuntu operating system to enforce a 60-day maximum password lifetime. Add, or modify the following line in the "/etc/login.defs" file: PASS_MAX_DAYS 60
Configure the Ubuntu operating system to enforce a minimum 15-character password length. Add, or modify the "minlen" parameter value to the "/etc/security/pwquality.conf" file: minlen=15
Configure the Ubuntu operating system to prevent the use of dictionary words for passwords. Add or update the following line in the "/etc/security/pwquality.conf" file to include the "dictcheck=1" parameter: dictcheck=1
Remove any occurrence of "NOPASSWD" or "!authenticate" found in "/etc/sudoers" file or files in the /etc/sudoers.d directory.
Configure the operating system to use "pwquality" to enforce password complexity rules. Install the pam_pwquality package by using the following command: # apt-get install libpam-pwquality -y Add the following line to "/etc/security/pwquality.conf" (or modify the line to have the required value): enforcing = 1 Add the following line to "/etc/pam.d/common-password" (or modify the line to have the required value): password requisite pam_pwquality.so retry=3 enforce_for_root Note: The value of "retry" should be between "1" and "3".
Configured the Ubuntu operating system to set permissions of all log files under /var/log directory to "640" or more restricted, 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 chmod 640 '{}' \;
Configure the Ubuntu operating system to have syslog group-own the /var/log directory by running the following command: # sudo chgrp syslog /var/log
Configure the Ubuntu operating system to have root own the /var/log directory by running the following command: # sudo chown root /var/log
Configure the Ubuntu operating system to have permissions of "0755" for the /var/log directory by running the following command: $ sudo chmod 0755 /var/log
Configure the Ubuntu operating system to have adm group-own the /var/log/syslog file by running the following command: # sudo chgrp adm /var/log/syslog
Configure the Ubuntu operating system to have syslog own the /var/log/syslog file by running the following command: # sudo chown syslog /var/log/syslog
Configure the Ubuntu operating system to have permissions of 0640 o for the /var/log/syslog file by running the following command: # sudo chmod 0640 /var/log/syslog
Configure the audit tools on the Ubuntu operating system to be protected from unauthorized access by setting the correct permissive mode using the following command: # sudo chmod 0755 [audit_tool] Replace "[audit_tool]" with the audit tool that does not have the correct permissive mode.
Configure the audit tools on the Ubuntu operating system to be owned by root, by running the following command: # sudo chown root [audit_tool] Replace "[audit_tool]" with each audit tool not owned by root.
Configure the audit tools on the Ubuntu operating system to be group-owned by root, by running the following command: # sudo chgrp root [audit_tool] Replace "[audit_tool]" with each audit tool not group-owned by root.
Configure the shared library directories to be protected from unauthorized access. Run the following command: # sudo find /lib /lib64 /usr/lib -perm /022 -type d -exec chmod 755 '{}' \;
Configure the library files and their respective parent directories to be protected from unauthorized access. Run the following command: # sudo find /lib /usr/lib /lib64 ! -user root -type d -exec chown root '{}' \;
Configure the system library directories to be protected from unauthorized access. Run the following command: # sudo find /lib /usr/lib /lib64 ! -group root -type d -exec chgrp root '{}' \;
Configure the system commands to be protected from unauthorized access. Run the following command: # sudo find -L /bin /sbin /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin -perm /022 -type f -exec chmod 755 '{}' \;
Configure the system commands directories to be protected from unauthorized access. Run the following command: # sudo find -L /bin /sbin /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin -perm /022 -type d -exec chmod -R 755 '{}' \;
Configure the system commands - and their respective parent directories - to be protected from unauthorized access. Run the following command: # sudo find -L /bin /sbin /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin ! -user root -type f -exec chown root '{}' \;
Configure the system commands directories to be protected from unauthorized access. Run the following command: # sudo find -L /bin /sbin /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin ! -user root -type d -exec chown root '{}' \;
Configure the system commands to be protected from unauthorized access. Run the following command, replacing "[FILE]" with any system command file not group-owned by "root" or a required system account. $ sudo chgrp root [FILE]
Configure the system commands directories to be protected from unauthorized access. Run the following command: # sudo find -L /bin /sbin /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin ! -group root -type d -exec chgrp root '{}' \;
Configure the Ubuntu operating system to enforce password complexity by requiring that at least one special character be used. Add or update the following line in the "/etc/security/pwquality.conf" file to include the "ocredit=-1" parameter: ocredit=-1
Configure the audit system to generate an audit event for any successful/unsuccessful modifications to the "tallylog" file occur. Add or update the following rules in the "/etc/audit/rules.d/stig.rules" file: -w /var/log/tallylog -p wa -k logins Note: The "root" account must be used to view/edit any files in the /etc/audit/rules.d/ directory. In order to reload the rules file, issue the following command: # sudo augenrules --load
Configure the audit system to generate an audit event for any successful/unsuccessful modifications to the "faillog" file occur. Add or update the following rules in the "/etc/audit/rules.d/stig.rules" file: -w /var/log/faillog -p wa -k logins Note: The "root" account must be used to view/edit any files in the /etc/audit/rules.d/ directory. In order to reload the rules file, issue the following command: # sudo augenrules --load
Configure the audit system to generate an audit event for any successful/unsuccessful modifications to the "lastlog" file occur. Add or update the following rules in the "/etc/audit/rules.d/stig.rules" file: -w /var/log/lastlog -p wa -k logins Note: The "root" account must be used to view/edit any files in the /etc/audit/rules.d/ directory. In order to reload the rules file, issue the following command: # sudo augenrules --load
Configure the audit system to generate audit events showing start and stop times for user access via the /var/log/wtmp file. Add or update the following rules in the "/etc/audit/rules.d/stig.rules" file: -w /var/log/wtmp -p wa -k logins Note: The "root" account must be used to view/edit any files in the /etc/audit/rules.d/ directory. In order to reload the rules file, issue the following command: # sudo augenrules --load
Configure the audit system to generate audit events showing start and stop times for user access via the /var/run/utmp file. Add or update the following rules in the "/etc/audit/rules.d/stig.rules" file: -w /var/run/utmp -p wa -k logins Note: The "root" account must be used to view/edit any files in the /etc/audit/rules.d/ directory. In order to reload the rules file, issue the following command: $ sudo augenrules --load
Configure the audit system to generate audit events showing start and stop times for user access via the /var/log/btmp file. Add or update the following rules in the "/etc/audit/rules.d/stig.rules" file: -w /var/log/btmp -p wa -k logins Note: The "root" account must be used to view/edit any files in the /etc/audit/rules.d/ directory. In order to reload the rules file, issue the following command: # sudo augenrules --load
Configure the Ubuntu operating system to generate audit records for all account creations, modifications, disabling, and termination events that affect /etc/passwd. Add or update the following rule to "/etc/audit/rules.d/stig.rules": -w /etc/passwd -p wa -k usergroup_modification Note: The "root" account must be used to view/edit any files in the /etc/audit/rules.d/ directory. In order to reload the rules file, issue the following command: # sudo augenrules --load
Configure the Ubuntu operating system to generate audit records for all account creations, modifications, disabling, and termination events that affect /etc/group. Add or update the following rule to "/etc/audit/rules.d/stig.rules": -w /etc/group -p wa -k usergroup_modification Note: The "root" account must be used to view/edit any files in the /etc/audit/rules.d/ directory. In order to reload the rules file, issue the following command: # sudo augenrules --load
Configure the Ubuntu operating system to generate audit records for all account creations, modifications, disabling, and termination events that affect /etc/gshadow. Add or update the following rule to "/etc/audit/rules.d/stig.rules": -w /etc/gshadow -p wa -k usergroup_modification Note: The "root" account must be used to view/edit any files in the /etc/audit/rules.d/ directory. In order to reload the rules file, issue the following command: # sudo augenrules --load
Configure the Ubuntu operating system to generate audit records for all account creations, modifications, disabling, and termination events that affect /etc/shadow. Add or update the following rule to "/etc/audit/rules.d/stig.rules": -w /etc/shadow -p wa -k usergroup_modification Note: The "root" account must be used to view/edit any files in the /etc/audit/rules.d/ directory. In order to reload the rules file, issue the following command: # sudo augenrules --load
Configure the Ubuntu operating system to generate audit records for all account creations, modifications, disabling, and termination events that affect /etc/security/opasswd. Add or update the following rule to "/etc/audit/rules.d/stig.rules": -w /etc/security/opasswd -p wa -k usergroup_modification Note: The "root" account must be used to view/edit any files in the /etc/audit/rules.d/ directory. In order to reload the rules file, issue the following command: # sudo augenrules --load
Configure the audit service to produce audit records containing the information needed to establish when (date and time) an event occurred. Install the audit service (if the audit service is not already installed) with the following command: # sudo apt-get install auditd Enable the audit service with the following command: # sudo systemctl enable auditd.service In order to reload the rules file, issue the following command: # sudo augenrules --load
Configure the Ubuntu operating system to shut down by default upon audit failure (unless availability is an overriding concern). Add or update the following line (depending on configuration "disk_full_action" can be set to "SYSLOG", "HALT" or "SINGLE") in "/etc/audit/auditd.conf" file: disk_full_action = HALT Restart the auditd service so the changes take effect: # sudo systemctl restart auditd.service
Configure "/etc/audit/audit.rules", "/etc/audit/rules.d/*" and "/etc/audit/auditd.conf" files to have a mode of 0640 by using the following command: # chmod -R 0640 /etc/audit/audit*.{rules,conf} /etc/audit/rules.d/* Note: The "root" account must be used to edit any files in the /etc/audit and /etc/audit/rules.d/ directories.
Configure "/etc/audit/audit.rules", "/etc/audit/rules.d/*" and "/etc/audit/auditd.conf" files to be owned by root user by using the following command: # chown root /etc/audit/audit*.{rules,conf} /etc/audit/rules.d/* Note: The "root" account must be used to edit any files in the /etc/audit and /etc/audit/rules.d/ directories.
Configure "/etc/audit/audit.rules", "/etc/audit/rules.d/*" and "/etc/audit/auditd.conf" files to be owned by root group by using the following command: # chown :root /etc/audit/audit*.{rules,conf} /etc/audit/rules.d/* Note: The "root" account must be used to edit any files in the /etc/audit and /etc/audit/rules.d/ directories.
Configure the Ubuntu operating system to generate audit records when successful/unsuccessful attempts to use the "su" command occur. Add or update the following rules in the "/etc/audit/rules.d/stig.rules" file: -a always,exit -F path=/bin/su -F perm=x -F auid>=1000 -F auid!=4294967295 -k privileged-priv_change In order to reload the rules file, issue the following command: # sudo augenrules --load Note: The "root" account must be used to view/edit any files in the /etc/audit/rules.d/ directory.
Configure the audit system to generate an audit event for any successful/unsuccessful uses of the "chfn" command. Add or update the following rules in the "/etc/audit/rules.d/stig.rules" file: -a always,exit -F path=/usr/bin/chfn -F perm=x -F auid>=1000 -F auid!=4294967295 -k privileged-chfn In order to reload the rules file, issue the following command: # sudo augenrules --load Note: The "root" account must be used to view/edit any files in the /etc/audit/rules.d/ directory.
Configure the audit system to generate an audit event for any successful/unsuccessful use of the "mount" command. Add or update the following rules in the "/etc/audit/rules.d/stig.rules" file: -a always,exit -F path=/bin/mount -F perm=x -F auid>=1000 -F auid!=4294967295 -k privileged-mount In order to reload the rules file, issue the following command: # sudo augenrules --load Note: The "root" account must be used to view/edit any files in the /etc/audit/rules.d/ directory.
Configure the audit system to generate an audit event for any successful/unsuccessful use of the "umount" command. Add or update the following rules in the "/etc/audit/rules.d/stig.rules" file: -a always,exit -F path=/bin/umount -F perm=x -F auid>=1000 -F auid!=4294967295 -k privileged-umount In order to reload the rules file, issue the following command: # sudo augenrules --load Note: The "root" account must be used to view/edit any files in the /etc/audit/rules.d/ directory.
Configure the audit system to generate an audit event for any successful/unsuccessful use of the "ssh-agent" command. Add or update the following rules in the "/etc/audit/rules.d/stig.rules" file: -a always,exit -F path=/usr/bin/ssh-agent -F perm=x -F auid>=1000 -F auid!=4294967295 -k privileged-ssh In order to reload the rules file, issue the following command: # sudo augenrules --load Note: The "root" account must be used to view/edit any files in the /etc/audit/rules.d/ directory.
Configure the audit system to generate an audit event for any successful/unsuccessful use of the "ssh-keysign" command. Add or update the following rules in the "/etc/audit/rules.d/stig.rules" file: -a always,exit -F path=/usr/lib/openssh/ssh-keysign -F perm=x -F auid>=1000 -F auid!=4294967295 -k privileged-ssh In order to reload the rules file, issue the following command: # sudo augenrules --load Note: The "root" account must be used to view/edit any files in the /etc/audit/rules.d/ directory.
Configure the audit system to generate an audit event for any successful/unsuccessful use of the "setxattr", "fsetxattr", "lsetxattr", "removexattr", "fremovexattr", and "lremovexattr" system calls. Add or update the following rules in the "/etc/audit/rules.d/stig.rules" file: -a always,exit -F arch=b32 -S setxattr,fsetxattr,lsetxattr,removexattr,fremovexattr,lremovexattr -F auid>=1000 -F auid!=4294967295 -k perm_mod -a always,exit -F arch=b32 -S setxattr,fsetxattr,lsetxattr,removexattr,fremovexattr,lremovexattr -F auid=0 -k perm_mod -a always,exit -F arch=b64 -S setxattr,fsetxattr,lsetxattr,removexattr,fremovexattr,lremovexattr -F auid>=1000 -F auid!=4294967295 -k perm_mod -a always,exit -F arch=b64 -S setxattr,fsetxattr,lsetxattr,removexattr,fremovexattr,lremovexattr -F auid=0 -k perm_mod Notes: For 32-bit architectures, only the 32-bit specific entries are required. The "root" account must be used to view/edit any files in the /etc/audit/rules.d/ directory. To reload the rules file, issue the following command: # sudo augenrules --load
Configure the audit system to generate an audit event for any successful/unsuccessful use of the "chown", "fchown", "fchownat", and "lchown" system calls. Add or update the following rules in the "/etc/audit/rules.d/stig.rules": -a always,exit -F arch=b32 -S chown,fchown,fchownat,lchown -F auid>=1000 -F auid!=4294967295 -k perm_chng -a always,exit -F arch=b64 -S chown,fchown,fchownat,lchown -F auid>=1000 -F auid!=4294967295 -k perm_chng Notes: For 32-bit architectures, only the 32-bit specific entries are required. The "root" account must be used to view/edit any files in the /etc/audit/rules.d/ directory. To reload the rules file, issue the following command: # sudo augenrules --load
Configure the audit system to generate an audit event for any successful/unsuccessful use of the "chmod", "fchmod", and "fchmodat" system calls. Add or update the following rules in the "/etc/audit/rules.d/stig.rules": -a always,exit -F arch=b32 -S chmod,fchmod,fchmodat -F auid>=1000 -F auid!=4294967295 -k perm_chng -a always,exit -F arch=b64 -S chmod,fchmod,fchmodat -F auid>=1000 -F auid!=4294967295 -k perm_chng Notes: For 32-bit architectures, only the 32-bit specific entries are required. The "root" account must be used to view/edit any files in the /etc/audit/rules.d/ directory. To reload the rules file, issue the following command: # sudo augenrules --load
Configure the audit system to generate an audit event for any unsuccessful use of the "creat", "open", "openat", "open_by_handle_at", "truncate", and "ftruncate" system calls. Add or update the following rules in the "/etc/audit/rules.d/stig.rules" file: -a always,exit -F arch=b32 -S creat,open,openat,open_by_handle_at,truncate,ftruncate -F exit=-EPERM -F auid>=1000 -F auid!=4294967295 -k perm_access -a always,exit -F arch=b32 -S creat,open,openat,open_by_handle_at,truncate,ftruncate -F exit=-EACCES -F auid>=1000 -F auid!=4294967295 -k perm_access -a always,exit -F arch=b64 -S creat,open,openat,open_by_handle_at,truncate,ftruncate -F exit=-EPERM -F auid>=1000 -F auid!=4294967295 -k perm_access -a always,exit -F arch=b64 -S creat,open,openat,open_by_handle_at,truncate,ftruncate -F exit=-EACCES -F auid>=1000 -F auid!=4294967295 -k perm_access Notes: For 32-bit architectures, only the 32-bit specific entries are required. The "root" account must be used to view/edit any files in the /etc/audit/rules.d/ directory. To reload the rules file, issue the following command: # sudo augenrules --load
Configure the audit system to generate an audit event for any successful/unsuccessful use of the "sudo" command. Add or update the following rules in the "/etc/audit/rules.d/stig.rules" file: -a always,exit -F path=/usr/bin/sudo -F perm=x -F auid>=1000 -F auid!=4294967295 -k priv_cmd Note: The "root" account must be used to view/edit any files in the /etc/audit/rules.d/ directory. In order to reload the rules file, issue the following command: # sudo augenrules --load
Configure the audit system to generate an audit event for any successful/unsuccessful use of the "sudoedit" command. Add or update the following rules in the "/etc/audit/rules.d/stig.rules": -a always,exit -F path=/usr/bin/sudoedit -F perm=x -F auid>=1000 -F auid!=4294967295 -k priv_cmd Note: The "root" account must be used to view/edit any files in the /etc/audit/rules.d/ directory. In order to reload the rules file, issue the following command: # sudo augenrules --load
Configure the audit system to generate an audit event for any successful/unsuccessful use of the "chsh" command. Add or update the following rules in the "/etc/audit/rules.d/stig.rules" file: -a always,exit -F path=/usr/bin/chsh -F perm=x -F auid>=1000 -F auid!=4294967295 -k priv_cmd Note: The "root" account must be used to view/edit any files in the /etc/audit/rules.d/ directory. In order to reload the rules file, issue the following command: # sudo augenrules --load
Configure the audit system to generate an audit event for any successful/unsuccessful use of the "newgrp" command. Add or update the following rules in the "/etc/audit/rules.d/stig.rules" file: -a always,exit -F path=/usr/bin/newgrp -F perm=x -F auid>=1000 -F auid!=4294967295 -k priv_cmd Note: The "root" account must be used to view/edit any files in the /etc/audit/rules.d/ directory. In order to reload the rules file, issue the following command: # sudo augenrules --load
Configure the audit system to generate an audit event for any successful/unsuccessful use of the "chcon" command. Add or update the following rules in the "/etc/audit/rules.d/stig.rules" file: -a always,exit -F path=/usr/bin/chcon -F perm=x -F auid>=1000 -F auid!=4294967295 -k perm_chng Note: The "root" account must be used to view/edit any files in the /etc/audit/rules.d/ directory. In order to reload the rules file, issue the following command: # sudo augenrules --load
Configure the audit system to generate an audit event for any successful/unsuccessful use of the "apparmor_parser" command. Add or update the following rules in the "/etc/audit/rules.d/stig.rules" file: -a always,exit -F path=/sbin/apparmor_parser -F perm=x -F auid>=1000 -F auid!=4294967295 -k perm_chng Note: The "root" account must be used to view/edit any files in the /etc/audit/rules.d/ directory. In order to reload the rules file, issue the following command: # sudo augenrules --load
Configure the audit system to generate an audit event for any successful/unsuccessful use of the "setfacl" command. Add or update the following rules in the "/etc/audit/rules.d/stig.rules" file: -a always,exit -F path=/usr/bin/setfacl -F perm=x -F auid>=1000 -F auid!=4294967295 -k perm_chng Note: The "root" account must be used to view/edit any files in the /etc/audit/rules.d/ directory. In order to reload the rules file, issue the following command: # sudo augenrules --load
Configure the audit system to generate an audit event for any successful/unsuccessful use of the "chacl" command. Add or update the following rules in the "/etc/audit/rules.d/stig.rules" file: -a always,exit -F path=/usr/bin/chacl -F perm=x -F auid>=1000 -F auid!=4294967295 -k perm_chng Note: The "root" account must be used to view/edit any files in the /etc/audit/rules.d/ directory. In order to reload the rules file, issue the following command: # sudo augenrules --load
Configure the audit system to generate an audit event for any successful/unsuccessful uses of the "passwd" command. Add or update the following rule in the "/etc/audit/rules.d/stig.rules" file: -a always,exit -F path=/usr/bin/passwd -F perm=x -F auid>=1000 -F auid!=4294967295 -k privileged-passwd Note: The "root" account must be used to view/edit any files in the /etc/audit/rules.d/ directory. In order to reload the rules file, issue the following command: # sudo augenrules --load
Configure the audit system to generate an audit event for any successful/unsuccessful uses of the "unix_update" command. Add or update the following rules in the "/etc/audit/rules.d/stig.rules" file: -a always,exit -F path=/sbin/unix_update -F perm=x -F auid>=1000 -F auid!=4294967295 -k privileged-unix-update Note: The "root" account must be used to view/edit any files in the /etc/audit/rules.d/ directory. In order to reload the rules file, issue the following command: # sudo augenrules --load
Configure the audit system to generate an audit event for any successful/unsuccessful uses of the gpasswd command. Add or update the following rules in the "/etc/audit/rules.d/stig.rules" file: -a always,exit -F path=/usr/bin/gpasswd -F perm=x -F auid>=1000 -F auid!=4294967295 -k privileged-gpasswd Note: The "root" account must be used to view/edit any files in the /etc/audit/rules.d/ directory. In order to reload the rules file, issue the following command: # sudo augenrules --load
Configure the audit system to generate an audit event for any successful/unsuccessful uses of the "chage" command. Add or update the following rules in the "/etc/audit/rules.d/stig.rules" file: -a always,exit -F path=/usr/bin/chage -F perm=x -F auid>=1000 -F auid!=4294967295 -k privileged-chage Note: The "root" account must be used to view/edit any files in the /etc/audit/rules.d/ directory. In order to reload the rules file, issue the following command: # sudo augenrules --load
Configure the audit system to generate an audit event for any successful/unsuccessful uses of the "usermod" command. Add or update the following rules in the "/etc/audit/rules.d/stig.rules" file: -a always,exit -F path=/usr/sbin/usermod -F perm=x -F auid>=1000 -F auid!=4294967295 -k privileged-usermod Note: The "root" account must be used to view/edit any files in the /etc/audit/rules.d/ directory. In order to reload the rules file, issue the following command: # sudo augenrules --load
Configure the audit system to generate an audit event for any successful/unsuccessful uses of the "crontab" command. Add or update the following rules in the "/etc/audit/rules.d/stig.rules" file: -a always,exit -F path=/usr/bin/crontab -F perm=x -F auid>=1000 -F auid!=4294967295 -k privileged-crontab Note: The "root" account must be used to view/edit any files in the /etc/audit/rules.d/ directory. In order to reload the rules file, issue the following command: # sudo augenrules --load
Configure the audit system to generate an audit event for any successful/unsuccessful uses of the "pam_timestamp_check" command. Add or update the following rules in the "/etc/audit/rules.d/stig.rules" file: -a always,exit -F path=/usr/sbin/pam_timestamp_check -F perm=x -F auid>=1000 -F auid!=4294967295 -k privileged-pam_timestamp_check Note: The "root" account must be used to view/edit any files in the /etc/audit/rules.d/ directory. In order to reload the rules file, issue the following command: # sudo augenrules --load
Configure the Ubuntu operating system to audit the execution of all privileged functions. Add or update the following rules in the "/etc/audit/rules.d/stig.rules" file: -a always,exit -F arch=b64 -S execve -C uid!=euid -F euid=0 -F key=execpriv -a always,exit -F arch=b64 -S execve -C gid!=egid -F egid=0 -F key=execpriv -a always,exit -F arch=b32 -S execve -C uid!=euid -F euid=0 -F key=execpriv -a always,exit -F arch=b32 -S execve -C gid!=egid -F egid=0 -F key=execpriv Notes: For 32-bit architectures, only the 32-bit specific entries are required. The "root" account must be used to view/edit any files in the /etc/audit/rules.d/ directory. In order to reload the rules file, issue the following command: # sudo augenrules --load
Configure the audit system to generate audit events upon successful/unsuccessful use of "unlink", "unlinkat", "rename", "renameat", and "rmdir" system calls. Add or update the following rules in the "/etc/audit/rules.d/stig.rules" file: -a always,exit -F arch=b64 -S unlink,unlinkat,rename,renameat,rmdir -Fauid>=1000 -F auid!=4294967295 -k delete -a always,exit -F arch=b32 -S unlink,unlinkat,rename,renameat,rmdir -F auid>=1000 -F auid!=4294967295 -k delete Notes: For 32-bit architectures, only the 32-bit specific entries are required. The "root" account must be used to view/edit any files in the /etc/audit/rules.d/ directory. To reload the rules file, issue the following command: # sudo augenrules --load
Configure the audit system to generate an audit event for any use of the "init_module" or "finit_module" system calls. Add or update the following rules in the "/etc/audit/rules.d/stig.rules" file: -a always,exit -F arch=b32 -S init_module -S finit_module -F key=modules -a always,exit -F arch=b64 -S init_module -S finit_module -F key=modules Notes: For 32-bit architectures, only the 32-bit specific entries are required. The "root" account must be used to view/edit any files in the /etc/audit/rules.d/ directory. In order to reload the rules file, issue the following command: # sudo augenrules --load
Configure the Ubuntu operating system to generate an audit event for any use of the delete_module system call. Add or update the following rule in the "/etc/audit/rules.d/stig.rules" file. -a always,exit -F arch=b32 -S delete_module -F key=modules -a always,exit -F arch=b64 -S delete_module -F key=modules Notes: For 32-bit architectures, only the 32-bit specific entries are required. The "root" account must be used to view/edit any files in the /etc/audit/rules.d/ directory. In order to reload the rules file, issue the following command: # sudo augenrules --load
Configure the Ubuntu operating system to audit the execution of the module management program "modprobe". Add or update the following rule in the "/etc/audit/rules.d/stig.rules" file. -w /sbin/modprobe -p x -k modules Note: The "root" account must be used to view/edit any files in the /etc/audit/rules.d/ directory. In order to reload the rules file, issue the following command: # sudo augenrules --load
Configure the Ubuntu operating system to audit the execution of the module management program "kmod". Add or update the following rule in the "/etc/audit/rules.d/stig.rules" file. -w /bin/kmod -p x -k modules Note: The "root" account must be used to view/edit any files in the /etc/audit/rules.d/ directory. In order to reload the rules file, issue the following command: # sudo augenrules --load
Configure the Ubuntu operating system to audit the execution of the partition management program "fdisk". Add or update the following rule in the "/etc/audit/rules.d/stig.rules" file. -w /sbin/fdisk -p x -k fdisk Note: The root account must be used to view and/or edit any files in the /etc/audit/rules.d/ directory. In order to reload the rules file, issue the following command: # sudo augenrules --load
Configure the Ubuntu operating system to limit the number of concurrent sessions to ten for all accounts and/or account types. Add the following line to the top of the /etc/security/limits.conf: * hard maxlogins 10
Install the "vlock" (if it is not already installed) package by running the following command: # sudo apt-get install vlock
Configure the Ubuntu operating system to allow the SSH daemon to only implement DoD-approved encryption. Add the following line (or modify the line to have the required value) to the "/etc/ssh/sshd_config" file (this file may be named differently or be in a different location if using a version of SSH that is provided by a third-party vendor): Ciphers aes256-ctr,aes192-ctr,aes128-ctr In order for the changes to take effect, the SSH daemon must be restarted. # sudo systemctl restart sshd.service
Configure the Ubuntu operating system to enforce SSHv2 for network access to all accounts. Add or update the following line in the "/etc/ssh/sshd_config" file: Protocol 2 Restart the ssh service. # systemctl restart sshd.service
Configure the Ubuntu operating system to use strong authentication when establishing nonlocal maintenance and diagnostic sessions. Add or modify the following line to /etc/ssh/sshd_config UsePAM yes
Configure the Ubuntu operating system to automatically terminate inactive SSH sessions after a period of inactivity. Modify or append the following line in the "/etc/ssh/sshd_config" file replacing "[Count]" with a value of 1: ClientAliveCountMax 1 In order for the changes to take effect, the SSH daemon must be restarted. # sudo systemctl restart sshd.service
Configure the Ubuntu operating system to allow the SSH daemon to only use Message Authentication Codes (MACs) that employ FIPS 140-2 approved ciphers. Add the following line (or modify the line to have the required value) to the "/etc/ssh/sshd_config" file (this file may be named differently or be in a different location if using a version of SSH that is provided by a third-party vendor): MACs hmac-sha2-512,hmac-sha2-256 In order for the changes to take effect, reload the SSH daemon. # sudo systemctl reload sshd.service
Install the "ssh" meta-package on the system with the following command: # sudo apt install ssh Enable the "ssh" service to start automatically on reboot with the following command: # sudo systemctl enable sshd.service Ensure that the "ssh" service is running. # sudo systemctl start sshd.service
Configure the Ubuntu operating system, for PKI-based authentication, to validate certificates by constructing a certification path to an accepted trust anchor. Determine which pkcs11 module is being used via the use_pkcs11_module in /etc/pam_pkcs11/pam_pkcs11.conf and ensure "ca" is enabled in "cert_policy". Add or update the "cert_policy" to ensure "ca" is enabled: cert_policy = ca,signature,ocsp_on; If the system is missing an "/etc/pam_pkcs11/" directory and an "/etc/pam_pkcs11/pam_pkcs11.conf", find an example to copy into place and modify accordingly at "/usr/share/doc/libpam-pkcs11/examples/pam_pkcs11.conf.example.gz".
Install libpam-pkcs11 package on the system. Set use_mappers=pwent in /etc/pam_pkcs11/pam_pkcs11.conf If the system is missing an "/etc/pam_pkcs11/" directory and an "/etc/pam_pkcs11/pam_pkcs11.conf", find an example to copy into place and modify accordingly at "/usr/share/doc/libpam-pkcs11/examples/pam_pkcs11.conf.example.gz".
Configure the Ubuntu operating system to implement multifactor authentication by installing the required packages. Install the "libpam-pkcs11" package on the system with the following command: # sudo apt install libpam-pkcs11
Configure the Ubuntu operating system to accept Personal Identity Verification (PIV) credentials. Install the "opensc-pkcs11" package using the following command: # sudo apt-get install opensc-pkcs11
Configure the Ubuntu operating system to certificate status checking for multifactor authentication. Modify all of the cert_policy lines in "/etc/pam_pkcs11/pam_pkcs11.conf" to include ocsp_on.
Configure the system to define the default permissions for all authenticated users in such a way that the user can only read and modify their own files. Edit the "UMASK" parameter in the "/etc/login.defs" file to match the example below: UMASK 077
Configure the Ubuntu operating system to use TCP syncookies, by running the following command: # sudo sysctl -w net.ipv4.tcp_syncookies=1 If "1" is not the system's default value then add or update the following line in "/etc/sysctl.conf": net.ipv4.tcp_syncookies = 1
Configure the Ubuntu operating system to disable using the USB storage kernel module. Create a file under "/etc/modprobe.d" to contain the following: $ sudo su -c "echo install usb-storage /bin/false >> /etc/modprobe.d/DISASTIG.conf" Configure the operating system to disable the ability to use USB mass storage devices: $ sudo su -c "echo blacklist usb-storage >> /etc/modprobe.d/DISASTIG.conf"
Set the "kernel.randomize_va_space" entry found in the "/etc/sysctl.conf" file to a value of "2". After the line has been modified the kernel settings from all system configuration files must be reloaded; before any of the changes will take effect. Run the following command to reload all of the kernel system configuration files: # sudo sysctl --system
Install AIDE, initialize it, and perform a manual check. Install AIDE: $ sudo apt install aide Initialize it (this may take a few minutes): $ sudo aideinit Running aide --init... Example output: Start timestamp: 2022-11-20 11:53:17 -0700 (AIDE 0.16) AIDE initialized database at /var/lib/aide/aide.db.new Verbose level: 6 Number of entries: 119543 --------------------------------------------------- The attributes of the (uncompressed) database(s): --------------------------------------------------- /var/lib/aide/aide.db.new RMD160 : PiEP1DX91JMcHnRSPnpFqNfIFr4= TIGER : /zM5yQBnOIoEH0jplJE5v6S0rUErbTXL SHA256 : BE2iHtBN9lEX53l4R/p7t1al0dIlsgPc Lg4YI08+/Jk= SHA512 : JIdGeNVRgtBPPSwun9St+9cwUrgIIKUW KVTksZXJ29Tt+luC/XNDcjIub7fbPVw/ EcTDsvYtt9MBmBxw1wCYng== CRC32 : jB2FVw== HAVAL : Jhe+fqaDpkswpWSnOTN28TO05QFHsjdq RcFZwCVUGTQ= GOST : WFrarVyxpXbKdW9SAaOy1Te8rSodV3/q nLsXuP7YujA= End timestamp: 2022-11-20 11:58:19 -0700 (run time: 5m 2s) The new database will need to be renamed to be read by AIDE: $ sudo cp -p /var/lib/aide/aide.db.new /var/lib/aide/aide.db Perform a manual check: $ sudo aide.wrapper --check Example output: Start timestamp: 2022-11-20 11:59:16 -0700 (AIDE 0.16) AIDE found differences between database and filesystem!! ... Done.
Configure all accounts on the system to have a password or lock the account with the following commands: Perform a password reset: $ sudo passwd [username] Lock an account: $ sudo passwd -l [username]