documentation_complete: true


title: 'Verify that audit tools Have Mode 0755 or less'

description: |-
    The {{{ full_name }}} operating system audit tools must have the proper
    permissions configured to protected against unauthorized access.

    Verify it by running the following command:
    <pre>$ stat -c "%n %a" {{{ audit_binaries | join(" ")}}}
    {{% for binary in audit_binaries %}}
    {{{ binary }}} 755
    {{% endfor %}}
    </pre>

    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.

    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.

severity: medium

identifiers:
    cce@rhel8: CCE-86447-0
    cce@rhel9: CCE-86448-8
    cce@rhel10: CCE-86166-6
    cce@sle15: CCE-92555-2

references:
    srg: SRG-OS-000256-GPOS-00097,SRG-OS-000257-GPOS-00098

ocil: |-
    Verify it by running the following command:
    <pre>$ stat -c "%n %a" {{{ audit_binaries | join(" ")}}}
    {{% for binary in audit_binaries %}}
    {{{ binary }}} 755
    {{% endfor %}}
    </pre>
    If the command does not return all the above lines, the missing ones
    need to be added.

    Run the following command to correct the permissions of the missing
    entries:
    <pre>$ sudo chmod 0755 [audit_tool] </pre>

    Replace "[audit_tool]" with the audit tool that does not have the
    correct permissions.

template:
    name: file_permissions
    vars:
        filepath: {{{ audit_binaries }}}
        filemode: '0755'
