One Router, Three Vulnerabilities: Security Research on the TOTOLINK A720R
The TOTOLINK A720R router's web management backend contains a hidden Telnet service that can be enabled without authentication using a hardcoded secret and a predictable date-based code, granting a root shell. Additionally, the diagnostic functionality suffers from argument injection, and the MAC filtering feature has a stack-based buffer overflow that can be exploited to control execution flow and enable the Telnet service.
Published on hacktivesecurity.com
Exploitation Internet of Things Reverse Engineering
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the CGI backend lacks proper input validation and contains undocumented privileged functionality protected only by a hardcoded secret and predictable code.
Impact
The Telnet backdoor allows unauthenticated attackers to gain a root shell if the Telnet port is reachable; the argument injection can disrupt diagnostic functions; and the buffer overflow can be used to control execution flow and enable the Telnet service, potentially leading to a root-level foothold.
What the attacker needed
Access to the router's web interface; knowledge of the hardcoded secret; predictable date-based code; Telnet port reachable (for remote exploitation)
The fix
The vulnerabilities should be fixed by removing the undocumented Telnet backdoor, adding proper input validation for diagnostic commands, and implementing bounds checking in the MAC filtering functionality; no patch is available.
How it was found
- Extract the firmware filesystem and locate the CGI binary cstecgi.cgi.
- Reverse engineer cstecgi.cgi to find the hidden Telnet functionality.
- Send an HTTP request to the CGI with action=telnet, enable=1, the hardcoded password, and a date-based code.
- Send a second request with enable=2 to start the Telnet service.
- Connect to the device via Telnet using the root username and the same password to obtain a shell.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
This report describes three security flaws in a home router. The most serious is a hidden remote login service (Telnet) that anyone can turn on without a password, using a secret code built into the router's software. Another flaw lets attackers inject extra commands into network diagnostic tools, and a third can crash or take over the router's web server by sending too much data.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.