Check: ANIX-00-000660
Anduril NixOS STIG:
ANIX-00-000660
(in version v1 r2)
Title
NixOS audit configuration files must have a mode of 444 or less permissive. (Cat II impact)
Discussion
Without the capability to restrict the roles and individuals that can select which events are audited, unauthorized personnel may be able to prevent the auditing of critical events. Misconfigured audits may degrade the system's performance by overwhelming the audit log. Misconfigured audits may also make it more difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one.
Check Content
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 Text
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
Additional Identifiers
Rule ID: SV-268120r1131043_rule
Vulnerability ID: V-268120
Group Title: SRG-OS-000063-GPOS-00032
Expert Comments
CCIs
| Number | Definition |
|---|---|
| CCI-000171 |
Allow organization-defined personnel or roles to select the event types that are to be logged by specific components of the system. |
Controls
| Number | Title |
|---|---|
| AU-12 |
Audit Record Generation |