关联漏洞
标题:
Apache Solr 代码问题漏洞
(CVE-2017-12629)
描述:Apache Solr是美国阿帕奇(Apache)基金会的一款基于Lucene(一款全文搜索引擎)的搜索服务器。该产品支持层面搜索、垂直搜索、高亮显示搜索结果等。 使用Apache Lucene 7.1之前版本的Apache Solr 7.1之前的版本中存在代码问题漏洞。远程攻击者可利用该漏洞执行代码或读取本地任意文件。
描述
Remote code execution occurs in Apache Solr before 7.1 with Apache Lucene before 7.1 by exploiting XXE in conjunction with use of a Config API add-listener command to reach the RunExecutableListener class.
介绍
# README
Remote code execution occurs in Apache Solr before 7.1 with Apache Lucene before 7.1 by exploiting XXE in conjunction with use of a Config API add-listener command to reach the RunExecutableListener class. Elasticsearch, although it uses Lucene, is NOT vulnerable to this. Note that the XML external entity expansion vulnerability occurs in the XML Query Parser which is available, by default, for any query request with parameters deftype=xmlparser and can be exploited to upload malicious data to the /upload request handler or as Blind XXE using ftp wrapper in order to read arbitrary local files from the Solr server. Note also that the second vulnerability relates to remote code execution using the RunExecutableListener available on all affected versions of Solr.
# Usage
Command output needs to be exfiltrated OOB. This POC includes support for Hex and Base32 formats, which are both case-insensitive.
```
usage: rce.py [-h] -ue URL_BASE_EXTERNAL -ui URL_BASE_INTERNAL [-b {curl,wget,ftp,ping,nc,ncat,nslookup,dig}] -e EXFIL
[-f {hex,base32}]
POC for CVE-2017-12629 (RCE via internal SSRF via XXE) by @realCaptainWoof
options:
-h, --help show this help message and exit
-ue, --url-base-external URL_BASE_EXTERNAL
External URL base of the vulnerable application; e.g, 'https://vulnerable.app/solr'
-ui, --url-base-internal URL_BASE_INTERNAL
Internal URL base of the vulnerable application; e.g, 'https://127.0.0.1:8983'; default:
'https://127.0.0.1:8983'
-b, --bin {curl,wget,ftp,ping,nc,ncat,nslookup,dig}
How to exfiltrate command output from target; default: 'curl'
-e, --exfil EXFIL Destination to exfil to. Make sure this corresponds to '--bin'; e.g, if '--bin' is 'curl', '--exfil' can
be 'http://EXFIL.myserver.com/EXFIL'. Must specify injection point via 'EXFIL' keyword.
-f, --exfil-format {hex,base32}
Format in which to exfil the command output; default: 'base32'
```
# References
- https://www.exploit-db.com/exploits/43009
文件快照
[4.0K] /data/pocs/2da884a411eddf70bfc1d18ee07edba1da73631a
├── [6.5K] rce.py
└── [2.1K] README.md
0 directories, 2 files
备注
1. 建议优先通过来源进行访问。
2. 如果因为来源失效或无法访问,请发送邮箱到 f.jinxu#gmail.com 索取本地快照(把 # 换成 @)。
3. 神龙已为您对POC代码进行快照,为了长期维护,请考虑为本地POC付费,感谢您的支持。