5.2.4.1 Ensure audit log files are mode 0640 or less permissive

Information

Audit log files contain information about the system and system activity.

Rationale:

Access to audit records can reveal system and configuration data to attackers, potentially compromising its confidentiality.

Solution

Run the following command to remove more permissive mode than 0640 from audit log files:

# [ -f /etc/audit/auditd.conf ] && find '$(dirname $(awk -F '=' '/^s*log_file/ {print $2}' /etc/audit/auditd.conf | xargs))' -type f -perm /0137 -exec chmod u-x,g-wx,o-rwx {} +

See Also

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