TMAegisBeta
Más reglas para apache

Apache HTTP Server

TMA-APACHE-6.6

Ensure ModSecurity Is Installed and Enabled

BajaNivel 2Automatizadaapache

Descripción

ModSecurity is an open source web application firewall (WAF) for real-time web application monitoring, logging, and access control. It enables but does not include a powerful customizable rule set, which may be used to detect and block common web application attacks. Installation of ModSecurity without a rule set does not provide additional security for the protected web applications. Compliant when security2_module (ModSecurity) is loaded. Uses the module list from apachectl -M (apache2ctl/httpd; needs root).

Cómo se verifica

Método de auditoría: Comando de shell

shell
b=$(command -v apache2ctl || command -v apachectl || command -v httpd) || exit 1; m=$("$b" ${APACHE_CONF:+-f "$APACHE_CONF"} -M 2>/dev/null) || exit 1; printf '%s\n' "$m" | grep -Eiq 'security2_module' && echo compliant || echo noncompliant
Salida esperada
compliant

Cómo se corrige

Método de corrección: Guía o parche de infraestructura

Install ModSecurity (dnf install mod_security / apt install libapache2-mod-security2), enable it and deploy a rule set such as the OWASP CRS. Then run apachectl configtest and reload Apache.

Propiedades

Sistemas operativos
Cualquiera
Etiquetas
apachelogging
Referencia
CIS Apache HTTP Server 2.4 Benchmark v2.4.0 - 6.6 Ensure ModSecurity Is Installed and Enabled

Verificar este host

Ejecute esto en un equipo que tenga permiso para auditar. El escaneo es de solo lectura.

shell
tmaegis scan --target apache --level 2