TMAegisBeta
Thêm quy tắc cho linux

Linux distributions

TMA-SLES16-6.2.3.34

Ensure the audit configuration is immutable

ThấpCấp 2Tự độnglinux

Mô tả

Set system audit so that audit rules cannot be modified with auditctl . Setting the flag "-e 2" forces audit to be put in immutable mode. Audit changes can only be made on system reboot. Note: This setting will require the system to be rebooted to update the active auditd configuration settings.

Cách kiểm tra

Phương pháp kiểm tra: Lệnh 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*-e\h+2\b'"'"' /etc/audit/rules.d/*.rules | tail -1' 2>&1); printf '%s\n' "$o" | tr -s ' \t' '  ' | sed 's/^ //;s/ $//' | grep -Fxq -- '-e 2' || { echo step1: missing '-e 2'; return 1; }; }; if alt0; then echo compliant; fi
Đầu ra mong đợi
compliant

Cách khắc phục

Phương pháp khắc phục: Hướng dẫn hoặc bản vá hạ tầng

Edit or create the file /etc/audit/rules.d/99-finalize.rules and add the line -e 2 at the end of the file: Example: # printf '\n%s' "-e 2" >> /etc/audit/rules.d/99-finalize.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

Thuộc tính

Hệ điều hành
sles-16
Thẻ
cis-convertedlinux
Tham chiếu
CIS SUSE Linux Enterprise 16 Benchmark v1.0.0 - 6.2.3.34

Kiểm tra máy này

Chạy lệnh này trên máy bạn được phép kiểm tra. Lần quét chỉ ở chế độ đọc.

shell
tmaegis scan --target linux --level 2