{"uuid": "c4c135ec-ab4d-407a-8342-7aef72892896", "vulnerability_lookup_origin": "1a89b78e-f703-45f3-bb86-59eb712668bd", "author": "2a075640-a300-48a4-bb44-bc6130783b9b", "vulnerability": "CVE-2024-32002", "type": "published-proof-of-concept", "source": "https://t.me/poxek/4033", "content": "\u2757\ufe0f RCE \u0447\u0435\u0440\u0435\u0437 git clone \u2757\ufe0f\nCVE-2024-32002\n\u0421\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u0438: \u043f\u0440\u043e\u0441\u0442\u0430\u044f\n#RCE #CVE #git\n\n\u27a1\ufe0f\u0418\u0434\u0435\u044f \u043e \u0442\u043e\u043c, \u0447\u0442\u043e RCE \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0434\u043e\u0441\u0442\u0438\u0433\u043d\u0443\u0442\u0430 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 git clone.\n\u0412\u0430\u0436\u043d\u043e\u0435 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u0435: \u0430\u0442\u0430\u043a\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438\u0437-\u0437\u0430 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u0445 \u0441\u0438\u043c\u0432\u043e\u043b\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u0441\u044b\u043b\u043e\u043a, \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u0430\u0442\u0430\u043a\u0438 \u0432\u044b\u043a\u043b\u044e\u0447\u0438\u0432 \u0438\u0445 git config --global core.symlinks false\n\n\u27a1\ufe0f\u0412\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u044f\u044f \u043a\u0443\u0445\u043d\u044f git'\u0430\ngit - \u044d\u0442\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u0432\u0435\u0440\u0441\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u043a\u043e\u0434\u0435 \u0441 \u0442\u0435\u0447\u0435\u043d\u0438\u0435\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u041e\u043d\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043b\u043e\u0436\u043d\u044b\u043c\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u043c\u0438, \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u044f \u0438\u0445 \u043d\u0430 \u0431\u043e\u043b\u0435\u0435 \u043c\u0435\u043b\u043a\u0438\u0435, \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0435 \u043a\u0443\u0441\u043a\u0438, \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0435 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f\u043c\u0438. \u0427\u0442\u043e\u0431\u044b \u0435\u0449\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441, Git \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043f\u043e\u0434\u043c\u043e\u0434\u0443\u043b\u0438 - \u043f\u043e \u0441\u0443\u0442\u0438, \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438, \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u0432 \u0434\u0440\u0443\u0433\u0438\u0435 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438. \u0417\u0430\u043f\u043e\u043c\u043d\u0438\u0442\u0435 \u044d\u0442\u0443 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044e.\n\n\u041a\u0430\u0436\u0434\u044b\u0439 \u043f\u043e\u0434\u043c\u043e\u0434\u0443\u043b\u044c \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438. Git \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0435\u0442 \u043f\u0443\u0442\u044c \u043a \u043f\u043e\u0434\u043c\u043e\u0434\u0443\u043b\u044e, \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044f \u0442\u043e\u0447\u043d\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439. \u041e\u0434\u043d\u0430\u043a\u043e \u0435\u0441\u0442\u044c \u043e\u0434\u043d\u0430 \u0437\u0430\u0433\u0432\u043e\u0437\u0434\u043a\u0430: \u0432 \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445, \u043d\u0435 \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043a \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0443 (\u043a\u0430\u043a, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 Windows \u0438 macOS \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e), A/modules/x \u0438 a/modules/x \u0441\u0447\u0438\u0442\u0430\u044e\u0442\u0441\u044f \u043e\u0434\u043d\u0438\u043c \u0438 \u0442\u0435\u043c \u0436\u0435 \u043f\u0443\u0442\u0435\u043c. \u042d\u0442\u0430, \u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0431\u044b, \u043c\u0435\u043b\u043e\u0447\u044c - \u044d\u0442\u043e \u0411\u0410\u0417\u0410 \u0434\u043b\u044f CVE-2024-32002.\n\n\u27a1\ufe0f\u0421\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u044b\u0435 \u0441\u0441\u044b\u043b\u043a\u0438\n\u0421\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u044b\u0435 \u0441\u0441\u044b\u043b\u043a\u0438 - \u044d\u0442\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043b\u0443\u0436\u0430\u0442 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f\u043c\u0438 \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0435 \u0444\u0430\u0439\u043b\u044b \u0438\u043b\u0438 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0438. \u0412 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 Git \u043e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u0441\u0441\u044b\u043b\u043e\u043a \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0435 \u0447\u0430\u0441\u0442\u0438 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f. \u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u043e, \u0441\u0438\u043c\u043b\u0438\u043d\u043a\u0438 \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u0432\u043e \u0432\u0440\u0435\u0434\u043e\u043d\u043e\u0441\u043d\u044b\u0445 \u0446\u0435\u043b\u044f\u0445.\n\n\u27a1\ufe0f\u0427\u0435\u043a\u0430\u0435\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u043a\u043e\u043c\u043c\u0438\u0442\u0430\u0445\n\u0412\u0441\u0435\u0433\u043e \u0431\u044b\u043b\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u043e 2 \u0444\u0430\u0439\u043b\u0430, builtin/submodule--helper.c \u0438 t/t7406-submodule-update.sh\n\n\u27a1\ufe0f\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c builtin/submodule--helper.c\n\u0421\u0444\u043e\u043a\u0443\u0441\u0438\u0440\u0443\u0435\u043c\u0441\u044f \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 clone_submodule, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043a\u0430\u043a \u0432\u044b \u043c\u043e\u0433\u043b\u0438 \u0434\u043e\u0433\u0430\u0434\u0430\u0442\u044c\u0441\u044f, \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u043a\u043b\u043e\u043d\u0438\u0440\u0443\u0435\u043c.\n\u25aa\ufe0f\u041d\u043e\u0432\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f dir_contains_only_dotgit: \u042d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442, \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043b\u0438 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0442\u043e\u043b\u044c\u043a\u043e \u0444\u0430\u0439\u043b \u0438\u043b\u0438 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 .git. \u0415\u0441\u043b\u0438 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0434\u0440\u0443\u0433\u0438\u0435 \u0444\u0430\u0439\u043b\u044b \u0438\u043b\u0438 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0438, \u043e\u043d\u0430 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0443. \u042d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043a\u0430\u043a \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438, \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u0443\u044e \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u044c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u043e\u0432 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0438\u043c\u043b\u0438\u043d\u043a\u043e\u0432.\n\u25aa\ufe0f\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 clone_submodule: \u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u043a \u043a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e, Git \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043b\u0438 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0441\u0443\u0431\u043c\u043e\u0434\u0443\u043b\u044f \u0438 \u043f\u0443\u0441\u0442 \u043b\u0438 \u043e\u043d. \u0415\u0441\u043b\u0438 \u043d\u0435\u0442, \u043e\u043d \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u0435\u0442 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u0438.\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 clone_submodule: \u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u043a \u043a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e, Git \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043b\u0438 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0441\u0443\u0431\u043c\u043e\u0434\u0443\u043b\u044f \u0438 \u043f\u0443\u0441\u0442 \u043b\u0438 \u043e\u043d. \u0415\u0441\u043b\u0438 \u043d\u0435\u0442, \u043e\u043d \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u0435\u0442 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u0438.\n\n\u27a1\ufe0f\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c t/t7406-submodule-update.sh\n1. \u0413\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u0430\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f\ntest_config_global protocol.file.allow always &amp;&amp;\ntest_config_global core.symlinks true &amp;&amp;\ntell_tale_path=\"$PWD/tell.tale\" &amp;&amp;\n\u0421\u043a\u0440\u0438\u043f\u0442 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 Git: protocol.file.allow \u0432\u0441\u0435\u0433\u0434\u0430 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b \u0434\u043b\u044f Git. core.symlinks true \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u0441\u0438\u043c\u043b\u0438\u043d\u043a\u043e\u0432.\n\u0422\u0430\u043a\u0436\u0435 \u0441\u043a\u0440\u0438\u043f\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 tell_tale_path \u043a\u0430\u043a \u0444\u0430\u0439\u043b-\u043c\u0430\u0440\u043a\u0435\u0440 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438 RCE.\n\n2. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 hook \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f\ngit init hook &amp;&amp;\n(\n    cd hook &amp;&amp;\n    mkdir -p y/hooks &amp;&amp;\n    write_script y/hooks/post-checkout &lt;&lt;-EOF &amp;&amp;\n    echo HOOK-RUN &gt;&amp;2\n    echo hook-run &gt;\"$tell_tale_path\"\n    EOF\n    git add y/hooks/post-checkout &amp;&amp;\n    test_tick &amp;&amp;\n    git commit -m post-checkout\n) &amp;&amp;\n\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u043d\u043e\u0432\u044b\u0439 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c hook.\n\u0421\u043e\u0437\u0434\u0430\u0435\u0442 \u043f\u043e\u0441\u0442-\u0447\u0435\u043a\u0430\u0443\u0442 \u0445\u0443\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 hook-run \u0432 tell_tale_path.\n\u041a\u043e\u043c\u043c\u0438\u0442\u0438\u0442 \u0441\u043a\u0440\u0438\u043f\u0442 \u0445\u0443\u043a\u0430 \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 hook.\n\n3. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 main \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f\nhook_repo_path=\"$(pwd)/hook\" &amp;&amp;\ngit init captain &amp;&amp;\n(\n    cd captain &amp;&amp;\n    git submodule add --name x/y \"$hook_repo_path\" A/modules/x &amp;&amp;\n    test_tick &amp;&amp;\n    git commit -m add-submodule &amp;&amp;\n    printf .git &gt;dotgit.txt &amp;&amp;\n    git hash-object -w --stdin dot-git.hash &amp;&amp;\n    printf \"120000 %s 0\\ta\\n\" \"$(cat dot-git.hash)\" &gt;index.info &amp;&amp;\n    git update-index --index-info &lt;index.info &amp;&amp;\n    test_tick &amp;&amp;\n    git commit -m add-symlink\n) &amp;&amp;\n\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043f\u0443\u0442\u044c \u043a \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0443 hook'\u043e\u0432.\n\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0434\u0440\u0443\u0433\u043e\u0439 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c captain.\n\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 hook \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u043e\u0434\u043c\u043e\u0434\u0443\u043b\u044f \u0432 A/modules/x \u0438 \u0444\u0438\u043a\u0441\u0438\u0440\u0443\u0435\u0442 \u044d\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435.\n\u0421\u043e\u0437\u0434\u0430\u0435\u0442 \u0441\u0438\u043c\u043b\u0438\u043d\u043a, \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u043d\u0430 .git, \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442 \u0438\u043d\u0434\u0435\u043a\u0441 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u044d\u0442\u043e\u0433\u043e \u0441\u0438\u043c\u043b\u0438\u043d\u043a\u0430.", "creation_timestamp": "2024-05-20T10:04:34.000000Z"}