Check: ANIX-00-001730
Anduril NixOS STIG:
ANIX-00-001730
(in versions v1 r2 through v1 r1)
Title
NixOS must generate audit records when successful/unsuccessful attempts to delete privileges occur. (Cat II impact)
Discussion
Without generating audit records that are specific to the security and mission needs of the organization, it would be difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one. Audit records can be generated from various components within the information system (e.g., module or policy filter).
Check Content
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 Text
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
Additional Identifiers
Rule ID: SV-268164r1131133_rule
Vulnerability ID: V-268164
Group Title: SRG-OS-000466-GPOS-00210
Expert Comments
CCIs
| Number | Definition |
|---|---|
| CCI-000172 |
Generate audit records for the event types defined in AU-2 c that include the audit record content defined in AU-3. |
Controls
| Number | Title |
|---|---|
| AU-12 |
Audit Record Generation |