Anduril NixOS Security Technical Implementation Guide
Pick two releases to diff their requirements.
Open a previous version of this STIG.
Digest of Updates −1 ✎ 94
Comparison against the immediately-prior release (V1R1). Rule matching uses the Group Vuln ID. Content-change detection compares the rule’s description, check, and fix text after stripping inline markup — cosmetic-only edits aren’t flagged.
Removed rules 1
- V-268162 Medium NixOS must remove all software components after updated versions have been installed.
Content changes 94
- V-268078 Medium checkfix NixOS must enable the built-in firewall.
- V-268079 Medium description NixOS emergency or temporary user accounts must be provisioned with an expiration time of 72 hours or less.
- V-268080 Medium checkfix NixOS must enable the audit daemon.
- V-268081 Medium descriptioncheckfix NixOS must enforce the limit of three consecutive invalid logon attempts by a user during a 15-minute time period.
- V-268082 Medium descriptioncheckfix NixOS must be configured to display the Standard Mandatory DOD Notice and Consent Banner before granting local or remote access to the system via a command line user logon.
- V-268083 Medium descriptioncheckfix NixOS must be configured to display the Standard Mandatory DOD Notice and Consent Banner before granting local or remote access to the system via an SSH logon.
- V-268084 Medium descriptioncheckfix NixOS must be configured to display the Standard Mandatory DOD Notice and Consent Banner before granting local or remote access to the system via a graphical user logon.
- V-268085 Low checkfix NixOS must be configured to limit the number of concurrent sessions to 10 for all accounts and/or account types.
- V-268086 Medium checkfix NixOS must initiate a session lock after a 10-minute period of inactivity for graphical user logon.
- V-268087 Medium checkfix NixOS must provide the capability for users to directly initiate a session lock for all connection types.
- V-268088 Medium checkfix NixOS must monitor remote access methods.
- V-268089 High checkfix NixOS must implement DOD-approved encryption to protect the confidentiality of remote access sessions.
- V-268090 Medium checkfix The NixOS audit package must be installed.
- V-268091 Medium fix NixOS must generate audit records for all usage of privileged commands.
- V-268092 Medium descriptionfix NixOS must enable auditing of processes that start prior to the audit daemon.
- V-268093 Medium checkfix NixOS must allocate an audit_backlog_limit of sufficient size to capture processes that start prior to the audit daemon.
- V-268094 Medium descriptionfix Successful/unsuccessful uses of the mount syscall in NixOS must generate an audit record.
- V-268095 Medium descriptionfix Successful/unsuccessful uses of the rename, unlink, rmdir, renameat, and unlinkat system calls in NixOS must generate an audit record.
- V-268096 Medium descriptionfix Successful/unsuccessful uses of the init_module, finit_module, and delete_module system calls in NixOS must generate an audit record.
- V-268097 Medium fix NixOS must generate an audit record for successful/unsuccessful modifications to the cron configuration.
- V-268098 Medium descriptionfix NixOS must generate an audit record for successful/unsuccessful uses of the truncate, ftruncate, creat, open, openat, and open_by_handle_at system calls.
- V-268099 Medium fix Successful/unsuccessful uses of the chown, fchown, fchownat, and lchown system calls in NixOS must generate an audit record.
- V-268100 Medium descriptionfix Successful/unsuccessful uses of the chmod, fchmod, and fchmodat system calls in NixOS must generate an audit record.
- V-268101 Medium fix NixOS must notify the system administrator (SA) and information system security officer (ISSO) (at a minimum) when allocated audit record storage volume reaches 75 percent utilization.
- V-268102 Medium fix NixOS must notify the system administrator (SA) and information system security officer (ISSO) (at a minimum) when allocated audit record storage volume reaches 90 percent utilization.
- V-268103 Medium fix NixOS must take action when allocated audit record storage volume reaches 75 percent of the repository maximum audit record storage capacity.
- V-268104 Medium fix NixOS must take action when allocated audit record storage volume reaches 90 percent of the repository maximum audit record storage capacity.
- V-268105 Medium fix The NixOS audit system must take appropriate action when the audit storage volume is full.
- V-268106 Medium fix The NixOS audit system must take appropriate action when an audit processing failure occurs.
- V-268107 Medium descriptioncheckfix NixOS must have the packages required for offloading audit logs installed and running.
- V-268108 Medium descriptioncheckfix The NixOS audit records must be off-loaded onto a different system or storage media from the system being audited.
- V-268109 Medium descriptioncheckfix NixOS must authenticate the remote logging server for off-loading audit logs.
- V-268110 Medium fix NixOS audit daemon must generate logs that are group-owned by root.
- V-268115 Medium checkfix NixOS journald directory and logs must be owned by root to prevent unauthorized read access.
- V-268116 Medium checkfix NixOS journald directory and logs must be group-owned by systemd-journald to prevent unauthorized read access.
- V-268117 Medium checkfix NixOS systemd-journald directory must have a mode of 2755 or less permissive.
- V-268118 Medium checkfix NixOS systemd-journald logs must have a mode of 0640 or less permissive.
- V-268119 Medium checkfix NixOS audit system must protect logon UIDs from unauthorized change.
- V-268120 Medium checkfix NixOS audit configuration files must have a mode of 444 or less permissive.
- V-268121 Medium checkfix NixOS system configuration file directories must have a mode of "0755" or less permissive.
- V-268122 Medium checkfix NixOS system configuration files and directories must be owned by root.
- V-268123 Medium checkfix NixOS system configuration files and directories must be group-owned by root.
- V-268124 Medium checkfix NixOS, for PKI-based authentication, must validate certificates by constructing a certification path (which includes status information) to an accepted trust anchor.
- V-268126 Medium fix NixOS must enforce password complexity by requiring that at least one uppercase character be used.
- V-268127 Medium fix NixOS must enforce password complexity by requiring that at least one lowercase character be used.
- V-268128 Medium fix NixOS must enforce password complexity by requiring that at least one numeric character be used.
- V-268129 Medium fix NixOS must require the change of at least 50 percent of the total number of characters when passwords are changed.
- V-268130 High fix NixOS must store only encrypted representations of passwords.
- V-268131 High fix NixOS must not have the telnet package installed.
- V-268132 Medium fix NixOS must enforce 24 hours/one day as the minimum password lifetime.
- V-268133 Medium fix NixOS must enforce a 60-day maximum password lifetime restriction.
- V-268134 Medium fix NixOS must enforce a minimum 15-character password length.
- V-268136 Medium checkfix NixOS must use multifactor authentication for network access to privileged accounts.
- V-268137 Medium descriptionfix NixOS must not allow direct login to the root account via SSH.
- V-268138 Medium descriptioncheckfix NixOS must not allow direct login to the root account.
- V-268139 Medium fix NixOS must enable USBguard.
- V-268141 Medium fix NixOS must manage excess capacity, bandwidth, or other redundancy to limit the effects of information flooding types of denial-of-service (DoS) attacks.
- V-268142 Medium fix NixOS must terminate all SSH connections after 10 minutes of becoming unresponsive.
- V-268143 Medium fix NixOS must terminate all SSH connections after becoming unresponsive.
- V-268145 Medium fix NixOS must enforce password complexity by requiring that at least one special character be used.
- V-268146 High fix NixOS must protect wireless access to and from the system using encryption.
- V-268147 Medium fix NixOS must protect wireless access to the system using authentication of users and/or devices.
- V-268148 Medium fix NixOS must prevent all software from executing at higher privilege levels than users executing the software.
- V-268149 Medium fix NixOS must, for networked systems, compare internal information system clocks at least every 24 hours with a server which is synchronized to one of the redundant United States Naval Observatory (USNO) time servers, or a time server designated for the appropriate DOD network (NIPRNet/SIPRNet), and/or the Global Positioning System (GPS).
- V-268150 Medium fix NixOS must synchronize internal information system clocks to the authoritative time source when the time difference is greater than one second.
- V-268151 Medium fix NixOS must have time synchronization enabled.
- V-268152 Medium fix NixOS must prohibit user installation of system software without explicit privileged status.
- V-268153 Medium checkfix NixOS must notify designated personnel if baseline configurations are changed in an unauthorized manner.
- V-268154 High checkfix NixOS must prevent the installation of patches, service packs, device drivers, or operating system components without verification they have been digitally signed using a certificate that is recognized and approved by the organization.
- V-268155 Medium fix NixOS must require users to reauthenticate for privilege escalation.
- V-268156 Medium checkfix NixOS must require users to reauthenticate when changing roles.
- V-268157 High checkfix NixOS must implement cryptographic mechanisms to protect the integrity of nonlocal maintenance and diagnostic communications, when used for nonlocal maintenance sessions.
- V-268158 Medium fix NixOS must protect against or limit the effects of denial-of-service (DoS) attacks by ensuring the operating system is implementing rate-limiting measures on impacted network interfaces.
- V-268159 High checkfix NixOS must protect the confidentiality and integrity of transmitted information.
- V-268160 Medium fix NixOS must implement nonexecutable data to protect its memory from unauthorized code execution.
- V-268161 Medium fix NixOS must implement address space layout randomization to protect its memory from unauthorized code execution.
- V-268163 Medium fix NixOS must generate audit records when successful/unsuccessful attempts to modify security objects occur.
- V-268164 Medium fix NixOS must generate audit records when successful/unsuccessful attempts to delete privileges occur.
- V-268165 Medium fix NixOS must generate audit records when successful/unsuccessful attempts to delete security objects occur.
- V-268166 Medium fix NixOS must generate audit records when concurrent logons to the same account occur from different sources.
- V-268167 Medium fix NixOS must generate audit records for all account creations, modifications, disabling, and termination events.
- V-268168 High fix NixOS must implement NIST FIPS-validated cryptography for the following: to provision digital signatures, to generate cryptographic hashes, and to protect unclassified information requiring confidentiality and cryptographic protection in accordance with applicable federal laws, Executive Orders, directives, policies, regulations, and standards.
- V-268169 Medium checkfix NixOS must prevent the use of dictionary words for passwords.
- V-268170 Medium fix NixOS must enable the use of pwquality.
- V-268171 Medium descriptioncheckfix NixOS must enforce a delay of at least four seconds between logon prompts following a failed logon attempt.
- V-268172 High checkfix NixOS must not allow an unattended or automatic logon to the system via the console.
- V-268173 Medium fix NixOS must be configured to use AppArmor.
- V-268174 Medium fix NixOS must disable account identifiers (individuals, groups, roles, and devices) after 35 days of inactivity.
- V-268175 Medium fix NixOS must employ approved cryptographic hashing algorithms for all stored passwords.
- V-268176 High fix NixOS must employ strong authenticators in the establishment of nonlocal maintenance and diagnostic sessions.
- V-268177 Medium fix NixOS must implement multifactor authentication for remote access to privileged accounts in such a way that one of the factors is provided by a device separate from the system gaining access.
- V-268178 Medium fix NixOS must prohibit the use of cached authenticators after one day.
- V-268179 Medium fix For PKI-based authentication, NixOS must implement a local cache of revocation data to support path discovery and validation in case of the inability to access revocation information via the network.
- V-268181 Medium checkfix NixOS must define default permissions for all authenticated users in such a way that the user can only read and modify their own files.
- RMF Control
- AC-17
- Severity
- M
- CCI
- CCI-002322
- Version
- ANIX-00-000010
- Vuln IDs
-
- V-268078
- Rule IDs
-
- SV-268078r1130947_rule
Checks: C-72002r1130945_chk
Verify NixOS has the network firewall enabled with the following command: $ sudo iptables -L | grep nixos-fw-log-refuse nixos-fw-log-refuse all -- anywhere anywhere Verify the firewall panic tools are present: $ which firewall-panic /run/current-system/sw/bin/firewall-panic $ which firewall-panic-off /run/current-system/sw/bin/firewall-panic-off If the "nixos-fw-log-refuse all -- anywhere anywhere" firewall rule is not present and the firewall panic commands are not found, this is a finding.
Fix: F-71905r1130946_fix
Update the NixOS config, typically stored either in /etc/nixos/configuration.nix or /etc/nixos/flake.nix, to enforce firewall rules by adding the following configuration settings: networking.firewall.enable = true; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- AC-2
- Severity
- M
- CCI
- CCI-000016
- Version
- ANIX-00-000020
- Vuln IDs
-
- V-268079
- Rule IDs
-
- SV-268079r1130948_rule
Checks: C-72003r1039123_chk
Verify that emergency or temporary accounts have been provisioned with an expiration date of 72 hours. For every existing emergency or temporary account, run the following command to obtain its account expiration information. $ sudo chage -l system_account_name If any emergency or temporary accounts have no expiration date set or do not expire within 72 hours, this is a finding.
Fix: F-71906r1039124_fix
Configure the system to terminate emergency or temporary accounts after a 72-hour time period with the following command. Substitute "system_account_name" with the account to be created. $ sudo chage -E "date -d "+3 days" +%Y-%m-%d" system_account_name
- RMF Control
- AC-2
- Severity
- M
- CCI
- CCI-000018
- Version
- ANIX-00-000030
- Vuln IDs
-
- V-268080
- Rule IDs
-
- SV-268080r1130951_rule
Checks: C-72004r1130949_chk
Verify NixOS has the audit service configured with the following commands: $ systemctl is-active audit.service active $ systemctl is-active auditd.service active If auditd and audit services are not active, this is a finding.
Fix: F-71907r1130950_fix
Configure NixOS to enable the audit service by updating the NixOS config, typically stored either in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: security.auditd.enable = true; security.audit.enable = true; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- AC-7
- Severity
- M
- CCI
- CCI-000044
- Version
- ANIX-00-000040
- Vuln IDs
-
- V-268081
- Rule IDs
-
- SV-268081r1130954_rule
Checks: C-72005r1130952_chk
Verify that NixOS locks an account after three unsuccessful logon attempts within 15 minutes with the following commands: $ cat /etc/pam.d/login auth required pam_faillock.so preauth deny=3 even_deny_root fail_interval=900 unlock_time=0 dir=/var/log/faillock If the "fail_interval" option is not set to "900" or less (but not "0") on the "preauth" lines with the "pam_faillock" module, or is missing from this line, this is a finding.
Fix: F-71908r1130953_fix
Configure NixOS to lock an account when three unsuccessful logon attempts occur within 15 minutes. Update the NixOS config, typically stored either in /etc/nixos/configuration.nix or /etc/nixos/flake.nix, to include the following lines: security.pam.services = let pamfile = '' auth required pam_faillock.so preauth silent audit deny=3 fail_interval=900 unlock_time=0 auth sufficient pam_unix.so nullok try_first_pass auth [default=die] pam_faillock.so authfail audit deny=3 fail_interval=900 unlock_time=0 auth sufficient pam_faillock.so authsucc account required pam_faillock.so ''; in { login.text = pkgs.lib.mkDefault pamfile; sshd.text = pkgs.lib.mkDefault pamfile; }; Note that the entire pam file must be entered as this pamfile string. Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- AC-8
- Severity
- M
- CCI
- CCI-000048
- Version
- ANIX-00-000050
- Vuln IDs
-
- V-268082
- Rule IDs
-
- SV-268082r1130957_rule
Checks: C-72006r1130955_chk
Verify that NixOS displays the Standard Mandatory DOD Notice and Consent Banner before granting access to the system via a command line user logon with the following command: $ tail -n+3 /etc/issue You are accessing a U.S. Government (USG) Information System (IS) that is provided for USG-authorized use only. By using this IS (which includes any device attached to this IS), you consent to the following conditions: -The USG routinely intercepts and monitors communications on this IS for purposes including, but not limited to, penetration testing, COMSEC monitoring, network operations and defense, personnel misconduct (PM), law enforcement (LE), and counterintelligence (CI) investigations. -At any time, the USG may inspect and seize data stored on this IS. -Communications using, or data stored on, this IS are not private, are subject to routine monitoring, interception, and search, and may be disclosed or used for any USG-authorized purpose. -This IS includes security measures (e.g., authentication and access controls) to protect USG interests--not for your personal benefit or privacy. -Notwithstanding the above, using this IS does not constitute consent to PM, LE or CI investigative searching or monitoring of the content of privileged communications, or work product, related to personal representation or services by attorneys, psychotherapists, or clergy, and their assistants. Such communications and work product are private and confidential. See User Agreement for details. If the /etc/issue does not contain a banner, or the banner does not match the Standard Mandatory DOD Notice and Consent Banner, this is a finding.
Fix: F-71909r1130956_fix
Configure NixOS to display the Standard Mandatory DOD Notice and Consent Banner before granting access to the system via a command line. Update the NixOS config, typically stored either in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: services.getty.helpLine = '' You are accessing a U.S. Government (USG) Information System (IS) that is provided for USG-authorized use only. By using this IS (which includes any device attached to this IS), you consent to the following conditions: -The USG routinely intercepts and monitors communications on this IS for purposes including, but not limited to, penetration testing, COMSEC monitoring, network operations and defense, personnel misconduct (PM), law enforcement (LE), and counterintelligence (CI) investigations. -At any time, the USG may inspect and seize data stored on this IS. -Communications using, or data stored on, this IS are not private, are subject to routine monitoring, interception, and search, and may be disclosed or used for any USG-authorized purpose. -This IS includes security measures (e.g., authentication and access controls) to protect USG interests--not for your personal benefit or privacy. -Notwithstanding the above, using this IS does not constitute consent to PM, LE or CI investigative searching or monitoring of the content of privileged communications, or work product, related to personal representation or services by attorneys, psychotherapists, or clergy, and their assistants. Such communications and work product are private and confidential. See User Agreement for details. ''; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- AC-8
- Severity
- M
- CCI
- CCI-000048
- Version
- ANIX-00-000060
- Vuln IDs
-
- V-268083
- Rule IDs
-
- SV-268083r1130960_rule
Checks: C-72007r1130958_chk
Verify the operating system displays the Standard Mandatory DOD Notice and Consent Banner before granting access to the system via a ssh logon with the following commands: $ grep Banner /etc/ssh/sshd_config $ cat /nix/store/<hash>-ssh_banner You are accessing a U.S. Government (USG) Information System (IS) that is provided for USG-authorized use only. By using this IS (which includes any device attached to this IS), you consent to the following conditions: -The USG routinely intercepts and monitors communications on this IS for purposes including, but not limited to, penetration testing, COMSEC monitoring, network operations and defense, personnel misconduct (PM), law enforcement (LE), and counterintelligence (CI) investigations. -At any time, the USG may inspect and seize data stored on this IS. -Communications using, or data stored on, this IS are not private, are subject to routine monitoring, interception, and search, and may be disclosed or used for any USG-authorized purpose. -This IS includes security measures (e.g., authentication and access controls) to protect USG interests--not for your personal benefit or privacy. -Notwithstanding the above, using this IS does not constitute consent to PM, LE or CI investigative searching or monitoring of the content of privileged communications, or work product, related to personal representation or services by attorneys, psychotherapists, or clergy, and their assistants. Such communications and work product are private and confidential. See User Agreement for details. If the "Banner" is not configured in the sshd_config, or the banner does not match the Standard Mandatory DOD Notice and Consent Banner, this is a finding.
Fix: F-71910r1130959_fix
Configure NixOS to display the Standard Mandatory DOD Notice and Consent Banner before granting access to the system via openssh. Update the NixOS config, typically stored either in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: services.openssh.banner = '' You are accessing a U.S. Government (USG) Information System (IS) that is provided for USG-authorized use only. By using this IS (which includes any device attached to this IS), you consent to the following conditions: -The USG routinely intercepts and monitors communications on this IS for purposes including, but not limited to, penetration testing, COMSEC monitoring, network operations and defense, personnel misconduct (PM), law enforcement (LE), and counterintelligence (CI) investigations. -At any time, the USG may inspect and seize data stored on this IS. -Communications using, or data stored on, this IS are not private, are subject to routine monitoring, interception, and search, and may be disclosed or used for any USG-authorized purpose. -This IS includes security measures (e.g., authentication and access controls) to protect USG interests--not for your personal benefit or privacy. -Notwithstanding the above, using this IS does not constitute consent to PM, LE or CI investigative searching or monitoring of the content of privileged communications, or work product, related to personal representation or services by attorneys, psychotherapists, or clergy, and their assistants. Such communications and work product are private and confidential. See User Agreement for details. ''; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- AC-8
- Severity
- M
- CCI
- CCI-000048
- Version
- ANIX-00-000070
- Vuln IDs
-
- V-268084
- Rule IDs
-
- SV-268084r1130963_rule
Checks: C-72008r1130961_chk
Verify NixOS displays the Standard Mandatory DOD Notice and Consent Banner before granting access to the system via the graphical user logon with the following command: $ DCONF_PROFILE=gdm dconf read "/org/gnome/login-screen/banner-message-text" You are accessing a U.S. Government (USG) Information System (IS) that is provided for USG-authorized use only. By using this IS (which includes any device attached to this IS), you consent to the following conditions: -The USG routinely intercepts and monitors communications on this IS for purposes including, but not limited to, penetration testing, COMSEC monitoring, network operations and defense, personnel misconduct (PM), law enforcement (LE), and counterintelligence (CI) investigations. -At any time, the USG may inspect and seize data stored on this IS. -Communications using, or data stored on, this IS are not private, are subject to routine monitoring, interception, and search, and may be disclosed or used for any USG-authorized purpose. -This IS includes security measures (e.g., authentication and access controls) to protect USG interests--not for your personal benefit or privacy. -Notwithstanding the above, using this IS does not constitute consent to PM, LE or CI investigative searching or monitoring of the content of privileged communications, or work product, related to personal representation or services by attorneys, psychotherapists, or clergy, and their assistants. Such communications and work product are private and confidential. See User Agreement for details. If the dconf tool does not return a banner, or the banner does not match the Standard Mandatory DOD Notice and Consent Banner, this is a finding.
Fix: F-71911r1130962_fix
Configure NixOS to display the Standard Mandatory DOD Notice and Consent Banner before granting access to the system via a graphical user logon. Update the NixOS config, typically stored either in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: services.xserver.displayManager.gdm.banner = "You are accessing a U.S. Government (USG) Information System (IS) that is provided for USG-authorized use only. By using this IS (which includes any device attached to this IS), you consent to the following conditions:\n-The USG routinely intercepts and monitors communications on this IS for purposes including, but not limited to, penetration testing, COMSEC monitoring, network operations and defense, personnel misconduct (PM), law enforcement (LE), and counterintelligence (CI) investigations.\n-At any time, the USG may inspect and seize data stored on this IS.\n-Communications using, or data stored on, this IS are not private, are subject to routine monitoring, interception, and search, and may be disclosed or used for any USG-authorized purpose.\n-This IS includes security measures (e.g., authentication and access controls) to protect USG interests--not for your personal benefit or privacy.\n-Notwithstanding the above, using this IS does not constitute consent to PM, LE or CI investigative searching or monitoring of the content of privileged communications, or work product, related to personal representation or services by attorneys, psychotherapists, or clergy, and their assistants. Such communications and work product are private and confidential. See User Agreement for details."; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- AC-10
- Severity
- L
- CCI
- CCI-000054
- Version
- ANIX-00-000090
- Vuln IDs
-
- V-268085
- Rule IDs
-
- SV-268085r1130966_rule
Checks: C-72009r1130964_chk
Verify NixOS limits the number of concurrent sessions to 10 for all accounts and/or account types. Check the pam configuration files and confirm a conf file with maxlogins configured: $ grep "limits.conf" /etc/pam.d/login > session required /nix/store/sl3fa5zh61xxl03m64if2wqzbvrb6zly-linux-pam-1.6.1/lib/security/pam_limits.so conf=/nix/store/aq8ni1qh3pdygl9cn3qfb8v583ask67m-limits.conf # limits (order 12200) $ cat /nix/store/aq8ni1qh3pdygl9cn3qfb8v583ask67m-limits.conf * hard maxlogins 10 @pipewire - rtprio 95 @pipewire - nice -19 @pipewire - memlock 4194304 If the "maxlogins" item is missing or commented out, or the value is set greater than "10" and is not documented with the information system security officer (ISSO) as an operational requirement, this is a finding.
Fix: F-71912r1130965_fix
Configure NixOS to limit the number of concurrent sessions to 10 for all accounts and/or account types. Update the NixOS config, typically stored either in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: security.pam.loginLimits = [ { domain = "*"; item = "maxlogins"; type = "hard"; value = "10"; } ]; Note: Security.pam.loginLimits can be set as a global domain (with the * wildcard) but may be set differently for multiple domains. Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- AC-11
- Severity
- M
- CCI
- CCI-000057
- Version
- ANIX-00-000110
- Vuln IDs
-
- V-268086
- Rule IDs
-
- SV-268086r1130969_rule
Checks: C-72010r1130967_chk
Verify NixOS initiates a session lock after a 10-minute period of inactivity for graphical user logon with the following command: $ sudo gsettings get org.gnome.desktop.session idle-delay uint32 600 $ grep "IdleAction" /etc/systemd/logind.conf IdleAction = lock IdleActionSec = 600 $ systemctl --user status xautolock.service xautolock.service - xautolock service Loaded: loaded (/etc/systemd/user/xautolock.service; enabled; preset: ignored) Active: active (running) since Wed 2025-03-19 22:56:13 UTC; 6min ago Invocation: 836d5b6b79444c62aa3c5285e3c8d92e Main PID: 3233 (xautolock) Tasks: 1 (limit: 38062) Memory: 712K (peak: 2.4M) CPU: 75ms CGroup: /user.slice/user-1000.slice/user@1000.service/app.slice/xautolock.service +-3233 /nix/store/4chq53fkkiimbx1qzdbxxs44diiqgj54-xautolock-2.2-7-ga23dd5c/bin/xautolock -noclose -time 10 -locker "/nix/store/w9qcpyhjrxsqrps91wkz8r4mqvg9zrxc-systemd-256.10/bin/loginctl lock-session" Mar 19 22:56:13 gcs-generic-5-3 systemd[3136]: Started xautolock service. If "idle-delay" is set to "0" or a value greater than "600", this is a finding. If "IdleAction" is not "lock" and "IdleActionSec" is not "600", this is a finding. If the xautolock service is not present or the process line does not contain "-time 10", this is a finding.
Fix: F-71913r1130968_fix
Configure NixOS to initiate a session lock after a 10-minute period of inactivity for graphical user logon. Update the NixOS config, typically stored either in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: programs.dconf.profiles.user.databases = with lib.gvariant; lib.mkBefore [ { settings."org/gnome/desktop/session".idle-delay = (mkUint32 600); locks = [ "org/gnome/desktop/session/idle-delay" ]; }]; services.logind.extraConfig = '' IdleAction = lock IdleActionSec = 600 ''; services.xserver = { displayManager.gdm.wayland = true; xautolock = { enable = true; time = 10; locker = "${lib.getExe' config.systemd.package "loginctl"} lock-session"; }; }; }; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- AC-11
- Severity
- M
- CCI
- CCI-000057
- Version
- ANIX-00-000120
- Vuln IDs
-
- V-268087
- Rule IDs
-
- SV-268087r1130972_rule
Checks: C-72011r1130970_chk
Verify the NixOS operating system has the "vlock" package installed by running the following command: $ which vlock /run/current-system/sw/bin/vlock If the "vlock" package is not installed, this is a finding.
Fix: F-71914r1130971_fix
Configure NixOS to have a package that allows user to lock session. Update the NixOS config, typically stored either in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: environment.systemPackages = [ pkgs.vlock ]; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- AC-17
- Severity
- M
- CCI
- CCI-000067
- Version
- ANIX-00-000140
- Vuln IDs
-
- V-268088
- Rule IDs
-
- SV-268088r1130975_rule
Checks: C-72012r1130973_chk
Confirm the NixOS monitors remote access methods with the following command: $ grep "LogLevel" /etc/ssh/sshd_config LogLevel VERBOSE If "LogLevel" does not equal "VERBOSE", is missing, or is commented out, this is a finding.
Fix: F-71915r1130974_fix
Configure NixOS to monitor remote access methods by adding the following configuration to the /etc/nixos/configuration.nix or /etc/nixos/flake.nix: services.openssh.logLevel = "VERBOSE"; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- AC-17
- Severity
- H
- CCI
- CCI-000068
- Version
- ANIX-00-000150
- Vuln IDs
-
- V-268089
- Rule IDs
-
- SV-268089r1130978_rule
Checks: C-72013r1130976_chk
Verify NixOS is configured to only use ciphers employing FIPS 140-3 approved algorithms with the following command: $ grep Ciphers /etc/ssh/sshd_config Ciphers aes256-ctr,aes192-ctr,aes128-ctr If the cipher entries in the "sshd_config" file have any ciphers other than "aes256-ctr,aes192-ctr,aes128-ctr", the order differs from the example above, or they are missing or commented out, this is a finding.
Fix: F-71916r1130977_fix
Configure NixOS to use only ciphers employing FIPS 140-3 approved algorithms. To configure OpenSSH, add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: services.openssh.setting.Ciphers = [ "aes256-ctr" "aes192-ctr" "aes128-ctr" ]; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- AU-3
- Severity
- M
- CCI
- CCI-000130
- Version
- ANIX-00-000160
- Vuln IDs
-
- V-268090
- Rule IDs
-
- SV-268090r1130981_rule
Checks: C-72014r1130979_chk
Verify that NixOS has the audit service installed with the following command: $ systemctl is-active audit active If the "audit" service is not active, this is a finding.
Fix: F-71917r1130980_fix
Configure NixOS to have the audit service package. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: environment.systemPackages = [ audit ]; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- AU-3
- Severity
- M
- CCI
- CCI-000135
- Version
- ANIX-00-000210
- Vuln IDs
-
- V-268091
- Rule IDs
-
- SV-268091r1130983_rule
Checks: C-72015r1039159_chk
Verify NixOS generates audit records for all execution of privileged functions with the following command: $ sudo auditctl -l | grep execve -a always,exit -F arch=b64 -S execve -C uid!=euid -F euid=0 -k execpriv -a always,exit -F arch=b32 -S execve -C uid!=euid -F euid=0 -k execpriv -a always,exit -F arch=b32 -S execve -C gid!=egid -F egid=0 -k execpriv -a always,exit -F arch=b64 -S execve -C gid!=egid -F egid=0 -k execpriv If the command does not return the example output, this is a finding. Note: The "-k" allows for specifying an arbitrary identifier. The string following "-k" does not need to match the example output above.
Fix: F-71918r1130982_fix
Configure NixOS to generate audit records for all execution of privileged functions. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: security.audit.rules = [ "-a always,exit -F arch=b64 -S execve -C uid!=euid -F euid=0 -k execpriv" "-a always,exit -F arch=b32 -S execve -C uid!=euid -F euid=0 -k execpriv" "-a always,exit -F arch=b32 -S execve -C gid!=egid -F egid=0 -k execpriv " "-a always,exit -F arch=b64 -S execve -C gid!=egid -F egid=0 -k execpriv " ]; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- AU-3
- Severity
- M
- CCI
- CCI-000135
- Version
- ANIX-00-000250
- Vuln IDs
-
- V-268092
- Rule IDs
-
- SV-268092r1130985_rule
Checks: C-72016r1039162_chk
Verify NixOS enables auditing of processes that start prior to the audit daemon with the following command: $ grep audit=1 /proc/cmdline BOOT_IMAGE=(hd0,msdos1)/nix/store/glc0midc78caq9sc7pzciymx4c3in7kn-linux-6.1.64/bzImage init=/nix/store/grl4baymr9q60mbcz3sidm4agckn3bx5-nixos-system-nixos-23.1.1.20231129.057f9ae/init audit=1 loglevel=4 If the "audit" entry does not equal "1" or is missing, this is a finding.
Fix: F-71919r1130984_fix
Configure NixOS to audit processes that start prior to the audit daemon. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: boot.kernelParams = [ "audit=1" ]; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- AU-3
- Severity
- M
- CCI
- CCI-000135
- Version
- ANIX-00-000260
- Vuln IDs
-
- V-268093
- Rule IDs
-
- SV-268093r1130988_rule
Checks: C-72017r1130986_chk
Verify NixOS allocates a sufficient audit_backlog_limit to capture processes that start prior to the audit daemon with the following command: $ sudo auditctl -s | grep backlog_limit backlog_limit 8192 If the "backlog_limit" entry does not equal "8192" or greater or is missing, this is a finding.
Fix: F-71920r1130987_fix
Configure NixOS to allocate sufficient audit_backlog_limit to capture processes that start prior to the audit daemon. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: boot.kernelParams = [ "audit_backlog_limit=8192" ]; security.audit.backlogLimit = 8192; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- AU-3
- Severity
- M
- CCI
- CCI-000135
- Version
- ANIX-00-000270
- Vuln IDs
-
- V-268094
- Rule IDs
-
- SV-268094r1130990_rule
Checks: C-72018r1039168_chk
Verify NixOS generates an audit record for any successful/unsuccessful use of the "mount" syscall with the following command: $ sudo auditctl -l | grep -w "\-S mount" -a always,exit -F arch=b32 -S mount -F auid>=1000 -F auid!=-1 -k privileged-mount -a always,exit -F arch=b64 -S mount -F auid>=1000 -F auid!=-1 -k privileged-mount If the command does not return the example output, this is a finding. Note: The "-k" allows for specifying an arbitrary identifier. The string following "-k" does not need to match the example output above.
Fix: F-71921r1130989_fix
Configure NixOS to generate audit records for any successful/unsuccessful use of the "mount" syscall. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: security.audit.rules = [ "-a always,exit -F arch=b32 -S mount -F auid>=1000 -F auid!=unset -k privileged-mount" "-a always,exit -F arch=b64 -S mount -F auid>=1000 -F auid!=unset -k privileged-mount" ]; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- AU-3
- Severity
- M
- CCI
- CCI-000135
- Version
- ANIX-00-000280
- Vuln IDs
-
- V-268095
- Rule IDs
-
- SV-268095r1130992_rule
Checks: C-72019r1039171_chk
Verify NixOS generates an audit record upon successful/unsuccessful attempts to use the "rename", "unlink", "rmdir", "renameat", and "unlinkat" system calls with the following command: $ sudo auditctl -l | grep -w 'rename\|unlink\|rmdir' -a always,exit -F arch=b32 -S rename,unlink,rmdir,renameat,unlinkat -F auid>=1000 -F auid!=-1 -k delete -a always,exit -F arch=b64 -S rename,unlink,rmdir,renameat,unlinkat -F auid>=1000 -F auid!=-1 -k delete If the command does not return an audit rule for "rename", "unlink", "rmdir", "renameat", and "unlinkat", this is a finding. Note: The "-k" allows for specifying an arbitrary identifier. The string following "-k" does not need to match the example output above.
Fix: F-71922r1130991_fix
Configure NixOS to generate audit records for any successful/unsuccessful attempts to use the "rename", "unlink", "rmdir", "renameat", and "unlinkat" system calls. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: security.audit.rules = [ "-a always,exit -F arch=b32 -S rename,unlink,rmdir,renameat,unlinkat -F auid>=1000 -F auid!=unset -k delete" "-a always,exit -F arch=b64 -S rename,unlink,rmdir,renameat,unlinkat -F auid>=1000 -F auid!=unset -k delete" ]; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- AU-3
- Severity
- M
- CCI
- CCI-000135
- Version
- ANIX-00-000290
- Vuln IDs
-
- V-268096
- Rule IDs
-
- SV-268096r1130994_rule
Checks: C-72020r1039174_chk
Verify NixOS generates an audit record upon successful/unsuccessful attempts to use the "init_module", "finit_module", and "delete_module" system calls. Check the auditing rules currently loaded into the audit daemon with the following command: $ sudo auditctl -l | grep -w init_module -a always,exit -F arch=b32 -S init_module,finit_module,delete_module -F auid>=1000 -F auid!=-1 -k module_chng -a always,exit -F arch=b64 -S init_module,finit_module,delete_module -F auid>=1000 -F auid!=-1 -k module_chng If the command does not return an audit rule for "init_module", "finit_module", and "delete_module", this is a finding. Note: The "-k" allows for specifying an arbitrary identifier. The string following "-k" does not need to match the example output above.
Fix: F-71923r1130993_fix
Configure /etc/nixos/configuration.nix to log successful/unsuccessful attempts to use the "init_module", "finit_module", and "delete_module" system calls. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: security.audit.rules = [ "-a always,exit -F arch=b32 -S init_module,finit_module,delete_module -F auid>=1000 -F auid!=unset -k module_chng" "-a always,exit -F arch=b64 -S init_module,finit_module,delete_module -F auid>=1000 -F auid!=unset -k module_chng" ]; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- AU-3
- Severity
- M
- CCI
- CCI-000135
- Version
- ANIX-00-000300
- Vuln IDs
-
- V-268097
- Rule IDs
-
- SV-268097r1130996_rule
Checks: C-72021r1039177_chk
Verify NixOS generates an audit record when successful/unsuccessful attempts to modify the cron configuration. Check the auditing rules currently loaded into the audit daemon with the following command: $ sudo auditctl -l | grep -w cron -w /var/cron/tabs/ -p wa -k services -w /var/cron/cron.allow -p wa -k services -w /var/cron/cron.deny -p wa -k services If the command does not return the example output, this is a finding. Note: The "-k" allows for specifying an arbitrary identifier. The string following "-k" does not need to match the example output above.
Fix: F-71924r1130995_fix
Configure NixOS to generate audit records when successful/unsuccessful attempts to modify the cron configuration occur. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: security.audit.rules = [ "-w /var/cron/tabs/ -p wa -k services" "-w /var/cron/cron.allow -p wa -k services" "-w /var/cron/cron.deny -p wa -k services" ]; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- AU-3
- Severity
- M
- CCI
- CCI-000135
- Version
- ANIX-00-000310
- Vuln IDs
-
- V-268098
- Rule IDs
-
- SV-268098r1130998_rule
Checks: C-72022r1039180_chk
Verify NixOS generates an audit record upon unsuccessful attempts to use the "truncate", "ftruncate", "creat", "open", "openat", and "open_by_handle_at" system calls. Check the auditing rules currently loaded into the audit daemon with the following command: $ sudo auditctl -l | grep 'open\|truncate\|creat' -a always,exit -F arch=b32 -S open,creat,truncate,ftruncate,openat,open_by_handle_at -F exit=-EACCES -F auid>=1000 -F auid!=-1 -F key=access -a always,exit -F arch=b32 -S open,creat,truncate,ftruncate,openat,open_by_handle_at -F exit=-EPERM -F auid>=1000 -F auid!=-1 -F key=access -a always,exit -F arch=b64 -S open,creat,truncate,ftruncate,openat,open_by_handle_at -F exit=-EACCES -F auid>=1000 -F auid!=-1 -F key=access -a always,exit -F arch=b64 -S open,creat,truncate,ftruncate,openat,open_by_handle_at -F exit=-EPERM -F auid>=1000 -F auid!=-1 -F key=access If the command does not return an audit rule for "truncate", "ftruncate", "creat", "open", "openat", and "open_by_handle_at", this is a finding. Note: The "-k" allows for specifying an arbitrary identifier. The string following "-k" does not need to match the example output above.
Fix: F-71925r1130997_fix
Configure NixOS to generate audit records for any unsuccessful attempts to use the "truncate", "ftruncate", "creat", "open", "openat", and "open_by_handle_at" system calls. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: security.audit.rules = [ "-a always,exit -F arch=b32 -S open,creat,truncate,ftruncate,openat,open_by_handle_at -F exit=-EACCES -F auid>=1000 -F auid!=unset -F key=access" "-a always,exit -F arch=b32 -S open,creat,truncate,ftruncate,openat,open_by_handle_at -F exit=-EPERM -F auid>=1000 -F auid!=unset -F key=access" "-a always,exit -F arch=b64 -S open,creat,truncate,ftruncate,openat,open_by_handle_at -F exit=-EACCES -F auid>=1000 -F auid!=unset -F key=access" "-a always,exit -F arch=b64 -S open,creat,truncate,ftruncate,openat,open_by_handle_at -F exit=-EPERM -F auid>=1000 -F auid!=unset -F key=access" ]; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- AU-3
- Severity
- M
- CCI
- CCI-000135
- Version
- ANIX-00-000360
- Vuln IDs
-
- V-268099
- Rule IDs
-
- SV-268099r1131000_rule
Checks: C-72023r1039183_chk
Verify NixOS generates an audit record upon attempts to use the "chown", "fchown", "fchownat", and "lchown" system calls. Check the auditing rules currently loaded into the audit daemon with the following command: $ sudo auditctl -l | grep chown -a always,exit -F arch=b32 -S lchown,fchown,chown,fchownat -F auid>=1000 -F auid!=-1 -F key=perm_mod -a always,exit -F arch=b64 -S chown,fchown,lchown,fchownat -F auid>=1000 -F auid!=-1 -F key=perm_mod If the command does not return an audit rule for "chown", "fchown", "fchownat", and "lchown", this is a finding. Note: The "-k" allows for specifying an arbitrary identifier. The string following "-k" does not need to match the example output above.
Fix: F-71926r1130999_fix
Configure NixOS to generate audit records for any attempts to use the "chown", "fchown", "fchownat", and "lchown" system calls. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: security.audit.rules = [ "-a always,exit -F arch=b32 -S lchown,fchown,chown,fchownat -F auid>=1000 -F auid!=unset -F key=perm_mod" "-a always,exit -F arch=b64 -S chown,fchown,lchown,fchownat -F auid>=1000 -F auid!=unset -F key=perm_mod" ]; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- AU-3
- Severity
- M
- CCI
- CCI-000135
- Version
- ANIX-00-000380
- Vuln IDs
-
- V-268100
- Rule IDs
-
- SV-268100r1131002_rule
Checks: C-72024r1039186_chk
Verify NixOS generates an audit record upon attempts to use the "chmod", "fchmod", and "fchmodat" system calls. Check the auditing rules currently loaded into the audit daemon with the following command: $ sudo auditctl -l | grep chmod -a always,exit -F arch=b32 -S chmod,fchmod,fchmodat -F auid>=1000 -F auid!=-1 -k perm_mod -a always,exit -F arch=b64 -S chmod,fchmod,fchmodat -F auid>=1000 -F auid!=-1 -k perm_mod If the command does not return an audit rule for "chmod", "fchmod", and "fchmodat, this is a finding. Note: The "-k" allows for specifying an arbitrary identifier. The string following "-k" does not need to match the example output above.
Fix: F-71927r1131001_fix
Configure NixOS to generate audit records for any attempts to use the "chmod", "fchmod", and "fchmodat" system calls. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: security.audit.rules = [ "-a always,exit -F arch=b32 -S chmod,fchmod,fchmodat -F auid>=1000 -F auid!=unset -k perm_mod" "-a always,exit -F arch=b64 -S chmod,fchmod,fchmodat -F auid>=1000 -F auid!=unset -k perm_mod" ]; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- AU-5
- Severity
- M
- CCI
- CCI-000139
- Version
- ANIX-00-000400
- Vuln IDs
-
- V-268101
- Rule IDs
-
- SV-268101r1131004_rule
Checks: C-72025r1039598_chk
Verify NixOS notifies the SA and ISSO (at a minimum) when allocated audit record storage volume reaches 75 percent of the repository maximum audit record storage capacity with the following command: $ sudo grep -w space_left_action /etc/audit/auditd.conf space_left_action = syslog If the "space_left_action" parameter is missing, commented out, or set to blanks, this is a finding. If the "space_left_action" is set to "syslog", the system logs the event, but does not generate a notification, this is a finding. If the "space_left_action" is set to "exec", the system executes a designated script. If this script does not inform the SA of the event, this is a finding. If the "space_left_action" is set to "email" check the value of the "action_mail_acct" parameter with the following command: $ sudo grep action_mail_acct /etc/audit/auditd.conf action_mail_acct root@localhost The "action_mail_acct" parameter, if missing, defaults to "root". If the "action_mail_acct" parameter is not set to the email address of the SA and/or ISSO, this is a finding. Note: If the email address of the SA is on a remote system, a mail package must be available.
Fix: F-71928r1131003_fix
Configure NixOS to initiate an action to notify the SA and ISSO (at a minimum) when allocated audit record storage volume reaches 75 percent of the repository maximum audit record storage capacity. If the space_left_action parameter is set to "syslog", make sure the event being logged generates a notification to the SA and ISSO. If the space_left_action parameter is set to "exec", make sure the command being executed notifies the SA and ISSO. If the space_left_action parameter is set to "email", set the action_mail_acct parameter to an email address for the SA and ISSO. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: space_left_action = syslog For example, an updated configuration of 'environment.etc."audit/auditd.conf".text' would look like the following ('...' denoting that the 'environment.etc."audit/auditd.conf".text' configuration may have other options configured): environment.etc."audit/auditd.conf".text = [ '' ... space_left_action = syslog ... '' ]; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- AU-5
- Severity
- M
- CCI
- CCI-000139
- Version
- ANIX-00-000410
- Vuln IDs
-
- V-268102
- Rule IDs
-
- SV-268102r1131006_rule
Checks: C-72026r1039600_chk
Verify NixOS notifies the SA and ISSO (at a minimum) when allocated audit record storage volume reaches 90 percent of the repository maximum audit record storage capacity with the following command: $ sudo grep -w admin_space_left_action /etc/audit/auditd.conf admin_space_left_action = syslog If the "admin_space_left_action" parameter is missing, commented out, or set to blanks, this is a finding. If the "admin_space_left_action" is set to "syslog", the system logs the event, but does not generate a notification, this is a finding. If the "admin_space_left_action" is set to "exec", the system executes a designated script. If this script does not inform the SA of the event, this is a finding. If the "admin_space_left_action" is set to "email" check the value of the "action_mail_acct" parameter with the following command: $ sudo grep action_mail_acct /etc/audit/auditd.conf action_mail_acct root@localhost The "action_mail_acct" parameter, if missing, defaults to "root". If the "action_mail_acct" parameter is not set to the email address of the SA and/or ISSO, this is a finding. Note: If the email address of the SA is on a remote system, a mail package must be available.
Fix: F-71929r1131005_fix
Configure NixOS to initiate an action to notify the SA and ISSO (at a minimum) when allocated audit record storage volume reaches 90 percent of the repository maximum audit record storage capacity. If the space_left_action parameter is set to "syslog", make sure the event being logged generates a notification to the SA and ISSO. If the space_left_action parameter is set to "exec", make sure the command being execute notifies the SA and ISSO. If the space_left_action parameter is set to "email", set the action_mail_acct parameter to an email address for the SA and ISSO. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: admin_space_left_action = syslog For example, an updated configuration of 'environment.etc."audit/auditd.conf".text' would look like the following ('...' denoting that the 'environment.etc."audit/auditd.conf".text' configuration may have other options configured): environment.etc."audit/auditd.conf".text = [ '' ... admin_space_left_action = syslog ... '' ]; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- AU-5
- Severity
- M
- CCI
- CCI-000139
- Version
- ANIX-00-000420
- Vuln IDs
-
- V-268103
- Rule IDs
-
- SV-268103r1131008_rule
Checks: C-72027r1039195_chk
Verify NixOS takes action when allocated audit record storage volume reaches 75 percent of the repository maximum audit record storage capacity with the following commands: $ sudo grep -w space_left /etc/audit/auditd.conf space_left = 25% If the value of the "space_left" keyword is not set to "25%" or if the line is commented out, this is a finding.
Fix: F-71930r1131007_fix
Configure the operating system to initiate an action to notify the system administrator (SA) and information system security officer (ISSO) (at a minimum) when allocated audit record storage volume reaches 75 percent of the repository maximum audit record storage. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: environment.etc."audit/auditd.conf".text = [ '' space_left = 25% '' ]; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- AU-5
- Severity
- M
- CCI
- CCI-000139
- Version
- ANIX-00-000430
- Vuln IDs
-
- V-268104
- Rule IDs
-
- SV-268104r1131010_rule
Checks: C-72028r1039198_chk
Verify NixOS takes action when allocated audit record storage volume reaches 90 percent of the repository maximum audit record storage capacity with the following commands: $ sudo grep -w admin_space_left /etc/audit/auditd.conf admin_space_left = 10% If the value of the "admin_space_left" keyword is not set to "10%" or if the line is commented out, this is a finding.
Fix: F-71931r1131009_fix
Configure the operating system to initiate an action to notify the system administrator (SA) and information system security officer (ISSO) (at a minimum) when allocated audit record storage volume reaches 90 percent of the repository maximum audit record storage capacity. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: environment.etc."audit/auditd.conf".text = [ '' admin_space_left = 10% '' ]; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- AU-5
- Severity
- M
- CCI
- CCI-000140
- Version
- ANIX-00-000440
- Vuln IDs
-
- V-268105
- Rule IDs
-
- SV-268105r1131012_rule
Checks: C-72029r1039201_chk
Verify NixOS takes the appropriate action when the audit storage volume is full. Check that NixOS takes the appropriate action when the audit storage volume is full using the following command: $ sudo grep disk_full_action /etc/audit/auditd.conf disk_full_action = HALT If the value of the "disk_full_action" option is not "SYSLOG", "SINGLE", or "HALT", or the line is commented out, ask the system administrator (SA) to indicate how the system takes appropriate action when an audit storage volume is full. If there is no evidence of appropriate action, this is a finding.
Fix: F-71932r1131011_fix
Configure NixOS to shut down by default upon audit failure (unless availability is an overriding concern). If availability has been determined to be more important, and this decision is documented with the information system security officer (ISSO), configure the operating system to notify SA staff and information system security officer (ISSO) staff in the event of an audit processing failure by setting the "disk_full_action" to "SYSLOG". Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: (depending on configuration, "disk_full_action" can be set to "SYSLOG" or "SINGLE") environment.etc."audit/auditd.conf".text = [ '' disk_full_action = HALT '' ]; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- AU-5
- Severity
- M
- CCI
- CCI-000140
- Version
- ANIX-00-000450
- Vuln IDs
-
- V-268106
- Rule IDs
-
- SV-268106r1131014_rule
Checks: C-72030r1039204_chk
Verify NixOS takes the appropriate action when an audit processing failure occurs. Check that NixOS takes the appropriate action when an audit processing failure occurs with the following command: $ sudo grep disk_error_action /etc/audit/auditd.conf disk_error_action = HALT If the value of the "disk_error_action" option is not "SYSLOG", "SINGLE", or "HALT", or the line is commented out, ask the system administrator (SA) to indicate how the system takes appropriate action when an audit process failure occurs. If there is no evidence of appropriate action, this is a finding.
Fix: F-71933r1131013_fix
Configure NixOS to shut down by default upon audit failure (unless availability is an overriding concern). If availability has been determined to be more important, and this decision is documented with the information system security officer (ISSO), configure the operating system to notify SA staff and ISSO staff in the event of an audit processing failure by setting the "disk_error_action" to "SYSLOG". Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: (depending on configuration, "disk_error_action" can be set to "SYSLOG" or "SINGLE"): environment.etc."audit/auditd.conf".text = [ '' disk_error_action = HALT '' ]; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- AU-6
- Severity
- M
- CCI
- CCI-000154
- Version
- ANIX-00-000460
- Vuln IDs
-
- V-268107
- Rule IDs
-
- SV-268107r1131017_rule
Checks: C-72031r1131015_chk
Verify that the systemd-journald service is running with the following command: $ systemctl status systemd-journald.service systemd-journald.service - Journal Service Loaded: loaded (/etc/systemd/system/systemd-journald.service; enabled; preset: ignored) Drop-In: /nix/store/z8klzmxqgpmn8ganwrsqizy3qdxnirr8-system-units/systemd-journald.service.d +-overrides.conf Active: active (running) since Mon 2025-03-10 10:41:08 PDT; 1 day 2h ago If the systemd-journald.service is not "active" and "running", this is a finding.
Fix: F-71934r1131016_fix
Configure the operating system to off-load audit logs. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: services.journald.audit = true; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- AU-6
- Severity
- M
- CCI
- CCI-000154
- Version
- ANIX-00-000480
- Vuln IDs
-
- V-268108
- Rule IDs
-
- SV-268108r1131020_rule
Checks: C-72032r1131018_chk
Verify the audit system off-loads audit records onto a different system or media from the system being audited. List the configured destinations with the following command: $ grep -i "Url" /etc/systemd/journal-upload.conf" If no URL is configured, this is a finding.
Fix: F-71935r1131019_fix
Configure the operating system to off-load audit records onto a different system or media from the system being audited by specifying a remote destination in the systemd-journald configuration. On the client, modify /etc/nixos/configuration.nix or /etc/nixos/flake.nix to include the following lines: services.journald.upload = { enable = true; Upload = { ServerKeyFile = $PATH_TO_CLIENT_PEM_SSL_KEY; URL = $URL_OF_REMOTE_SERVER; ServerCertificateFile = $PATH_TO_SSL_CERT; TrustedCertificateFile = $PATH_TO_SERVER_CERT; }; }; } On the server, modify /etc/nixos/configuration.nix or /etc/nixos/flake.nix to include the following lines: services.journald.remote = { enable = true; listen = "https"; URL = $URL_OF_REMOTE_SERVER; ServerKeyFile = $PATH_TO_SERVER_PEM_SSL_KEY; ServerCertificateFile = $PATH_TO_SSL_CERT; }; };
- RMF Control
- AU-6
- Severity
- M
- CCI
- CCI-000154
- Version
- ANIX-00-000490
- Vuln IDs
-
- V-268109
- Rule IDs
-
- SV-268109r1131023_rule
Checks: C-72033r1131021_chk
Verify the operating system authenticates the remote logging server for off-loading audit logs. List the configured destinations with the following command: $ grep -i "TrustedCertificateFile" /etc/systemd/journal-upload.conf" If no TrustedCertificateFile is configured or is set to "all", this is a finding.
Fix: F-71936r1131022_fix
Configure the operating system to authenticate the remote logging server for off-loading audit logs. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: destination d_network { syslog( "<remote-logging-server>" port(<port>) transport(tls) tls( cert-file("/var/syslog-ng/certs.d/certificate.crt") key-file("/var/syslog-ng/certs.d/certificate.key") ca-file("/var/syslog-ng/certs.d/cert-bundle.crt") peer-verify(yes) ) ); }; log { source(s_local); destination(d_local); destination(d_network); }; For example, an updated configuration of 'services.rsyslogd.extraConfig' would look like the following in /etc/nixos/configuration.nix ('...' denoting that the 'services.rsyslogd.extraConfig' configuration may have other options configured): services.rsyslogd.extraConfig = '' ... destination d_network { syslog( "<remote-logging-server>" port(<port>) transport(tls) tls( cert-file("/var/syslog-ng/certs.d/certificate.crt") key-file("/var/syslog-ng/certs.d/certificate.key") ca-file("/var/syslog-ng/certs.d/cert-bundle.crt") peer-verify(yes) ) ); }; log { source(s_local); destination(d_local); destination(d_network); }; ... ''; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- AU-9
- Severity
- M
- CCI
- CCI-000162
- Version
- ANIX-00-000520
- Vuln IDs
-
- V-268110
- Rule IDs
-
- SV-268110r1131025_rule
Checks: C-72034r1039216_chk
Verify the audit daemon is configured to generate logs that are group-owned by root with the following command: $ sudo grep log_group /etc/audit/auditd.conf log_group = root If the audit daemon is not configured to generate logs that are group-owned by "root", this is a finding.
Fix: F-71937r1131024_fix
Configure the audit daemon to generate logs that are group-owned by root. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: environment.etc."audit/auditd.conf".text = [ '' log_group = root '' ]; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- AU-9
- Severity
- M
- CCI
- CCI-000162
- Version
- ANIX-00-000530
- Vuln IDs
-
- V-268111
- Rule IDs
-
- SV-268111r1039221_rule
Checks: C-72035r1039219_chk
Verify the audit directory and logs are owned by "root". First, determine where the audit logs are stored with the following command: $ sudo grep log_file /etc/audit/auditd.conf log_file = /var/log/audit/audit.log Using the location of the audit log file (if not specified, the default location is "/var/log/audit/audit.log"), determine if the audit log is owned by "root" using the following command: $ sudo find /var/log/audit -exec stat -c "%U %n" {} \; root /var/log/audit root /var/log/audit/audit.log If the audit directory and logs are not owned by "root", this is a finding.
Fix: F-71938r1039220_fix
Configure the audit directory and logs to be protected from unauthorized read access, by setting the correct owner as "root". Using the path of the directory containing the audit logs (if not specified, the default location is "/var/log/audit/audit.log"), configure the audit directory and log files to be owned by "root" by using the following command: $ sudo chown -R root /var/log/audit
- RMF Control
- AU-9
- Severity
- M
- CCI
- CCI-000162
- Version
- ANIX-00-000540
- Vuln IDs
-
- V-268112
- Rule IDs
-
- SV-268112r1039224_rule
Checks: C-72036r1039222_chk
Verify the audit directory and logs are group-owned by "root". First, determine where the audit logs are stored with the following command: $ sudo grep log_file /etc/audit/auditd.conf log_file = /var/log/audit/audit.log Using the location of the audit log file (if not specified, the default location is "/var/log/audit/audit.log"), determine if the audit log is group-owned by "root" using the following command: $ sudo find /var/log/audit -exec stat -c "%G %n" {} \; root /var/log/audit root /var/log/audit/audit.log If the audit directory and logs are not group-owned by "root", this is a finding.
Fix: F-71939r1039223_fix
Configure the audit directory and logs to be protected from unauthorized read access, by setting the correct group-owner as "root". Using the path of the directory containing the audit logs (if not specified, the default location is "/var/log/audit/audit.log"), configure the audit directory and log files to be group-owned by "root" by using the following command: $ sudo chown -R :root /var/log/audit
- RMF Control
- AU-9
- Severity
- M
- CCI
- CCI-000162
- Version
- ANIX-00-000550
- Vuln IDs
-
- V-268113
- Rule IDs
-
- SV-268113r1039227_rule
Checks: C-72037r1039225_chk
Verify that the audit log directory has a mode of "0700" or less permissive. First, determine where the audit logs are stored with the following command: $ sudo grep log_file /etc/audit/auditd.conf log_file = /var/log/audit/audit.log Using the path of the directory containing the audit logs, check if the audit log directory has a mode of "0700" or less by using the following command: $ sudo find /var/log/audit -type d -exec stat -c "%a %n" {} \; 700 /var/log/audit If the audit log directory (or any subfolders) has a mode more permissive than "0700", this is a finding.
Fix: F-71940r1039226_fix
Configure the audit log directory to have a mode of "0700" or less permissive. Using the path of the directory containing the audit logs, configure the audit log directory to have a mode of "0700" or less permissive by using the following command: $ sudo chmod 0700 /var/log/audit
- RMF Control
- AU-9
- Severity
- M
- CCI
- CCI-000162
- Version
- ANIX-00-000560
- Vuln IDs
-
- V-268114
- Rule IDs
-
- SV-268114r1039230_rule
Checks: C-72038r1039228_chk
Verify that the audit log files have a mode of "0600" or less permissive. First, determine where the audit logs are stored with the following command: $ sudo grep log_file /etc/audit/auditd.conf log_file = /var/log/audit/audit.log Using the path of the directory containing the audit logs, check if the audit log files have a mode of "0600" or less by using the following command: $ sudo find /var/log/audit -type f -exec stat -c "%a %n" {} \; 600 /var/log/audit/audit.log If the audit log files have a mode more permissive than "0600", this is a finding.
Fix: F-71941r1039229_fix
Verify that the audit log files have a mode of "0600" or less permissive. Using the path of the directory containing the audit logs, configure the audit log files have a mode of "0600" or less by using the following command: $ sudo chmod 0600 /var/log/audit/audit.log
- RMF Control
- AU-9
- Severity
- M
- CCI
- CCI-000162
- Version
- ANIX-00-000570
- Vuln IDs
-
- V-268115
- Rule IDs
-
- SV-268115r1131028_rule
Checks: C-72039r1131026_chk
Verify the journald directories and logs are owned by "root" by executing the following command: $ sudo find /var/log/journal -printf "%p %u\n" /var/log/journal root /var/log/journal/8960867736094c2089638a86c43fd755 root If any occurrences of owner are not "root", this is a finding.
Fix: F-71942r1131027_fix
The systemd-journald logs are by design stored with root:systemd-journald owner and group respectively. If any files are found with different ownership, run the following command to correct them: $ sudo chown -R root:systemd-journald /var/log/journald
- RMF Control
- AU-9
- Severity
- M
- CCI
- CCI-000162
- Version
- ANIX-00-000580
- Vuln IDs
-
- V-268116
- Rule IDs
-
- SV-268116r1131031_rule
Checks: C-72040r1131029_chk
Verify the journald directories and logs are group-owned by "systemd-journald" by executing the following command: $ sudo find /var/log/journal -not -group systemd-journal If any directories or files are returned, this is a finding.
Fix: F-71943r1131030_fix
The systemd-journald logs are by design stored with root:systemd-journald owner and group respectively. If any files are found with different ownership, run the following command to correct them: $ sudo chown -R root:systemd-journald /var/log/journald
- RMF Control
- AU-9
- Severity
- M
- CCI
- CCI-000162
- Version
- ANIX-00-000590
- Vuln IDs
-
- V-268117
- Rule IDs
-
- SV-268117r1131034_rule
Checks: C-72041r1131032_chk
Verify NixOS protects log information from unauthorized read access by implementing a mode of 2755 or less on the creation of log directories with the following command: $ sudo find /var/log/journal -type d -perm -2755 -not -perm 2755 -printf "%p %m\n" If any directories have a permission of greater than 2755, this is a finding.
Fix: F-71944r1131033_fix
The systemd-journald directories are by design set to 2755 mode. If any directories are found with incorrect perms, correct them with the following command: $ sudo find /var/log/journal -type d -exec chmod 2755 {} \;
- RMF Control
- AU-9
- Severity
- M
- CCI
- CCI-000162
- Version
- ANIX-00-000600
- Vuln IDs
-
- V-268118
- Rule IDs
-
- SV-268118r1131037_rule
Checks: C-72042r1131035_chk
Verify NixOS protects log information from unauthorized read access by implementing a mode of 0640 or less on the creation of log files with the following command: $ sudo find /var/log/journal -type f -perm -640 -not -perm 640 -printf "%p %m\n" If any log files have a permission of greater than 0640, this is a finding.
Fix: F-71945r1131036_fix
The systemd-journald files are by design set to 0640 mode. If any files are found with incorrect perms, correct them with the following command: $ sudo find /var/log/journal -type f -exec chmod 0640 {} \;
- RMF Control
- AU-9
- Severity
- M
- CCI
- CCI-000163
- Version
- ANIX-00-000610
- Vuln IDs
-
- V-268119
- Rule IDs
-
- SV-268119r1131040_rule
Checks: C-72043r1131038_chk
Verify the audit system prevents unauthorized changes to logon UIDs with the following command: $ sudo auditctl -s | grep -i immutable loginuid_immutable 1 locked If the command does not return "loginuid_immutable 1 locked", this is a finding.
Fix: F-71946r1131039_fix
Configure NixOS to prevent unauthorized changes to logon UIDs. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: security.audit.rules = [ "--loginuid-immutable" ]; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- AU-12
- Severity
- M
- CCI
- CCI-000171
- Version
- ANIX-00-000660
- Vuln IDs
-
- V-268120
- Rule IDs
-
- SV-268120r1131043_rule
Checks: C-72044r1131041_chk
Verify that the NixOS audit configuration and service files have a mode of 444 or less permissive with the following commands: $ sudo find -L /etc/audit -type f -exec stat -L -c "%a %n" {} \; $ sudo find -L /etc/systemd/system -iname "audit*" -type f -exec stat -L -c "%a %n" {} \; $ stat -c '%a %n' $(realpath /etc/systemd/system/audit*.service) 444 /etc/audit/auditd.conf 444 /etc/systemd/system/audit.service 444 /etc/systemd/system/auditd.service 444 /etc/systemd/system/basic.target.wants/audit.service 444 /etc/systemd/system/sysinit.target.wants/audit.service 444 /nix/store/dr3i90b3n1fb06fr1gw12jfg9wb8dkrc-unit-auditd.service/auditd.service 444 /nix/store/dc6s6z7ykbmq70i5z8cff0agwsmp9jhm-unit-audit.service/audit.service If the audit configuration files have a mode more permissive than 444, this is a finding.
Fix: F-71947r1131042_fix
Configure NixOS audit configuration and service files to have a mode of 444 or less permissive with the following command: Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- AU-12
- Severity
- M
- CCI
- CCI-000171
- Version
- ANIX-00-000670
- Vuln IDs
-
- V-268121
- Rule IDs
-
- SV-268121r1131046_rule
Checks: C-72045r1131044_chk
Verify that the NixOS audit configuration directories have a mode of "755" or less permissive with the following commands: $ sudo find -L /etc/audit -type d -exec stat -L -c "%a %n" {} \; 755 /etc/audit If the audit configuration files have a mode more permissive than "755", this is a finding.
Fix: F-71948r1131045_fix
Update the NixOS config, typically stored either in /etc/nixos/configuration.nix or /etc/nixos/flake.nix, to use a mode of 755 or less for directories under /etc/audit. Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- AU-12
- Severity
- M
- CCI
- CCI-000171
- Version
- ANIX-00-000680
- Vuln IDs
-
- V-268122
- Rule IDs
-
- SV-268122r1131049_rule
Checks: C-72046r1131047_chk
Verify that the NixOS audit configuration files and directories are owned by root with the following command: $ sudo find /etc/audit -exec stat -L -c "%U %n" {} \; $ sudo find /etc/systemd/system -follow -iname "audit*service" -exec stat -c "%U %n" {} \; root /etc/audit root /etc/audit/auditd.conf root /etc/systemd/system/audit.service root /etc/systemd/system/auditd.service root /etc/systemd/system/basic.target.wants/audit.service root /etc/systemd/system/sysinit.target.wants/auditd.service If the audit configuration files and directories are not owned by root, this is a finding.
Fix: F-71949r1131048_fix
Update the NixOS config, typically stored either in /etc/nixos/configuration.nix or /etc/nixos/flake.nix, to only use the root user for files under /etc/audit. Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- AU-12
- Severity
- M
- CCI
- CCI-000171
- Version
- ANIX-00-000690
- Vuln IDs
-
- V-268123
- Rule IDs
-
- SV-268123r1131052_rule
Checks: C-72047r1131050_chk
Verify that the NixOS audit configuration files and directories are group-owned by root with the following commands: $ sudo find /etc/audit -exec stat -L -c "%G %n" {} \; $ sudo find /etc/systemd/system -follow -iname "audit*service" -exec stat -c "%G %n" {} \; root /etc/audit root /etc/audit/auditd.conf root /etc/systemd/system/audit.service root /etc/systemd/system/auditd.service root /etc/systemd/system/basic.target.wants/audit.service root /etc/systemd/system/sysinit.target.wants/auditd.service If the system configuration files and directories are not group-owned by root or other privileged group (such as shadow), this is a finding.
Fix: F-71950r1131051_fix
Update the NixOS config, typically stored either in /etc/nixos/configuration.nix or /etc/nixos/flake.nix, to only use the root group for files under /etc/audit. Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- IA-5
- Severity
- M
- CCI
- CCI-000185
- Version
- ANIX-00-000710
- Vuln IDs
-
- V-268124
- Rule IDs
-
- SV-268124r1131055_rule
Checks: C-72048r1131053_chk
Verify NixOS only allows the use of DOD PKI-established certificate authorities by running the following: $ openssl x509 -text -in /etc/sssd/pki/sssd_auth_ca_db.pem Certificate: Data: Version: 3 (0x2) Serial Number: 1 (0x1) Signature Algorithm: sha256WithRSAEncryption Issuer: C = US, O = U.S. Government, OU = DOD, OU = PKI, CN = DOD Root CA 3 Validity Not Before: Mar 20 18:46:41 2012 GMT Not After : Dec 30 18:46:41 2029 GMT Subject: C = US, O = U.S. Government, OU = DOD, OU = PKI, CN = DOD Root CA 3 Subject Public Key Info: Public Key Algorithm: rsaEncryption If the root CA file is not a DOD-issued certificate with a valid date and installed in the /etc/sssd/pki/sssd_auth_ca_db.pem location, this is a finding.
Fix: F-71951r1131054_fix
Configure NixOS to authenticate using DOD's root CA. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: services.sssd.enable = true; environment.etc."sssd/pki/sssd_auth_ca_db.pem".source = let certzip = pkgs.fetchzip { url = "https://dl.dod.cyber.mil/wp-content/uploads/pki-pke/zip/unclass-certificates_pkcs7_v5-6_dod.zip"; sha256 = "sha256-iwwJRXCnONk/LFddQlwy8KX9e9kVXW/QWDnX5qZFZjc="; }; in "${certzip}/DOD_PKE_CA_chain.pem"; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- IA-5
- Severity
- M
- CCI
- CCI-000186
- Version
- ANIX-00-000720
- Vuln IDs
-
- V-268125
- Rule IDs
-
- SV-268125r1039263_rule
Checks: C-72049r1039261_chk
Verify the SSH private key files have a passcode. For each private key stored on the system, use the following command: $ sudo ssh-keygen -y -f /path/to/file If the contents of the key are displayed, this is a finding.
Fix: F-71952r1039262_fix
Create new private/public key pairs that use a passcode using the following command: $ sudo ssh-keygen -n [passphrase]
- RMF Control
- Severity
- M
- CCI
- CCI-004066
- Version
- ANIX-00-000730
- Vuln IDs
-
- V-268126
- Rule IDs
-
- SV-268126r1131057_rule
Checks: C-72050r1039264_chk
Verify NixOS enforces password complexity by requiring at least one uppercase character with the following command: $ grep ucredit /etc/security/pwquality.conf ucredit=-1 If the value of "ucredit" is a positive number or is commented out, this is a finding.
Fix: F-71953r1131056_fix
Configure NixOS to enforce password complexity. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: environment.etc."/security/pwquality.conf".text = '' ucredit=-1 ''; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- Severity
- M
- CCI
- CCI-004066
- Version
- ANIX-00-000740
- Vuln IDs
-
- V-268127
- Rule IDs
-
- SV-268127r1131059_rule
Checks: C-72051r1039267_chk
Verify NixOS enforces password complexity by requiring at least one lowercase character with the following command: $ grep lcredit /etc/security/pwquality.conf lcredit=-1 If the value of "lcredit" is a positive number or is commented out, this is a finding.
Fix: F-71954r1131058_fix
Configure NixOS to enforce password complexity. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: environment.etc."/security/pwquality.conf".text = '' lcredit=-1 ''; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- Severity
- M
- CCI
- CCI-004066
- Version
- ANIX-00-000750
- Vuln IDs
-
- V-268128
- Rule IDs
-
- SV-268128r1131061_rule
Checks: C-72052r1039270_chk
Verify NixOS enforces password complexity by requiring at least one numeric character with the following command: $ grep dcredit /etc/security/pwquality.conf dcredit=-1 If the value of "dcredit" is a positive number or is commented out, this is a finding.
Fix: F-71955r1131060_fix
Configure NixOS to enforce password complexity. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: environment.etc."/security/pwquality.conf".text = '' dcredit=-1 ''; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- Severity
- M
- CCI
- CCI-004066
- Version
- ANIX-00-000760
- Vuln IDs
-
- V-268129
- Rule IDs
-
- SV-268129r1131063_rule
Checks: C-72053r1039273_chk
Verify NixOS enforces password complexity by requiring that at least 50 percent of the characters are changed with the following command: $ grep difok /etc/security/pwquality.conf difok=8 If the value of "difok" is set to less than "8", or is commented out, this is a finding.
Fix: F-71956r1131062_fix
Configure NixOS to enforce password complexity. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: environment.etc."/security/pwquality.conf".text = '' difok=8 ''; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- Severity
- H
- CCI
- CCI-004062
- Version
- ANIX-00-000770
- Vuln IDs
-
- V-268130
- Rule IDs
-
- SV-268130r1131065_rule
Checks: C-72054r1039276_chk
Verify NixOS stores only encrypted representations of passwords with the following command: $ grep ENCRYPT_METHOD /etc/login.defs ENCRYPT_METHOD SHA512 If "ENCRYPT_METHOD" does not equal SHA512 or greater, is commented out, or is missing, this is a finding.
Fix: F-71957r1131064_fix
Configure NixOS to store only encrypted representations of passwords. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: security.loginDefs.settings.ENCRYPT_METHOD = "SHA512"; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- IA-5
- Severity
- H
- CCI
- CCI-000197
- Version
- ANIX-00-000780
- Vuln IDs
-
- V-268131
- Rule IDs
-
- SV-268131r1131067_rule
Checks: C-72055r1039279_chk
Ensure the telnet package is not installed and available with the following command: $ whereis telnet telnet: If there is a path, and the output looks like "telnet: /nix/store/sqiphymcpky1yysgdc1aj4lr9jg9n53a-inetutils-2.2/bin/telnet", this is a finding.
Fix: F-71958r1131066_fix
Edit the NixOS Configuration file /etc/nixos/configuration.nix or /etc/nixos/flake.nix and remove any references to pkgs.libtelnet, pkgs.busybox, or pkgs.inetutils from the environment.systemPackages list. Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- Severity
- M
- CCI
- CCI-004066
- Version
- ANIX-00-000790
- Vuln IDs
-
- V-268132
- Rule IDs
-
- SV-268132r1131069_rule
Checks: C-72056r1039282_chk
Verify NixOS enforces 24 hours/one day as the minimum password lifetime with the following command: $ grep PASS_MIN_DAYS /etc/login.defs PASS_MIN_DAYS 1 If PASS_MIN_DAYS_1 is not present, is commented out, or is a value different from 1, this is a finding.
Fix: F-71959r1131068_fix
Configure NixOS operating system to enforce 24 hours/one day as the minimum password lifetime. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: security.loginDefs.settings.PASS_MIN_DAYS = "1"; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- Severity
- M
- CCI
- CCI-004066
- Version
- ANIX-00-000800
- Vuln IDs
-
- V-268133
- Rule IDs
-
- SV-268133r1131071_rule
Checks: C-72057r1039285_chk
Verify NixOS enforces a 60-day maximum password lifetime for new user accounts by running the following command: $ grep PASS_MAX_DAYS /etc/login.defs PASS_MAX_DAYS 60 If the "PASS_MAX_DAYS" parameter value is less than 60 or commented out, this is a finding.
Fix: F-71960r1131070_fix
Configure NixOS operating system to enforce a 60-day maximum password lifetime. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: security.loginDefs.settings.PASS_MAX_DAYS = "60"; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- Severity
- M
- CCI
- CCI-004066
- Version
- ANIX-00-000810
- Vuln IDs
-
- V-268134
- Rule IDs
-
- SV-268134r1131073_rule
Checks: C-72058r1039288_chk
Verify NixOS enforces a minimum 15-character password length with the following command: $ grep minlen /etc/security/pwquality.conf minlen=15 If the value of "minlen" is set to less than "15", or is commented out, this is a finding.
Fix: F-71961r1131072_fix
Configure NixOS to enforce password complexity. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: environment.etc."/security/pwquality.conf".text = '' minlen=15 ''; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- IA-2
- Severity
- M
- CCI
- CCI-000764
- Version
- ANIX-00-000840
- Vuln IDs
-
- V-268135
- Rule IDs
-
- SV-268135r1039293_rule
Checks: C-72059r1039291_chk
Verify the NixOS operating system contains no duplicate User IDs (UIDs) for interactive users with the following command: $ awk -F ":" 'list[$3]++{print $1, $3}' /etc/passwd If output is produced and the accounts listed are interactive user accounts, this is a finding.
Fix: F-71962r1039292_fix
Configure the NixOS to uniquely identify and authenticate nonorganizational users by editing the file "/etc/passwd" and provide each interactive user account that has a duplicate UID with a unique UID.
- RMF Control
- IA-2
- Severity
- M
- CCI
- CCI-000765
- Version
- ANIX-00-000850
- Vuln IDs
-
- V-268136
- Rule IDs
-
- SV-268136r1131076_rule
Checks: C-72060r1131074_chk
Verify NixOS has the packages required for multifactor authentication installed with the following command: $ which p11sak /run/current-system/sw/bin/p11sak If the "p11sak" program is not found in PATH, this is a finding.
Fix: F-71963r1131075_fix
Configure NixOS to have a package that enforces multifactor authentication installed. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: environment.systemPackages = [ pkgs.opencryptoki ]; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- Severity
- M
- CCI
- CCI-004045
- Version
- ANIX-00-000890
- Vuln IDs
-
- V-268137
- Rule IDs
-
- SV-268137r1131078_rule
Checks: C-72061r1039297_chk
Verify the NixOS configuration disallows directly logging into the root account via SSH with the following command: $ grep PermitRootLogin /etc/ssh/sshd_config PermitRootLogin no If the value is anything other than "no", this is a finding.
Fix: F-71964r1131077_fix
Configure NixOS to ensure the root user login via SSH is disabled. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: services.openssh.permitRootLogin = "no"; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- Severity
- M
- CCI
- CCI-004045
- Version
- ANIX-00-000900
- Vuln IDs
-
- V-268138
- Rule IDs
-
- SV-268138r1131081_rule
Checks: C-72062r1131079_chk
Verify the NixOS operating system prevents directly logging in to the root account with the following command: $ sudo passwd -S root root L 01/02/1970 -1 -1 -1 -1 If the second field in the output is not "L" or "NP", then the root account is not locked and has a password configured, and this is a finding.
Fix: F-71965r1131080_fix
Configure NixOS to ensure the root user is locked. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: users.mutableUsers = false; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- IA-3
- Severity
- M
- CCI
- CCI-000778
- Version
- ANIX-00-000930
- Vuln IDs
-
- V-268139
- Rule IDs
-
- SV-268139r1131083_rule
Checks: C-72063r1039303_chk
Verify NixOS had enabled the use of the USBGuard with the following command: $ systemctl status usbguard usbguard.service - USBGuard daemon Loaded: loaded (/etc/systemd/system/usbguard.service; enabled; present: enabled) Active: active (running) since Sat 2022-06-04 02:51:43 UTC; 13min ago If the usbguard.service is not "active" and "running", this is a finding.
Fix: F-71966r1131082_fix
Configure NixOS to enable USBGuard and generate a USBGuard ruleset. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: services.usbguard.enable = true; Rebuild the system configuration by running the following command: $ sudo nixos-rebuild switch As root, generate a usbguard configuration. Using the "usbguard" command, use "usbguard list-devices" to list connected USB devices, "usbguard block-device" to block a device, and "usbguard allow-device" to allow a device. Note that the default behavior is to block devices. When all connected USB devices have been permitted, generate a ruleset by running the following command as root: # usbguard generate-policy Edit the NixOS config to add the policy: services.usbguard.rules = '' allow id 1d6b:0001 serial "0000:00:01.2" name "UHCI Host Controller" hash "FRDEjz7OhdJbNjmJ8zityiNX/LuO+ovKC07I0bOFjao=" parent-hash "9+Zsfvo9IR/AEQ/Fn4mzdoPGk0rqpjku6uErfS09K4c=" with-interface 09:00:00 with-connect-type "" allow id 0627:0001 serial "28754-0000:00:01.2-1" name "QEMU USB Tablet" hash "5TyVK8wyL5GmiIbZV2Sf/ehIRMCP83miy4kOzG6O+2M=" parent-hash "FRDEjz7OhdJbNjmJ8zityiNX/LuO+ovKC07I0bOFjao=" with-interface 03:00:00 with-connect-type "unknown" ''; Note: This ruleset is only an example; generate a policy using the process described above. Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- SC-4
- Severity
- M
- CCI
- CCI-001090
- Version
- ANIX-00-000970
- Vuln IDs
-
- V-268140
- Rule IDs
-
- SV-268140r1117267_rule
Checks: C-72064r1039306_chk
Verify NixOS is configured with the sticky bit on world-writable directories with the following command: $ sudo find / -type d \( -perm -0002 -a ! -perm -1000 \) -print 2>/dev/null If any of the returned directories are world-writable and do not have the sticky bit set, this is a finding.
Fix: F-71967r1039307_fix
Configure all public directories to have the sticky bit set to prevent unauthorized and unintended information transferred via shared system resources. Set the sticky bit on all public directories using the following command, replacing "[Public Directory]" with any directory path missing the sticky bit: $ sudo chmod +t [Public Directory]
- RMF Control
- SC-5
- Severity
- M
- CCI
- CCI-001095
- Version
- ANIX-00-000980
- Vuln IDs
-
- V-268141
- Rule IDs
-
- SV-268141r1131085_rule
Checks: C-72065r1039309_chk
Verify NixOS is configured to use IPv4 TCP syncookies with the following command: $ sudo sysctl net.ipv4.tcp_syncookies net.ipv4.tcp_syncookies = 1 If the network parameter "ipv4.tcp_syncookies" is not equal to "1" or nothing is returned, this is a finding.
Fix: F-71968r1131084_fix
Configure the audit service to use IPv4 TCP syncookies. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: boot.kernel.sysctl = { "net.ipv4.tcp_syncookies"=1; }; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- SC-10
- Severity
- M
- CCI
- CCI-001133
- Version
- ANIX-00-000990
- Vuln IDs
-
- V-268142
- Rule IDs
-
- SV-268142r1131087_rule
Checks: C-72066r1039312_chk
Verify that all network connections associated with SSH traffic are automatically terminated after 10 minutes of becoming unresponsive with the following command: $ grep -i clientaliveinterval /etc/ssh/sshd_config ClientAliveInterval 600 If "ClientAliveInterval" does not have a value of "600" or less, is commented out, or is missing, this is a finding.
Fix: F-71969r1131086_fix
Configure NixOS to automatically terminate all network connections associated with SSH traffic after being unresponsive for 10 minutes. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: services.openssh.extraConfig = '' ClientAliveInterval 600 ''; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- SC-10
- Severity
- M
- CCI
- CCI-001133
- Version
- ANIX-00-001000
- Vuln IDs
-
- V-268143
- Rule IDs
-
- SV-268143r1131089_rule
Checks: C-72067r1039315_chk
Verify that all network connections associated with SSH traffic are automatically terminated after becoming unresponsive with the following command: $ grep -i clientalivecount /etc/ssh/sshd_config ClientAliveCountMax 1 If "ClientAliveCountMax" is not set to "1", is commented out, or is missing, this is a finding.
Fix: F-71970r1131088_fix
Configure NixOS to automatically terminate all network connections associated with SSH traffic after being unresponsive. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: services.openssh.extraConfig = '' ClientAliveCountMax 1 ''; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- SC-28
- Severity
- H
- CCI
- CCI-001199
- Version
- ANIX-00-001010
- Vuln IDs
-
- V-268144
- Rule IDs
-
- SV-268144r1039320_rule
Checks: C-72068r1039318_chk
Verify NixOS prevents unauthorized disclosure or modification of all information requiring at-rest protection by using disk encryption. Verify all system partitions are encrypted with the following command: $ sudo blkid /dev/sda1: LABEL="nixos" UUID="67b7d7fe-de60-6fd0-befb-e6748cf97743" TYPE="crypto_LUKS" Every persistent disk partition present must be of type "crypto_LUKS". If any partitions other than the boot partition or pseudo file systems (such as /proc or /sys) are not type "crypto_LUKS", ask the administrator to indicate how the partitions are encrypted. If there is no evidence that these partitions are encrypted, this is a finding.
Fix: F-71971r1039319_fix
Configure NixOS to prevent unauthorized modification of all information at rest by using disk encryption. Encrypting a partition in an already installed system is more difficult, because existing partitions will need to be resized and changed. To encrypt an entire partition, dedicate a partition for encryption in the partition layout. Refer to the NixOS manual Section 8.1 "LUKS-Encrypted File Systems" for further details. NixOS Wiki: https://nixos.wiki/wiki/Full_Disk_Encryption
- RMF Control
- Severity
- M
- CCI
- CCI-004066
- Version
- ANIX-00-001160
- Vuln IDs
-
- V-268145
- Rule IDs
-
- SV-268145r1131091_rule
Checks: C-72069r1039321_chk
Verify NixOS enforces the use of at least one special character in passwords with the following command: $ grep minlen /etc/security/pwquality.conf ocredit=-1 If the value of "ocredit" is a positive number or is commented out, this is a finding.
Fix: F-71972r1131090_fix
Configure NixOS to enforce password complexity. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: environment.etc."/security/pwquality.conf".text = '' ocredit=-1 ''; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- AC-18
- Severity
- H
- CCI
- CCI-001444
- Version
- ANIX-00-001250
- Vuln IDs
-
- V-268146
- Rule IDs
-
- SV-268146r1131093_rule
Checks: C-72070r1039324_chk
Verify NixOS disables wireless adapters by running the following command: $ grep -R networking.wireless /etc/nixos/ /etc/nixos/configuratino.nix:networking.wireless.enable = false; If " networking.wireless.enable", does not equal false, is missing, or is commented out, this is a finding.
Fix: F-71973r1131092_fix
Configure the audit service to disable wireless interfaces. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: networking.wireless.enable = false; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- AC-18
- Severity
- M
- CCI
- CCI-001443
- Version
- ANIX-00-001260
- Vuln IDs
-
- V-268147
- Rule IDs
-
- SV-268147r1131095_rule
Checks: C-72071r1039327_chk
Verify NixOS disables Bluetooth adapters by running the following command: $ grep -R hardware.bluetooth /etc/nixos/ /etc/nixos/configuration.nix:hardware.bluetooth.enable = false; If "hardware.bluetooth.enable", does not equal false, is missing, or is commented out, this is a finding.
Fix: F-71974r1131094_fix
Configure the audit service to disable Bluetooth adapters. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: hardware.bluetooth.enable = false; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- AC-6
- Severity
- M
- CCI
- CCI-002233
- Version
- ANIX-00-001280
- Vuln IDs
-
- V-268148
- Rule IDs
-
- SV-268148r1131097_rule
Checks: C-72072r1039330_chk
Verify NixOS audits and provides alerts of audit failures by running the following command: $grep A -15 security.auditd /etc/nixos/configuration.nix /etc/nixos/configuration.nix: security.auditd.enable = true; security.audit.enable = true; security.audit.rules = [ '' <audit_rules> '' ]; security.audit.rules = [ "-a always,exit -F arch=b32 -S execve -C uid!=euid -F euid=0 -k execpriv" "-a always,exit -F arch=b64 -S execve -C uid!=euid -F euid=0 -k execpriv" "-a always,exit -F arch=b32 -S execve -C gid!=egid -F egid=0 -k execpriv" "-a always,exit -F arch=b64 -S execve -C gid!=egid -F egid=0 -k execpriv" ]; If "security.auditd", "security.audit" and the additional modifications do not equal true, are missing, or are commented out, this is a finding.
Fix: F-71975r1131096_fix
Configure the audit service to produce audit records. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: security.auditd.enable = true; security.audit.enable = true; Add the following audit rules: security.audit.rules = [ "-a always,exit -F arch=b32 -S execve -C uid!=euid -F euid=0 -k execpriv" "-a always,exit -F arch=b64 -S execve -C uid!=euid -F euid=0 -k execpriv" "-a always,exit -F arch=b32 -S execve -C gid!=egid -F egid=0 -k execpriv" "-a always,exit -F arch=b64 -S execve -C gid!=egid -F egid=0 -k execpriv" ]; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- Severity
- M
- CCI
- CCI-004923
- Version
- ANIX-00-001420
- Vuln IDs
-
- V-268149
- Rule IDs
-
- SV-268149r1131099_rule
Checks: C-72073r1039333_chk
Verify NixOS is configured with an approved time server with the following command: $ timedatectl show-timesync | grep NTPServers SystemNTPServers=tick.usnogps.navy.mil FallbackNTPServers=tock.usnogps.navy.mil If the output of the command does not list authorized time servers, this is a finding.
Fix: F-71976r1131098_fix
Configure NixOS to use approved timeservers. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: networking.timeServers = [ "tick.usnogps.navy.mil" "tock.usnogps.navy.mil" ]; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- Severity
- M
- CCI
- CCI-004926
- Version
- ANIX-00-001430
- Vuln IDs
-
- V-268150
- Rule IDs
-
- SV-268150r1131101_rule
Checks: C-72074r1039336_chk
Verify NixOS synchronizes internal information system clocks to the authoritative time source when the time difference is greater than one second with the following command: $ grep -iR pollinterval /etc/nixos/ services.timesyncd.extraConfig = "PollIntervalMaxSec=60"; If "PollIntervalMaxSec" is greater than "60", is commented out, or is missing, this is a finding.
Fix: F-71977r1131100_fix
Configure NixOS to regularly synchronize the system clock. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: services.timesyncd.extraConfig = '' PollIntervalMaxSec=60 ''; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- Severity
- M
- CCI
- CCI-004926
- Version
- ANIX-00-001440
- Vuln IDs
-
- V-268151
- Rule IDs
-
- SV-268151r1131103_rule
Checks: C-72075r1039339_chk
Verify NixOS synchronizes internal information system clocks to the authoritative time source when the time difference is greater than one second with the following command: $ grep -iR timesyncd.enable /etc/nixos/ services.timesyncd.enable = true; If "services.timesyncd.enable" is not set to "true", is commented out, or is missing, this is a finding.
Fix: F-71978r1131102_fix
Configure NixOS to regularly synchronize the system clock. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: services.timesyncd.enable = true; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- Severity
- M
- CCI
- CCI-003980
- Version
- ANIX-00-001450
- Vuln IDs
-
- V-268152
- Rule IDs
-
- SV-268152r1131105_rule
Checks: C-72076r1039342_chk
Verify NixOS prevents unauthorized users from using nix with the following command: $ grep -R allowed-users /etc/nixos/ /etc/nixos/configuration.nix:nix.settings.allowed-users = [ "root" "@wheel" ]; If any other groups or users are included in "nix.settings.allowed-users" other than "root" and "wheel", or the configuration setting does not exist, this is a finding.
Fix: F-71979r1131104_fix
Configure NixOS to prevent unauthorized users from using nix. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: nix.settings.allowed-users = [ "root" "@wheel" ]; Note: Extra usergroups may be permitted by adding them with the format "@group" (e.g.: "@users"). Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- CM-3
- Severity
- M
- CCI
- CCI-001744
- Version
- ANIX-00-001460
- Vuln IDs
-
- V-268153
- Rule IDs
-
- SV-268153r1131108_rule
Checks: C-72077r1131106_chk
Verify NixOS notifies if baseline configurations are changed with Advanced Intrusion Detection Environment with the following commands: $ systemctl is-active aide.service active If aide is not active and is not configured to alert on file system changes, this is a finding.
Fix: F-71980r1131107_fix
Configure NixOS to notify when baseline configuration changes. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: nixpkgs.overlays = [ (final: prev: { aide = prev.aide.overrideAttrs (old: { configureFlags = (old.configureFlags or [ ]) ++ [ "--sysconfdir=/etc" ]; }); }) ]; environment.systemPackages = [ pkgs.aide ]; environment.etc = { # Creates /etc/aide.conf "aide.conf" = { text = '' <CONFIG_TEXT> ''; mode = "0444"; }; }; services.cron = { enable = true; systemCronJobs = [ "00 0 * * 0\troot\taide -c /etc/aide.conf --check | /bin/mail -s "aide integrity check run for ${config.networking.hostName}" root@notareal.email" ]; }; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- Severity
- H
- CCI
- CCI-003992
- Version
- ANIX-00-001480
- Vuln IDs
-
- V-268154
- Rule IDs
-
- SV-268154r1131111_rule
Checks: C-72078r1131109_chk
Verify NixOS prevents installations that have not been digitally signed with the following command: $ grep -R require-sigs /etc/nix/nix.conf require-sigs = true If "require-sigs" is not set to "true" or is missing, this is a finding.
Fix: F-71981r1131110_fix
Configure NixOS to require signatures. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: nix.settings.require-sigs = true; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- CM-6
- Severity
- M
- CCI
- CCI-000366
- Version
- ANIX-00-001500
- Vuln IDs
-
- V-268155
- Rule IDs
-
- SV-268155r1131113_rule
Checks: C-72079r1039351_chk
Verify NixOS enforces reauthentication with sudo with the following command: $ sudo grep timestamp_timeout /etc/sudoers Defaults timestamp_timeout=0 If "timestamp_timeout" is greater than 0, is commented out, or is missing, this is a finding.
Fix: F-71982r1131112_fix
Configure NixOS to enforce reauthentication with sudo. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: security.sudo.extraConfig = '' Defaults timestamp_timeout=0 ''; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- CM-6
- Severity
- M
- CCI
- CCI-000366
- Version
- ANIX-00-001510
- Vuln IDs
-
- V-268156
- Rule IDs
-
- SV-268156r1131116_rule
Checks: C-72080r1131114_chk
Verify NixOS requires users to reauthenticate when changing roles with the following command: $ grep -iR "%wheel" /etc/sudoers %wheel ALL=(ALL:ALL) SETENV: ALL If the returned line contains "NOPASSWD", this is a finding.
Fix: F-71983r1131115_fix
Configure NixOS to require reauthentication for sudo. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: security.sudo.wheelNeedsPassword = true; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- MA-4
- Severity
- H
- CCI
- CCI-002890
- Version
- ANIX-00-001550
- Vuln IDs
-
- V-268157
- Rule IDs
-
- SV-268157r1131119_rule
Checks: C-72081r1131117_chk
Verify NixOS uses the following FIPS 140-3 approved MAC codes in openssh with the following command: $ grep Mac /etc/ssh/sshd_config Macs hmac-sha2-512 hmac-sha2-256 If "Macs" contains any ciphers other than "hmac-sha2-512" or "hmac-sha2-256", this is a finding.
Fix: F-71984r1131118_fix
Configure /etc/nixos/configuration.nix to use the following FIPS 140-3 approved MAC codes in openssh. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: services.openssh.macs = [ "hmac-sha2-512" "hmac-sha2-256" ]; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- SC-5
- Severity
- M
- CCI
- CCI-002385
- Version
- ANIX-00-001610
- Vuln IDs
-
- V-268158
- Rule IDs
-
- SV-268158r1131121_rule
Checks: C-72082r1039360_chk
Verify NixOS firewall enforces rate limits using the hashlimit module. $ sudo iptables -L | grep limit nixos-fw-refuse tcp -- anywhere anywhere tcp dpt:ssh limit: above 1000000b/s mode srcip nixos-fw-refuse tcp -- anywhere anywhere tcp dpt:http limit: above 1000/min burst 5 mode srcip nixos-fw-refuse tcp -- anywhere anywhere tcp dpt:https limit: above 1000/min burst 5 mode srcip If the command does not produce any rate limiting rules, this is a finding.
Fix: F-71985r1131120_fix
Configure the NixOS firewall to enforce rate limits using the hashlimit module. For example, to limit SSH to 1 MB/s and to limit HTTP to 1000 connections / minute per IP, add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: networking.firewall.enable = true; networking.firewall.extraCommands = '' ip46tables --append INPUT --protocol tcp --dport 22 --match hashlimit --hashlimit-name stig_byte_limit --hashlimit-mode srcip --hashlimit-above 1000000b/second --jump nixos-fw-refuse ip46tables --append INPUT --protocol tcp --dport 80 --match hashlimit --hashlimit-name stig_conn_limit --hashlimit-mode srcip --hashlimit-above 1000/minute --jump nixos-fw-refuse ip46tables --append INPUT --protocol tcp --dport 443 --match hashlimit --hashlimit-name stig_conn_limit --hashlimit-mode srcip --hashlimit-above 1000/minute --jump nixos-fw-refuse ''; Note: NixOS provides the helper script "ip46tables" to add rules using both "iptables" and "ip6tables". Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- SC-8
- Severity
- H
- CCI
- CCI-002418
- Version
- ANIX-00-001620
- Vuln IDs
-
- V-268159
- Rule IDs
-
- SV-268159r1131124_rule
Checks: C-72083r1131122_chk
Verify NixOS enables sshd for remote access with the following command: $ systemctl status sshd sshd.service - SSH daemon Loaded: loaded (/etc/systemd/system/sshd.service; enabled; present: enabled) Active: active (running) since Sat 2022-06-04 02:51:43 UTC; 13min ago If the sshd.service is not "active" and "running", this is a finding.
Fix: F-71986r1131123_fix
Configure NixOS to enable sshd for remote access. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: services.sshd.enable = true; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- SI-16
- Severity
- M
- CCI
- CCI-002824
- Version
- ANIX-00-001660
- Vuln IDs
-
- V-268160
- Rule IDs
-
- SV-268160r1131126_rule
Checks: C-72084r1039366_chk
Verify NixOS prevents internal kernel addresses from being leaked with the following command: $ sudo sysctl kernel.kptr_restrict kernel.kptr_restrict = 1 If "kernel.kptr_restrict" does not have a value of "1" or is missing, this is a finding.
Fix: F-71987r1131125_fix
Configure NixOS to prevent internal kernel addresses from being leaked. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: boot.kernel.sysctl = { "kernel.kptr_restrict" = 1; }; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- SI-16
- Severity
- M
- CCI
- CCI-002824
- Version
- ANIX-00-001670
- Vuln IDs
-
- V-268161
- Rule IDs
-
- SV-268161r1131128_rule
Checks: C-72085r1039369_chk
Verify NixOS enables address space layout randomization with the following command: $ sudo sysctl kernel.randomize_va_space kernel.randomize_va_space = 2 If "kernel.randomize_va_space" does not have a value of "2" or is missing, this is a finding.
Fix: F-71988r1131127_fix
Configure /etc/nixos/configuration.nix to enable ASLR. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: boot.kernel.sysctl = { "kernel.randomize_va_space" = 2; }; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- AU-12
- Severity
- M
- CCI
- CCI-000172
- Version
- ANIX-00-001720
- Vuln IDs
-
- V-268163
- Rule IDs
-
- SV-268163r1131131_rule
Checks: C-72087r1039375_chk
Verify the NixOS generates audit records when successful/unsuccessful attempts to modify security objects occur with the following command: $ sudo auditctl -l | grep xattr -a always,exit -F arch=b32 -S setxattr,fsetxattr,lsetxattr,removexattr,fremovexattr,lremovexattr -F auid>=1000 -F auid!=-1 -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!=-1 -k perm_mod -a always,exit -F arch=b64 -S setxattr,fsetxattr,lsetxattr,removexattr,fremovexattr,lremovexattr -F auid=0 -k perm_mod If the command does not return an audit rule for "setxattr", "fsetxattr", "lsetxattr", "removexattr", "fremovexattr", and "lremovexattr", this is a finding.
Fix: F-71990r1131130_fix
Configure NixOS to log attempts to modify security objects. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: security.audit.rules = [ "-a always,exit -F arch=b32 -S setxattr,fsetxattr,lsetxattr,removexattr,fremovexattr,lremovexattr -F auid>=1000 -F auid!=-1 -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!=-1 -k perm_mod" "-a always,exit -F arch=b64 -S setxattr,fsetxattr,lsetxattr,removexattr,fremovexattr,lremovexattr -F auid=0 -k perm_mod" ]; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- AU-12
- Severity
- M
- CCI
- CCI-000172
- Version
- ANIX-00-001730
- Vuln IDs
-
- V-268164
- Rule IDs
-
- SV-268164r1131133_rule
Checks: C-72088r1039378_chk
Verify NixOS generates audit records when attempts to delete privileges occur with the following command: $ sudo auditctl -l | grep usermod -a always,exit -S all -F path=/run/current-system/sw/bin/usermod -F perm=x -F auid>=1000 -F auid!=-1 -k privileged-usermod If the command does not return an audit rule for "usermod", this is a finding.
Fix: F-71991r1131132_fix
Configure NixOS to record attempts to delete privileges. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: security.audit.rules = [ "-a always,exit -F path=/run/current-system/sw/bin/usermod -F perm=x -F auid>=1000 -F auid!=unset -k privileged-usermod" ]; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- AU-12
- Severity
- M
- CCI
- CCI-000172
- Version
- ANIX-00-001740
- Vuln IDs
-
- V-268165
- Rule IDs
-
- SV-268165r1131135_rule
Checks: C-72089r1039381_chk
Verify that NixOS generates audit records when successful/unsuccessful attempts to delete security objects occur with the following command: $ sudo auditctl -l | grep /bin/ch -a always,exit -S all -F path=/run/current-system/sw/bin/chage -F perm=x -F auid>=1000 -F auid!=-1 -k privileged-chage -a always,exit -S all -F path=/run/current-system/sw/bin/chcon -F perm=x -F auid>=1000 -F auid!=-1 -k perm_mod If the command does not return an audit rule for "chage" and "chcon", this is a finding.
Fix: F-71992r1131134_fix
Configure NixOS to audit attempts to delete security objects. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: security.audit.rules = [ "-a always,exit -F path=/run/current-system/sw/bin/chage -F perm=x -F auid>=1000 -F auid!=unset -k privileged-chage" "-a always,exit -F path=/run/current-system/sw/bin/chcon -F perm=x -F auid>=1000 -F auid!=unset -k perm_mod" ]; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- AU-12
- Severity
- M
- CCI
- CCI-000172
- Version
- ANIX-00-001790
- Vuln IDs
-
- V-268166
- Rule IDs
-
- SV-268166r1131137_rule
Checks: C-72090r1039384_chk
Verify NixOS is configured to generate audit records with the following command: $ sudo auditctl -l | grep -w lastlog -w /var/log/lastlog -p wa -k logins If the command does not return a watch for the lastlog file, this is a finding.
Fix: F-71993r1131136_fix
Configure NixOS to generate audit logs on account creations and modifications. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: security.audit.rules = [ "-w /var/log/lastlog -p wa -k logins" ]; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- AU-12
- Severity
- M
- CCI
- CCI-000172
- Version
- ANIX-00-001820
- Vuln IDs
-
- V-268167
- Rule IDs
-
- SV-268167r1131139_rule
Checks: C-72091r1039387_chk
Verify NixOS is configured to generate audit records on account events with the following command: $ sudo auditctl -l | grep /etc -w /etc/sudoers -p wa -k identity -w /etc/passwd -p wa -k identity -w /etc/shadow -p wa -k identity -w /etc/gshadow -p wa -k identity -w /etc/group -p wa -k identity -w /etc/security/opasswd -p wa -k identity If the output from the command does not include the example output, this is a finding.
Fix: F-71994r1131138_fix
Configure NixOS to generate audit logs on account creations and modifications. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: security.audit.rules = [ "-w /etc/sudoers -p wa -k identity" "-w /etc/passwd -p wa -k identity" "-w /etc/shadow -p wa -k identity" "-w /etc/gshadow -p wa -k identity" "-w /etc/group -p wa -k identity" "-w /etc/security/opasswd -p wa -k identity" ]; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- SC-13
- Severity
- H
- CCI
- CCI-002450
- Version
- ANIX-00-001840
- Vuln IDs
-
- V-268168
- Rule IDs
-
- SV-268168r1131141_rule
Checks: C-72092r1039390_chk
Verify NixOS is configured to operate in FIPS mode with the following command: $ grep fips /proc/cmdline BOOT_IMAGE=(hd0,msdos1)/nix/store/glc0midc78caq9sc7pzciymx4c3in7kn-linux-6.1.64/bzImage init=/nix/store/grl4baymr9q60mbcz3sidm4agckn3bx5-nixos-system-nixos-23.1.1.20231129.057f9ae/init audit=1 audit_backlog_limit=8192 fips=1 loglevel=4 If the "fips" entry does not equal "1" or is missing, this is a finding.
Fix: F-71995r1131140_fix
Configure NixOS to run in FIPS mode. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: boot.kernelParams = [ "fips=1" ]; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch A reboot is required for the changes to take effect.
- RMF Control
- CM-6
- Severity
- M
- CCI
- CCI-000366
- Version
- ANIX-00-001860
- Vuln IDs
-
- V-268169
- Rule IDs
-
- SV-268169r1131144_rule
Checks: C-72093r1131142_chk
Verify NixOS prevents the use of dictionary words for passwords with the following command: $ grep dictcheck /etc/security/pwquality.conf dictcheck=1 If the value of "ocredit" is a positive number or is commented out, this is a finding.
Fix: F-71996r1131143_fix
Configure NixOS to check password change attempts against a dictionary. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: environment.etc."/security/pwquality.conf".text = '' dictcheck=1 ''; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- CM-6
- Severity
- M
- CCI
- CCI-000366
- Version
- ANIX-00-001861
- Vuln IDs
-
- V-268170
- Rule IDs
-
- SV-268170r1131146_rule
Checks: C-72094r1039396_chk
Verify NixOS prevents the use of dictionary words for passwords with the following command: $ grep -i pam_pwquality /etc/pam.d/passwd /etc/pam.d/chpasswd /etc/pam.d/sudo /etc/pam.d/passwd:password requisite /nix/store/db96zr26w71dzx0bzf47d88kw19fr0l7-libpwquality-1.4.5.-lib/lib/security/pam_pwquality.so /etc/pam.d/chpasswd:password requisite /nix/store/db96zr26w71dzx0bzf47d88kw19fr0l7-libpwquality-1.4.5.-lib/lib/security/pam_pwquality.so /etc/pam.d/sudo:password requisite /nix/store/db96zr26w71dzx0bzf47d88kw19fr0l7-libpwquality-1.4.5.-lib/lib/security/pam_pwquality.so If the pam_pwquality.so module is not present in the passwd, chpasswd, and sudo pam files, this is a finding.
Fix: F-71997r1131145_fix
Configure NixOS to check password change attempts against a dictionary. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: security.pam.services.passwd.text = pkgs.lib.mkDefault (pkgs.lib.mkBefore "password requisite ${pkgs.libpwquality.lib}/lib/security/pam_pwquality.so"); security.pam.services.chpasswd.text = pkgs.lib.mkDefault (pkgs.lib.mkBefore "password requisite ${pkgs.libpwquality.lib}/lib/security/pam_pwquality.so"); security.pam.services.sudo.text = pkgs.lib.mkDefault (pkgs.lib.mkBefore "password requisite ${pkgs.libpwquality.lib}/lib/security/pam_pwquality.so"); Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- CM-6
- Severity
- M
- CCI
- CCI-000366
- Version
- ANIX-00-001870
- Vuln IDs
-
- V-268171
- Rule IDs
-
- SV-268171r1134782_rule
Checks: C-72095r1134782_chk
Verify NixOS enforces a four-second delay between logon attempts with the following command: $ grep -I delay /etc/login.defs FAIL_DELAY 4 If "FAIL_DELAY" is not set to "4" or greater, is commented out, or is missing, this is a finding.
Fix: F-71998r1131148_fix
Configure NixOS to enforce a four-second delay between logon attempts. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: security.loginDefs.settings."FAIL_DELAY" = "4"; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- CM-6
- Severity
- H
- CCI
- CCI-000366
- Version
- ANIX-00-001880
- Vuln IDs
-
- V-268172
- Rule IDs
-
- SV-268172r1131152_rule
Checks: C-72096r1131150_chk
Verify NixOS does not allow an unattended or automatic logon to the system via the console with the following command: $ grep -iR autologon.user /etc/nixos If "services.xserver.displayManager.autologon.user" is defined and is not "null", this is a finding.
Fix: F-71999r1131151_fix
Configure NixOS to not allow an unattended or automatic logon to the system via the console. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: services.xserver.displayManager.autologon.user = null; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch A reboot is required for the changes to take effect.
- RMF Control
- CM-6
- Severity
- M
- CCI
- CCI-000366
- Version
- ANIX-00-001890
- Vuln IDs
-
- V-268173
- Rule IDs
-
- SV-268173r1131154_rule
Checks: C-72097r1039405_chk
Verify NixOS is configured to use AppArmor with the following command: $ sudo systemctl status apparmor.service apparmor.service - Load AppArmor policies Loaded: loaded (/etc/systemd/system/apparmor.service; enabled; present: enabled) Active: active (running) since Sat 2022-06-04 02:51:43 UTC; 13min ago If the "apparmor.service" is not enabled and active, this is a finding.
Fix: F-72000r1131153_fix
Configure NixOS to use AppArmor. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: security.apparmor.enable = true; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch A reboot is required for the changes to take effect.
- RMF Control
- Severity
- M
- CCI
- CCI-003627
- Version
- ANIX-00-001930
- Vuln IDs
-
- V-268174
- Rule IDs
-
- SV-268174r1131156_rule
Checks: C-72098r1039408_chk
Verify NixOS disables account identifiers (individuals, groups, roles, and devices) after 35 days of inactivity with the following command: $ grep -i inactive /etc/default/useradd INACTIVE=35 If INACTIVE is not set to 35 or less, or is missing or commented out, this is a finding.
Fix: F-72001r1131155_fix
Configure NixOS to disable inactive users. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: Ensure the lib functions are available: { config, lib, ... }: environment.etc."/default/useradd".text = lib.mkForce '' INACTIVE=35 ''; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- IA-7
- Severity
- M
- CCI
- CCI-000803
- Version
- ANIX-00-001940
- Vuln IDs
-
- V-268175
- Rule IDs
-
- SV-268175r1131158_rule
Checks: C-72099r1039411_chk
Verify NixOS uses employs approved cryptographic hashing algorithms for all stored passwords with the following command: (Change <unique-username> to the desired user to verify.) $ sudo cat /etc/shadow | grep "<unique-username>" | cut -d'$' -f2 If the command does not return 6 for SHA512, this is a finding.
Fix: F-72002r1131157_fix
Lock all interactive user accounts not using SHA-512 hashing until the passwords can be regenerated with SHA-512. $ sudo usermod -L $USERNAME
- RMF Control
- MA-4
- Severity
- H
- CCI
- CCI-000877
- Version
- ANIX-00-001960
- Vuln IDs
-
- V-268176
- Rule IDs
-
- SV-268176r1131160_rule
Checks: C-72100r1039414_chk
Verify NixOS employs strong authentication in the establishment of nonlocal sessions with SSH by the following command: $ sudo /run/current-system/sw/bin/sshd -G | grep pam usepam yes If usepam is not yes, this is a finding.
Fix: F-72003r1131159_fix
Configure NixOS to use strong authentication when establishing nonlocal maintenance and diagnostic sessions. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: openssh.settings.UsePAM = ''yes''; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- Severity
- M
- CCI
- CCI-004046
- Version
- ANIX-00-002010
- Vuln IDs
-
- V-268177
- Rule IDs
-
- SV-268177r1131162_rule
Checks: C-72101r1039417_chk
Verify NixOS provides authentication via the security and pam modules with the following command: $ cat /etc/nixos/configuration.nix | grep -A 1 security.pam.p11 security.pam.p11.enable = true; If security.pam.p11.enable is not. "true", is not present or is commented out, this is a finding.
Fix: F-72004r1131161_fix
Configure NixOS to use strong authentication when establishing nonlocal maintenance and diagnostic sessions. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: security.pam.p11.enable = true; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- IA-5
- Severity
- M
- CCI
- CCI-002007
- Version
- ANIX-00-002050
- Vuln IDs
-
- V-268178
- Rule IDs
-
- SV-268178r1131164_rule
Checks: C-72102r1039420_chk
Verify NixOS, for PKI-based authentication, only caches authenticators for one day with the following command: $ sudo grep expiration /etc/sssd/sssd.conf offline_credentials_expiration = 1 If the offline_credentials_expiration is not set to "1" or is commented out, this is a finding.
Fix: F-72005r1131163_fix
Configure NixOS to prohibit the use of cached credentials older than one day. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: Note: The entire sssd.conf must be entered in this option. services.sssd.config = '' ... [pam] offline_credentials_expiration = 1 ... ''; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- Severity
- M
- CCI
- CCI-004068
- Version
- ANIX-00-002060
- Vuln IDs
-
- V-268179
- Rule IDs
-
- SV-268179r1131166_rule
Checks: C-72103r1039423_chk
Verify NixOS, for PKI-based authentication, uses local revocation data when unable to access the network to obtain it remotely with the following command: $ grep cert_policy /etc/pam_pkcs11/pam_pkcs11.conf cert_policy = ca,signature,ocsp_on, crl_auto; If the cert_policy does not contain the options in the example output, this is a finding.
Fix: F-72006r1131165_fix
Configure NixOS, for PKI-based authentication, to use local revocation data when unable to access the network to obtain it remotely. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: security.pam.p11.enable = true; environment.etc."pam_pkcs11/pam_pkcs11.conf".text = '' cert_policy = ca,signature,ocsp_on, crl_auto; ''; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch
- RMF Control
- SI-2
- Severity
- M
- CCI
- CCI-002605
- Version
- ANIX-00-002160
- Vuln IDs
-
- V-268180
- Rule IDs
-
- SV-268180r1117152_rule
Checks: C-72104r1039426_chk
Verify NixOS is running a supported version with the following command: $ nixos-version 23.11.20231129.057f9ae (Tapir) If the NixOS is not running a supported version, this is a finding.
Fix: F-72007r1039427_fix
Update to a supported version of the operating system.
- RMF Control
- CM-6
- Severity
- M
- CCI
- CCI-000366
- Version
- ANIX-00-002180
- Vuln IDs
-
- V-268181
- Rule IDs
-
- SV-268181r1131169_rule
Checks: C-72105r1131167_chk
Verify the NixOS operating system defines default file permissions so users may only modify their own files. $ grep "UMASK" /etc/login.defs UMASK 077 If the UMASK setting is not present, is commented out, or is less restrictive than 077, this is a finding.
Fix: F-72008r1131168_fix
Configure the NixOS operating system to change default file permissions so users may only modify their own files. Add the following Nix code to the NixOS Configuration, usually located in /etc/nixos/configuration.nix or /etc/nixos/flake.nix: security.loginDefs.settings.UMASK = "077"; Rebuild and switch to the new NixOS configuration: $ sudo nixos-rebuild switch