{"description": "Verify the audit log files have a mode of \"0640\" or less permissive by first determining\nwhere the audit logs are stored with the following command:\n<pre>$ sudo grep -iw log_file /etc/audit/auditd.conf\nlog_file = /var/log/audit/audit.log</pre>\nBy default, the audit log file is <tt>/var/log/audit/audit.log</tt>.\n<br />\nConfigure the audit log to be protected from unauthorized read access by setting the correct\npermissive mode.\nIf <tt>log_group</tt> in <tt>/etc/audit/auditd.conf</tt> is set to a group other than the\n<tt>root</tt> group account, change the mode of the audit log files with the following command:\n<pre>$ sudo chmod 0640 <i>audit_log_file</i></pre>\n<br />\nOtherwise, change the mode of the audit log files with the following command:\n<pre>$ sudo chmod 0600 <i>audit_log_file</i></pre>\nReplace <tt><i>audit_log_file</i></tt> with the correct audit log file path.", "rationale": "If users can write to audit logs, audit trails can be modified or destroyed.", "severity": "medium", "references": {"cis-csc": ["1", "11", "12", "13", "14", "15", "16", "18", "19", "3", "4", "5", "6", "7", "8"], "cjis": ["5.4.1.1"], "cobit5": ["APO01.06", "APO11.04", "APO12.06", "BAI03.05", "BAI08.02", "DSS02.02", "DSS02.04", "DSS02.07", "DSS03.01", "DSS05.04", "DSS05.07", "DSS06.02", "MEA02.01"], "cui": ["3.3.1"], "isa-62443-2009": ["4.2.3.10", "4.3.3.3.9", "4.3.3.5.8", "4.3.3.7.3", "4.3.4.4.7", "4.3.4.5.6", "4.3.4.5.7", "4.3.4.5.8", "4.4.2.1", "4.4.2.2", "4.4.2.4"], "isa-62443-2013": ["SR 2.1", "SR 2.10", "SR 2.11", "SR 2.12", "SR 2.8", "SR 2.9", "SR 5.2", "SR 6.1"], "iso27001-2013": ["A.10.1.1", "A.11.1.4", "A.11.1.5", "A.11.2.1", "A.12.4.1", "A.12.4.2", "A.12.4.3", "A.12.4.4", "A.12.7.1", "A.13.1.1", "A.13.1.3", "A.13.2.1", "A.13.2.3", "A.13.2.4", "A.14.1.2", "A.14.1.3", "A.16.1.4", "A.16.1.5", "A.16.1.7", "A.6.1.2", "A.7.1.1", "A.7.1.2", "A.7.3.1", "A.8.2.2", "A.8.2.3", "A.9.1.1", "A.9.1.2", "A.9.2.3", "A.9.4.1", "A.9.4.4", "A.9.4.5"], "nerc-cip": ["CIP-003-8 R5.1.1", "CIP-003-8 R5.3", "CIP-004-6 R2.3", "CIP-007-3 R2.1", "CIP-007-3 R2.2", "CIP-007-3 R2.3", "CIP-007-3 R5.1", "CIP-007-3 R5.1.1", "CIP-007-3 R5.1.2"], "nist": ["CM-6(a)", "AC-6(1)", "AU-9(4)"], "nist-csf": ["DE.AE-3", "DE.AE-5", "PR.AC-4", "PR.DS-5", "PR.PT-1", "RS.AN-1", "RS.AN-4"], "pcidss": ["Req-10.5"], "srg": ["SRG-OS-000057-GPOS-00027", "SRG-OS-000058-GPOS-00028", "SRG-OS-000059-GPOS-00029", "SRG-OS-000206-GPOS-00084", "SRG-APP-000118-CTR-000240"], "cis": ["6.3.4.1"], "pcidss4": ["10.3.1", "10.3"]}, "control_references": {"cis": ["6.3.4.1"], "pcidss4": ["10.3.1", "10.3"]}, "components": [], "identifiers": {}, "ocil_clause": "any permissions are more permissive", "ocil": "Run the following command to check the mode of the system audit logs:\n<pre>$ sudo grep -iw log_file /etc/audit/auditd.conf</pre>\n<pre>log_file=/var/log/audit/audit.log</pre>\n<pre>$ sudo stat -c \"%n %a\" /var/log/audit/*</pre>\n<pre>$ sudo ls -l /var/log/audit</pre>\nAudit logs must be mode 0640 or less permissive.", "oval_external_content": null, "fixtext": "Configure correct permissions of system audit logs.\n\nDetermine the location of the system audit logs:\n\n$ sudo grep -iw log_file /etc/audit/auditd.conf\n\nIf log_file is not defined, use /var/log/audit/audit.log.\n\nCheck the group that owns the system audit logs:\n\n$ sudo grep -m 1 -q ^log_group /etc/audit/auditd.conf\n\nIf the log_group is not defined or it is set to root, configure the permissions the following way:\n\n$ sudo chmod 0600 $log_file\n$ sudo chmod 0400 $log_file.*\n\nOtherwise, configure the permissions the following way:\n\n$ sudo chmod 0640 $log_file\n$ sudo chmod 0440 $log_file.*", "checktext": "", "vuldiscussion": "", "srg_requirement": "Ubuntu 22.04 audit log file must have mode 0640 or less permissive to prevent unauthorized access to the audit log.", "warnings": [], "conflicts": [], "requires": [], "policy_specific_content": {"stig": {"srg_requirement": "Ubuntu 22.04 audit logs file must have mode 0600 or less permissive to prevent unauthorized access to the audit log.", "vuldiscussion": "Only authorized personnel should be aware of errors and the details of the errors. Error messages are an indicator of an organization's operational state or can identify the Ubuntu 22.04 system or platform. Additionally, Personally Identifiable Information (PII) and operational information must not be revealed through error messages to unauthorized personnel or their designated representatives.\n\nThe structure and content of error messages must be carefully considered by the organization and development team. The extent to which the information system is able to identify and handle error conditions is guided by organizational policy and operational requirements.", "checktext": "Verify the audit logs have a mode of \"0600\".\n\nDetermine where the audit logs are stored with the following command:\n\n$ sudo grep -iw log_file /etc/audit/auditd.conf\n\nlog_file = /var/log/audit/audit.log\n\nUsing the location of the audit log file, determine the mode of each audit log with the following command:\n\n$ sudo find /var/log/audit/ -type f -exec stat -c '%a %n' {} \\;\n\nrw-------. 2 root root 237923 Jun 11 11:56 /var/log/audit/audit.log\n\nIf the audit logs have a mode more permissive than \"0600\", this is a finding.", "fixtext": "Configure the audit logs to have a mode of \"0600\" with the following command:\n\nReplace \"[audit_log_file]\" with the path to each audit log file. By default, these logs are located in \"/var/log/audit/.\n\n$ sudo chmod 0600 /var/log/audit/[audit_log_file]\n\nCheck the group that owns the system audit logs:\n\n$ sudo grep -iw log_group /etc/audit/auditd.conf\n\nIf log_group is set to a user other than root, configure the permissions the following way:\n\n$ sudo chmod 0640 $log_file\n$ sudo chmod 0440 $log_file.*\n\nOtherwise, configure the permissions the following way:\n\n$ sudo chmod 0600 $log_file\n$ sudo chmod 0400 $log_file.*"}}, "platform": null, "platforms": [], "sce_metadata": {}, "inherited_platforms": ["system_with_kernel", "package[audit]"], "cpe_platform_names": [], "inherited_cpe_platform_names": ["package_audit", "system_with_kernel"], "bash_conditional": null, "fixes": {}, "title": "System Audit Logs Must Have Mode 0640 or Less Permissive", "definition_location": "/aptdata/openscap/scap-security-guide/linux_os/guide/auditing/auditd_configure_rules/file_permissions_var_log_audit/rule.yml", "template": null}