6.2.3.28 Ensure successful and unsuccessful attempts to use the setfacl command are collected

Information

The operating system must generate audit records for successful/unsuccessful uses of the setfacl command

This utility sets Access Control Lists (ACLs) of files and directories. 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).

Solution

- Add the audit rule(s) that monitor use of the /usr/bin/setfacl command. The procedure adds the rule only when the command exists, so augenrules --load does not error. Run:

#!/usr/bin/env bash

{
UID_MIN="$(awk '/^[[:space:]]*UID_MIN/{print $2}' /etc/login.defs)"
[ -e /usr/bin/setfacl ] && printf '%s\n' "-a always,exit -S all -F path=/usr/bin/setfacl -F perm=x -F auid>=$UID_MIN -F auid!=unset -k perm_chng"
} >> /etc/audit/rules.d/50-perm_chng.rules

- Merge and load the rules into active configuration:

# augenrules --load

- Check if reboot is required:

# if [[ $(auditctl -s | grep "enabled") =~ "2" ]]; then printf "Reboot required to load rules\n"; fi

See Also

https://workbench.cisecurity.org/benchmarks/27891

Item Details

Category: AUDIT AND ACCOUNTABILITY, SYSTEM AND INFORMATION INTEGRITY

References: 800-53|AU-2, 800-53|AU-7, 800-53|AU-12, 800-53|SI-5, CSCv7|6.2

Plugin: Unix

Control ID: 6f0b00f7ce9080387aaeefc5b4d0147b62623797e0093f29c0588520fde15bb4