Check: APPL-12-004001
Apple macOS 12 (Monterey) STIG:
APPL-12-004001
(in versions v1 r8 through v1 r1)
Title
The macOS system must be configured with system log files owned by root and group-owned by wheel or admin. (Cat II impact)
Discussion
System logs should only be readable by root or admin users. System logs frequently contain sensitive information that could be used by an attacker. Setting the correct owner mitigates this risk.
Check Content
Some system log files are controlled by "newsyslog" and "aslmanager". The following commands check for log files that exist on the system and print the path to the log with the corresponding ownership. Run them from inside "/var/log". /usr/bin/sudo stat -f '%Su:%Sg:%N' $(/usr/bin/grep -v '^#' /etc/newsyslog.conf | awk '{ print $1 }') 2> /dev/null /usr/bin/sudo stat -f '%Su:%Sg:%N' $(/usr/bin/grep -e '^>' /etc/asl.conf /etc/asl/* | awk '{ print $2 }') 2> /dev/null Each command may return zero or more files. If there are any system log files that are not owned by "root" and group-owned by "wheel" or "admin", this is a finding. Service logs may be owned by the service user account or group.
Fix Text
For any log file that returns an incorrect owner or group value, run the following command: /usr/bin/sudo chown root:wheel [log file] [log file] is the full path to the log file in question. If the file is managed by "newsyslog", find the configuration line in the directory "/etc/newsyslog.d/" or the file "/etc/newsyslog.conf" and ensure that the owner:group column is set to "root:wheel" or the appropriate service user account and group. If the file is managed by "aslmanager", find the configuration line in the directory "/etc/asl/" or the file "/etc/asl.conf" and ensure that "uid" and "gid" options are either not present or are set to a service user account and group respectively.
Additional Identifiers
Rule ID: SV-252531r816491_rule
Vulnerability ID: V-252531
Group Title: SRG-OS-000206-GPOS-00084
Expert Comments
CCIs
Number | Definition |
---|---|
CCI-001314 |
The information system reveals error messages only to organization-defined personnel or roles. |
Controls
Number | Title |
---|---|
SI-11 |
Error Handling |