
Escáner de prueba de concepto para path traversal del servidor Apache HTTP (CVE-2021-41773) con soporte para múltiples hosts, alternancia de verificación SSL y escaneo concurrente.
Prueba de concepto para comprobar si los hosts son vulnerables a CVE-2021-41773.
Se encontró una falla en un cambio realizado en la normalización de rutas en Apache HTTP Server 2.4.49-2.4.50.
Un atacante podría usar un ataque de path traversal para asignar URL a archivos fuera del directorio raíz esperado. Si los archivos fuera del directorio raíz no están protegidos por "require all denied", estas solicitudes pueden tener éxito. Además, esta falla podría filtrar el código fuente de archivos interpretados como scripts CGI.
Este problema solo afecta a Apache 2.4.49 y 2.4.50, y no a versiones anteriores.
Actualmente hay dos métodos:
/etc/apache2/apache2.conf:<!-- Vulnerable (Require all granted in '/') -->
<Directory />
Options FollowSymLinks
AllowOverride None
Require all granted
</Directory>
<!-- Patched (Require all denied in '/') -->
<Directory />
Options FollowSymLinks
AllowOverride None
Require all denied
</Directory>
Use el script de la siguiente manera:
CVE-2021-41773.py [-h] [--nosslcheck] [--cores CORES] [--file TARGETFILE] host
Checks if an apache server is vulnerable to CVE-2021-41773.
optional arguments:
-h, --help show this help message and exit
--host HOST ip/domain to be checked e.g. 'https://google.com/'.
--nosslcheck, -n Do not verify ssl certificates.
--cores CORES, -C CORES
Specify number of cores that should be dedicated to the task, default: 1
--file TARGETFILE, -f TARGETFILE
Specify file to fetch list of hosts from, example: "/home/user/Desktop/myfile.txt"
--rce, -r When toggled checks if target is susceptible to RCE (NOT YET IMPLEMENTED!)