Check: ANIX-00-000680
Anduril NixOS STIG:
ANIX-00-000680
(in version v1 r2)
Title
NixOS system configuration files and directories must be owned by root. (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 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 Text
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
Additional Identifiers
Rule ID: SV-268122r1131049_rule
Vulnerability ID: V-268122
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 |