TMA-MACOS-3.5
Ensure Access to Audit Records Is Controlled
説明
The audit system on macOS writes important operational and security information that can be both useful for an attacker and a place for an attacker to attempt to obfuscate unwanted changes that were recorded. As part of defense-in-depth, the /etc/security/audit_control configuration and the files in /var/audit should be owned only by root with group wheel with read-only rights and no other access allowed. Audit: audit_control and the audit log directory must be owned by root:wheel (uid/gid 0) and mode -r--r-----.
チェック方法
監査方法: シェルコマンド
f=/etc/security/audit_control
[ -e "$f" ] || exit 1
d=$(/usr/bin/grep '^dir' "$f" | /usr/bin/awk -F: '{print $2}')
[ -n "$d" ] && [ -d "$d" ] || exit 1
r1=$(/bin/ls -n "$f" | /usr/bin/awk '{s+=$3} END {print s+0}')
r2=$(/bin/ls -n "$f" | /usr/bin/awk '{s+=$4} END {print s+0}')
r3=$(/bin/ls -n "$f" | /usr/bin/awk '!/-r--r-----|current|total/{print $1}' | /usr/bin/wc -l | /usr/bin/tr -d ' ')
r4=$(/bin/ls -n "$d" | /usr/bin/awk '{s+=$3} END {print s+0}')
r5=$(/bin/ls -n "$d" | /usr/bin/awk '{s+=$4} END {print s+0}')
r6=$(/bin/ls -n "$d" | /usr/bin/awk '!/-r--r-----|current|total/{print $1}' | /usr/bin/wc -l | /usr/bin/tr -d ' ')
if [ "$r1$r2$r3$r4$r5$r6" = 000000 ]; then echo compliant; else echo "owner/group/mode checks: $r1 $r2 $r3 $r4 $r5 $r6"; fi- 期待される出力
compliant
修正方法
修正方法: ガイダンスまたは IaC パッチ
Terminal: sudo /usr/sbin/chown -R root:wheel /etc/security/audit_control ; sudo /bin/chmod -R 700 /etc/security/audit_control ; sudo /usr/sbin/chown -R root:wheel $(sudo /usr/bin/grep '^dir' /etc/security/audit_control | /usr/bin/awk -F: '{print $2}').
プロパティ
- オペレーティングシステム
- macos-26
- タグ
- macoslogging-auditing
- 参照
- CIS Apple macOS 26 Tahoe Benchmark v1.1.0 - 3.5 Ensure Access to Audit Records Is Controlled
このホストをチェック
監査が許可されているマシンで実行してください。スキャンは読み取り専用です。
tmaegis scan --target macos