Catalina - Configure System Log Files to Mode 640 or Less Permissive

Information

The system logs _MUST_ be configured to be writable by root and readable only by the root user and group wheel. To achieve this, system log files _MUST_ be configured to mode 640 permissive or less; thereby preventing normal users from reading, modifying or deleting audit logs. System logs frequently contain sensitive information that could be used by an attacker. Setting the correct permissions mitigates this risk.

NOTE: Nessus has not performed this check. Please review the benchmark to ensure target compliance.

Solution

[source,bash]
----
/bin/chmod 640 $(/usr/bin/stat -f '%A:%N' $(/usr/bin/grep -v '^#' /etc/newsyslog.conf | /usr/bin/awk '{ print $1 }') 2> /dev/null | /usr/bin/awk '!/640/{print $1}' | awk -F":" '!/640/{print $2}')
----

See Also

https://github.com/usnistgov/macos_security

Item Details

Category: SYSTEM AND INFORMATION INTEGRITY

References: 800-53|SI-11, CCE|CCE-84934-9, STIG-ID|AOSX-15-004002

Plugin: Unix

Control ID: 0d993d973e4e557fa60f257ef4f0341f7529973085c8f7569b460c92d8efe92b