Verify Permissions on /etc/audit/rules.d/*.rules
An XCCDF Rule
Description
To properly set the permissions of /etc/audit/rules.d/*.rules
, run the command:
$ sudo chmod 0640 /etc/audit/rules.d/*.rules
Rationale
Without the capability to restrict the roles and individuals that can select which events are audited, unauthorized personnel may be able to prevent the auditing of critical events. Misconfigured audits may degrade the system's performance by overwhelming the audit log. Misconfigured audits may also make it more difficult to establish, correlate, and investigate the events relating to an incident or identify those responsible for one.
- ID
- xccdf_org.ssgproject.content_rule_file_permissions_etc_audit_rulesd
- Severity
- Medium
- References
- Updated
Remediation - Shell Script
find -H /etc/audit/rules.d/ -maxdepth 1 -perm /u+xs,g+xws,o+xwrt -type f -regex '^.*rules$' -exec chmod u-xs,g-xws,o-xwrt {} \;
Remediation - Ansible
- name: Find /etc/audit/rules.d/ file(s)
command: find -H /etc/audit/rules.d/ -maxdepth 1 -perm /u+xs,g+xws,o+xwrt -type
f -regex "^.*rules$"
register: files_found
changed_when: false
failed_when: false