mirror of
https://github.com/usnistgov/macos_security.git
synced 2026-02-03 05:53:24 +00:00
36 lines
1.0 KiB
YAML
36 lines
1.0 KiB
YAML
id: audit_files_owner_configure
|
|
title: "Configure Audit Log Files to be Owned by Root"
|
|
discussion: |
|
|
The audit service must be configured to create log files with the correct ownership to prevent normal users from reading audit logs. Audit logs contain sensitive data about the system and users. If log files are set to only be readable and writable by root or administrative users with sudo, the risk is mitigated.
|
|
|
|
Audit log files must be owned by root.
|
|
check: |
|
|
/bin/ls -n $(/usr/bin/grep '^dir' /etc/security/audit_control | /usr/bin/awk -F: '{print $2}') | /usr/bin/awk '{s+=$3} END {print s}'
|
|
result:
|
|
integer: 0
|
|
fix: |
|
|
[source,bash]
|
|
----
|
|
/usr/sbin/chown -R root $(/usr/bin/grep '^dir' /etc/security/audit_control | /usr/bin/awk -F: '{print $2}')
|
|
----
|
|
references:
|
|
cce:
|
|
- CCE-84710-3
|
|
cci:
|
|
- CCI-000162
|
|
800-53r4:
|
|
- AU-9
|
|
srg:
|
|
- SRG-OS-000057-GPOS-00027
|
|
disa_stig:
|
|
- AOSX-14-001012
|
|
macOS:
|
|
- "10.15"
|
|
tags:
|
|
- cnssi-1253
|
|
- fisma-low
|
|
- fisma-moderate
|
|
- fisma-high
|
|
- STIG
|
|
mobileconfig:
|
|
mobileconfig_info: |