TMAegisBeta
Aturan lainnya untuk linux

Linux distributions

TMA-ROCKY9-6.2.3.34

Ensure the audit configuration is loaded regardless of errors

RendahLevel 2Otomatislinux

Deskripsi

Set -c flag so that auditctl will continue loading rules in spite of an error. The exit code will not be success if any rule fails to load.

Cara pemeriksaan

Metode audit: Perintah shell

shell
alt0() { command -v grep >/dev/null 2>&1 || { echo "step1: grep not installed"; return 1; }; command -v tail >/dev/null 2>&1 || { echo "step1: tail not installed"; return 1; }; o=$(bash -c 'grep -Ph -- '"'"'^\h*-c\b'"'"' /etc/audit/rules.d/*.rules | tail -1' 2>&1); printf '%s\n' "$o" | tr -s ' \t' '  ' | sed 's/^ //;s/ $//' | grep -Fxq -- -c || { echo step1: missing -c; return 1; }; }; if alt0; then echo compliant; fi
Output yang diharapkan
compliant

Cara perbaikan

Metode perbaikan: Panduan atau patch infrastruktur

Edit or create the file /etc/audit/rules.d/01-initialize.rules and add the line - c at the end of the file: Example: # printf '%s\n' "" "-c" >> /etc/audit/rules.d/01-initialize.rules Load audit rules Merge and load the rules into active configuration: # augenrules --load Check if reboot is required. # if [[ $(auditctl -s | grep "enabled") =~ "2" ]]; then printf "Reboot required to load rules\n"; fi

Properti

Sistem operasi
rocky-9
Tag
cis-convertedlinux
Referensi
CIS Rocky Linux 9 Benchmark v3.0.0 - 6.2.3.34

Periksa host ini

Jalankan ini pada mesin yang diizinkan untuk Anda audit. Pemindaian bersifat hanya baca.

shell
tmaegis scan --target linux --level 2