Skip to content

Successful/unsuccessful uses of the chown, fchown, fchownat, and lchown system calls in NixOS must generate an audit record.

An XCCDF Rule

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).

ID
SV-268099r1039185_rule
Version
ANIX-00-000360
Severity
Medium
References
Updated

Remediation Templates

A Manual Procedure

Configure NixOS to generate audit records for any attempts to use the "chown", "fchown", "fchownat", and "lchown" system calls.

Add or update the "security.audit.rules" configuration in /etc/nixos/configuration.nix to include the following rule:

 security.audit.rules = [
  "-a always,exit -F arch=b32 -S lchown,fchown,chown,fchownat -F auid>=1000 -F auid!=unset -F key=perm_mod"