amalmurali47 / git_rce
- четверг, 23 мая 2024 г. в 00:00:02
Exploit PoC for CVE-2024-32002
This repository contains a PoC for exploiting CVE-2024-32002, a vulnerability in Git that allows RCE during a git clone
operation. By crafting repositories with submodules in a specific way, an attacker can exploit symlink handling on case-insensitive filesystems to write files into the .git/
directory, leading to the execution of malicious hooks.
Note: This PoC will only work in Windows or Mac systems.
For a detailed explanation of how this exploit was reversed, see the blog post: https://amalmurali.me/posts/git-rce.
git_rce
) includes a submodule with a specially crafted path..git/
directory, which contains a malicious hook.git_rce/
(this repository): The main repository containing the submodule.amalmurali47/hook
: The submodule repository containing the malicious hook.git clone --recursive git@github.com:amalmurali47/git_rce.git
Note: On Windows, you may need to run the shell as administrator for this to work.
The script used to create the PoC is included in this repository as create_poc.sh
. The instructions for setting up the PoC on a GitHub repo are included in the blog post.
This repository is for educational purposes only. The information provided here is intended to help developers understand the vulnerability and protect their systems. Do not use this exploit maliciously or without permission. Use of this PoC is at your own risk. The author is not responsible for any damages or legal issues that may arise from the use of this information.
Credit to filip-hejsek for discovering this vulnerability.
This project is licensed under the MIT License.