NixOS must generate audit records when successful/unsuccessful attempts to delete security objects occur.
Overview
Finding ID | Version | Rule ID | IA Controls | Severity |
V-268165 | ANIX-00-001740 | SV-268165r1039383_rule | Medium |
Description |
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). |
STIG | Date |
Anduril NixOS Security Technical Implementation Guide | 2024-10-25 |
Details
Check Text (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 Text (F-71992r1039382_fix) |
Configure /etc/nixos/configuration.nix to audit attempts to delete security objects by adding the following configuration settings: 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 the system with the following command: $ sudo nixos-rebuild switch |