Linux distributions
TMA-ROCKY9-6.1.2.7
Ensure rsyslog is not configured as a log server
Açıklama
rsyslog can be configured to receive log messages from remote hosts over the network by loading a remote-input module (imtcp, imudp, imptcp, or imrelp) and starting a listener, which makes the host act as a central log server.
Nasıl denetlenir
Denetim yöntemi: Kabuk komutu
alt0() { o=$(bash -c '#!/usr/bin/env bash
{
a_conf=(/etc/rsyslog.conf /etc/rsyslog.d/*.conf)
while IFS= read -r l_inc; do
for l_f in $l_inc; do
[ -d "$l_f" ] && a_conf+=("$l_f"/*.conf) || a_conf+=("$l_f")
done
done < <(grep -Psoih -- '"'"'^\h*(?:\$IncludeConfig\h+|include\h*\(\h*file\h*=\h*"?)\K[^")\h]+'"'"' "${a_conf[@]}" 2>/dev/null)
grep -Psi -- '"'"'^\h*module\(load="?(imtcp|imudp|imptcp|imrelp)"?\)'"'"' "${a_conf[@]}" 2>/dev/null
grep -Psi -- '"'"'^\h*input\(type="?(imtcp|imudp|imptcp|imrelp)"?'"'"' "${a_conf[@]}" 2>/dev/null
grep -Psi -- '"'"'^\h*\$ModLoad\h+(imtcp|imudp|imptcp|imrelp)\b'"'"' "${a_conf[@]}" 2>/dev/null
grep -Psi -- '"'"'^\h*\$(InputTCPServerRun|UDPServerRun|InputPTCPServerRun|InputRELPServerRun) \b'"'"' "${a_conf[@]}" 2>/dev/null
}' 2>&1); [ -z "$o" ] || { echo "step1: $o" | head -c 300; return 1; }; }; if alt0; then echo compliant; fi- Beklenen çıktı
compliant
Nasıl düzeltilir
Düzeltme yöntemi: Kılavuz veya altyapı yaması
1. Should any active log server configuration be found by the audit, edit the file(s) where those directives appear - /etc/rsyslog.conf, a drop-in under /etc/rsyslog.d/, or any non-standard file identified by the audit's configuration discovery - and remove or comment out the remote-input module load, input, and run directives for all of imtcp, imudp, imptcp, and imrelp. Ensure none of the following entries are present: advanced format module(load="imtcp") module(load="imudp") module(load="imptcp") module(load="imrelp") input(type="imtcp" port="514") input(type="imudp" port="514") input(type="imptcp" port="514") input(type="imrelp" port="2514") deprecated legacy format $ModLoad imtcp $ModLoa…
Özellikler
- İşletim sistemleri
- rocky-9
- Etiketler
- cis-convertedlinux
- Referans
- CIS Rocky Linux 9 Benchmark v3.0.0 - 6.1.2.7
Bu ana makineyi denetle
Bunu denetleme izniniz olan bir makinede çalıştırın. Tarama salt okunurdur.
tmaegis scan --target linux