Skip to content

Verify Permissions of Local Logs of audit Tools

An XCCDF Rule

Description

The SUSE operating system audit tools must have the proper permissions configured to protect against unauthorized access. Check that "permissions.local" file contains the correct permissions rules with the following command:

grep "^/usr/sbin/au" /etc/permissions.local

/usr/sbin/audispd root:root 0750
/usr/sbin/auditctl root:root 0750
/usr/sbin/auditd root:root 0750
/usr/sbin/ausearch root:root 0755
/usr/sbin/aureport root:root 0755
/usr/sbin/autrace root:root 0750
/usr/sbin/augenrules root:root 0750
Audit tools include but are not limited to vendor-provided and open-source audit tools needed to successfully view and manipulate audit information system activity and records. Audit tools include custom queries and report generators.

Rationale

Protecting audit information also includes identifying and protecting the tools used to view and manipulate log data. Therefore, protecting audit tools is necessary to prevent unauthorized operation on audit information. SUSE operating systems providing tools to interface with audit information will leverage user permissions and roles identifying the user accessing the tools and the corresponding rights the user enjoys to make access decisions regarding the access to audit tools.

ID
xccdf_org.ssgproject.content_rule_permissions_local_audit_binaries
Severity
Medium
References
Updated



Remediation - Shell Script


current_permissions_rules=$(grep "^/usr/sbin/au" /etc/permissions.local)
if [ ${#current_permissions_rules} -eq 0 ]
then
  echo "There are no permission rules for audit information files and folders. We will add them"
  echo "/usr/sbin/audispd root:root 0750" >> /etc/permissions.local

Remediation - Ansible

- name: Configure permission for /usr/sbin/audispd
  lineinfile:
    path: /etc/permissions.local
    create: true
    regexp: ^\/usr\/sbin\/audispd\s+root.*
    line: /usr/sbin/audispd root:root 0750