End-to-end PoC for Netgear R8500 firmware V1.0.2.100_1.0.82: unauthenticated config download, static DES decryption, admin credential recovery, and telnet root shell.
仅供授权安全测试使用。 请仅在你拥有或已获得明确书面授权的设备上运行本项目。
Netgear R8500(Nighthawk X8)固件 V1.0.2.100_1.0.82 存在一条从未认证到 root shell 的完整利用链:
未认证下载加密配置
→ 用固件静态 DES 密钥解密
→ 得到 Web 管理员口令 / 找回答案 / WPS PIN / WiFi 密码
→ 管理员登录后台
→ 隐藏调试页 /debug.htm
→ /newdebug.cgi form=3 启动 telnet
→ 无登录 uid=0 BusyBox root shell
核心问题:
? 之前的前缀,业务分发却对完整 URL 做 strstr,因此任意白名单静态文件 + 恶意查询串即可触发配置导出。"NtgrBak" 的逐块 DES 加密,所有设备相同,可离线解密。newdebug.cgi 可直接启动 utelnetd;固件缺少可用的 /bin/login,实际落到 BusyBox ash,直接获得 uid=0 root shell。| 版本 | 说明 | 官方下载 |
|---|---|---|
| V1.0.2.100_1.0.82 | 本项目实测版本 | R8500-V1.0.2.100_1.0.82.zip |
| V1.0.2.160_1.0.107 | 另一版本(未在本项目实机验证) | R8500-V1.0.2.160_1.0.107.zip |
固件由 NETGEAR 官方站点托管。刷机有风险,请先核对校验和,并在隔离环境中测试。
| 文件 | 说明 |
|---|---|
r8500_exploit.py | 单 IP 参数的端到端 PoC,仅使用 Python 标准库 |
R8500_vuln_report.md | 完整漏洞报告(已脱敏:无序列号、口令、答案、WPS PIN、SSID、MAC、IP) |
python3 r8500_exploit.py <ROUTER_IP> # 默认:仅关键信息
python3 r8500_exploit.py <ROUTER_IP> --all # 额外:完整 nvram + root 详情
默认输出(精简):
示例(占位符):
序列号 : <SERIAL>
设备/固件 : R8500 V1.0.2.100_1.0.82
Web 登录 : <ADMIN_USER> / <ADMIN_PASS>
问题答案 : <ANSWER_1> / <ANSWER_2>
WPS PIN : <WPS_PIN>
WiFi 名称/密码:
2.4G : <SSID_24G> / <PSK_24G>
5G-1 : <SSID_5G> / <PSK_5G>
5G-2 : <SSID_5G2> / <PSK_5G2>
Telnet 登录 : 无(直接 root shell,无需用户名密码)
Telnet 命令 : telnet <ROUTER_IP>
nc <ROUTER_IP> 23
--all 额外输出完整 nvram、DDNS/FTP 等凭据,以及 root shell 下的 DHCP 租约/主机名、ARP 表、无线客户端列表、shadow/passwd。
脚本默认保留 telnet 以便交互。测试结束后请执行脚本末尾打印的
form=3关闭命令;不要让无登录 root shell 长期暴露。
R8500_vuln_report.md 包含完整分析、证据与修复建议:
Authenticate 子串绕过 → 配置恢复 / 固件刷写(代码确认)http_username / http_passwdgenie.cgi 预认证执行(已确认无命令注入)本项目仅用于授权渗透测试、漏洞研究与防御验证。使用者应确保对目标设备拥有明确授权,并遵守当地法律法规。作者不对任何未授权使用或由此造成的损失负责。测试完成后请关闭 telnet、恢复设备配置,并妥善保管运行输出中的敏感信息。
For authorized security testing only. Run this project only against devices you own or have explicit written permission to test.
Netgear R8500 (Nighthawk X8) firmware V1.0.2.100_1.0.82 is vulnerable to a full unauthenticated-to-root exploit chain:
Unauthenticated encrypted-config download
→ decrypt with the static DES key embedded in firmware
→ recover web admin password / recovery answers / WPS PIN / WiFi keys
→ log in to the admin UI
→ hidden debug page /debug.htm
→ /newdebug.cgi form=3 starts telnet
→ unauthenticated uid=0 BusyBox root shell
Root causes:
?, while request dispatch runs strstr on the full URL. Any whitelisted static file plus a crafted query string reaches the config-export handler."NtgrBak" using a per-block DES schedule. Every device shares it, so backups can be decrypted offline.newdebug.cgi can start utelnetd. The firmware lacks a usable /bin/login, so the service falls back to BusyBox ash and yields a uid=0 root shell directly.| Version | Notes | Official download |
|---|---|---|
| V1.0.2.100_1.0.82 | Tested in this project | R8500-V1.0.2.100_1.0.82.zip |
| V1.0.2.160_1.0.107 | Additional build (not live-tested in this project) | R8500-V1.0.2.160_1.0.107.zip |
Firmware is hosted by NETGEAR. Flashing carries risk; verify checksums and test in an isolated environment.
| File | Description |
|---|---|
r8500_exploit.py | End-to-end PoC taking a single IP; Python standard library only |
R8500_vuln_report.md | Full sanitized report (no serial, passwords, answers, WPS PIN, SSIDs, MACs, or IPs) |
python3 r8500_exploit.py <ROUTER_IP> # concise key information
python3 r8500_exploit.py <ROUTER_IP> --all # full nvram + root-level details
Default output:
Example (placeholders):
Serial : <SERIAL>
Device/FW : R8500 V1.0.2.100_1.0.82
Web login : <ADMIN_USER> / <ADMIN_PASS>
Answers : <ANSWER_1> / <ANSWER_2>
WPS PIN : <WPS_PIN>
WiFi SSID/PSK :
2.4G : <SSID_24G> / <PSK_24G>
5G-1 : <SSID_5G> / <PSK_5G>
5G-2 : <SSID_5G2> / <PSK_5G2>
Telnet login : none (direct root shell)
Telnet : telnet <ROUTER_IP>
nc <ROUTER_IP> 23
--all additionally dumps every non-empty nvram key, DDNS/FTP credentials, DHCP leases/hostnames, the ARP table, wireless clients, and shadow/passwd from the root shell.
The script leaves telnet enabled by default. After testing, run the
form=3disable command printed at the end. Do not leave an unauthenticated root shell exposed.
R8500_vuln_report.md contains the full analysis, evidence, and remediation guidance:
Authenticate substring bypass → config restore / firmware flash (code-confirmed)http_username / http_passwdgenie.cgi execution (confirmed, no command injection)