TMAegisBêta
Plus de règles pour macos

macOS

TMA-MACOS14-3.4

Ensure Security Auditing Logs Are Retained for 30 Days

MoyenneNiveau 1Automatiséemacos

Description

The macOS audit capability contains important information to investigate security or operational issues. This resource is only completely useful if it is retained long enough to allow technical staff to find the root cause of anomalies in the records. Retention can be set to respect both size and longevity. To retain as much as the recommendation is to use the following: expire-after:30d This recommendation is based on minimum amount of days retained for review and investigation. When a third party tool is in use to allow remote logging or the store and forwarding of logs, this is a supplemental source of data. Note: If you organization has storage constraint issues, you can add a storage value limit to expire-after: in addition to days retained. For example: expire-after:30d OR 5G or expire-after:30d OR 10000M. In addition, your organization may also look at the what audit flags are...

Méthode de vérification

Méthode d'audit: Commande shell

shell
l=$(/usr/bin/grep -e "^expire-after" /etc/security/audit_control 2>/dev/null) || exit 1
d=$(printf '%s' "$l" | /usr/bin/grep -oE '[0-9]+d' | /usr/bin/head -1 | /usr/bin/tr -d d)
if [ -n "$d" ] && [ "$d" -ge 30 ]; then echo compliant; else echo "$l"; fi
Sortie attendue
compliant

Méthode de correction

Méthode de correction: Recommandation ou correctif d'infrastructure

Terminal Method: Perform the following to set the audit retention length: Edit the /etc/security/audit_control file so that expire-after: is at least 30d

Propriétés

Systèmes d'exploitation
macos-14
Étiquettes
loggingmacossonoma
Référence
CIS Apple macOS 14.0 Sonoma Benchmark v3.1.0 - 3.4 Ensure Security Auditing Logs Are Retained for 30 Days

Vérifier cet hôte

Exécutez cette commande sur une machine que vous êtes autorisé à auditer. L'analyse est en lecture seule.

shell
tmaegis scan --target macos