Skip to content

Commit

Permalink
Fix #68
Browse files Browse the repository at this point in the history
  • Loading branch information
garrettfoster13 committed Dec 17, 2024
1 parent 0dbc76f commit 3529360
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/attacks/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def manual_request(self):
with open (f"{self.logs_dir}/{self.uuid}.pem", "rb") as g:
key = serialization.load_pem_private_key(g.read(), password=b"mimikatz")
deflatedData = sccmwtf.sendCCMPostRequest(data=data, mp=target_mp_url)
result = re.search("PolicyCategory=\"NAAConfig\".*?<!\[CDATA\[https*://<mp>([^]]+)", deflatedData, re.DOTALL + re.MULTILINE)
result = re.search(r"PolicyCategory=\"NAAConfig\".*?<!\[CDATA\[https*://<mp>([^]]+)", deflatedData, re.DOTALL + re.MULTILINE)
urls = [result.group(1)]
for url in urls:
result = sccmwtf.requestPolicy(url)
Expand Down
4 changes: 2 additions & 2 deletions lib/scripts/sccmwtf.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def sendCCMPostRequestWithOutAuth(self, data, headers):
if part is not None and part.headers[b'content-type'] == b'application/octet-stream':
try:
decompressed = zlib.decompress(part.content).decode('utf-16')
result = re.search("PolicyCategory=\"NAAConfig\".*?<!\[CDATA\[https*://<mp>([^]]+)", decompressed, re.DOTALL + re.MULTILINE)
result = re.search(r"PolicyCategory=\"NAAConfig\".*?<!\[CDATA\[https*://<mp>([^]]+)", decompressed, re.DOTALL + re.MULTILINE)
if result:

return r
Expand Down Expand Up @@ -291,7 +291,7 @@ def sendPolicyRequest(self, name, fqname, uuid, targetName, targetFQDN, targetUU
with open (f"{self.logs_dir}/{uuid}.data", "wb") as f:
f.write(data)
deflatedData = self.sendCCMPostRequest(data)
result = re.search("PolicyCategory=\"NAAConfig\".*?<!\[CDATA\[https*://<mp>([^]]+)", deflatedData, re.DOTALL + re.MULTILINE)
result = re.search(r"PolicyCategory=\"NAAConfig\".*?<!\[CDATA\[https*://<mp>([^]]+)", deflatedData, re.DOTALL + re.MULTILINE)
return [result.group(1)]


Expand Down

0 comments on commit 3529360

Please sign in to comment.