Skip to content

Successful/unsuccessful uses of the mount syscall 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). The "mount" syscall is used to mount a filesystem. When a user logs in, the AUID is set to the UID of the account that is being authenticated. Daemons are not user sessions and have the loginuid set to "-1". The AUID representation is an unsigned 32-bit integer, which equals "4294967295". The audit system interprets "-1", "4294967295", and "unset" in the same way.

ID
SV-268094r1039561_rule
Version
ANIX-00-000270
Severity
Medium
References
Updated

Remediation Templates

A Manual Procedure

Configure NixOS to generate audit records for any successful/unsuccessful use of the "mount" syscall.

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 mount -F auid>=1000 -F auid!=unset -k privileged-mount"