Php Open Redirect Audit
PHP Web 源码开放重定向审计工具。识别用户可控重定向目的地进入 header Location/跳转函数,分析校验与 allowlist,输出分级、PoC 与修复建议(禁止省略)。
Install
npx skills add NeverSight/learn-skills.dev --skill php-open-redirect-auditgit clone --depth 1 https://github.com/NeverSight/learn-skills.dev.git /tmp/learn-skills.dev
mkdir -p ~/.claude/skills
cp -r /tmp/learn-skills.dev/data/skills-md/0xshe/php-code-audit-skill/php-open-redirect-audit ~/.claude/skills/php-open-redirect-auditPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# PHP 开放重定向审计(php-open-redirect-audit)
分析 PHP 项目源码中,所有“跳转/重定向”行为是否可能被用户控制目的地址,导致钓鱼或 OAuth 等流程被劫持。
## 分级与编号
- 详见:`shared/SEVERITY_RATING.md`
- 漏洞编号:`{C/H/M/L}-REDIR-{序号}`
## 必检 Sink(强制)
识别以下跳转输出点:
- `header("Location: {value}")`
- `<meta http-equiv="refresh" content="{value}">`
- `redirect()` / `to()` / `return redirect({value})`
- 自定义跳转函数(内部最终调用 Location 输出)
## 可控性追踪(必做)
必须追踪以下两类变量:
1. 目的地来源:通常来自 `$_GET['next']`/`$_POST['url']`/`Referer`/`return_to`
2. 目的地校验:是否只允许相对路径、是否 allowlist、是否拒绝 scheme(`http://`/`//`)、是否校验域名
## 绕过条件(必做)
必须识别并输出潜在绕过:
- scheme 绕过:`//evil.com`、`http:%2f%2fevil.com`
- 编码绕过:双重编码、URL 编码的冒号/斜杠
- 尾部/空白字符绕过(旧实现常见)
## 报告输出
```
{output_path}/vuln_audit/redir_{timestamp}.md
```
## 条目模板(强制)
每条漏洞必须包含:
- 位置证据:跳转函数位置 + 路由
- 数据流链:用户输入 -> 校验 -> header/redirect
- 可利用前置条件:通常需登录(若在登录后跳转)与攻击者能否控制参数
- 验证 PoC(必须真实路由;把目的地参数替换为真实字段名)
- 修复建议:只允许相对路径 + 服务器端 allowlist + 对编码/scheme 做归一化后校验
## 证据引用(强制:来自 php-route-tracer)
每条开放重定向疑似漏洞必须逐项引用 trace 输出中 `## 9) Sink Evidence Type Checklist` 的 **REDIR 行**对应证据要点(允许状态为待验证,但证据引用必须存在):
1. `EVID_REDIR_OUTPUT_POINT`:跳转输出点位置证据(header/redirect 的最终输出位置)
2. `EVID_REDIR_DEST_SOURCE_MAPPING`:目的地来源变量映射证据(从路由参数到目的地变量)
3. `EVID_REDIR_DEST_VALIDATION_NORMALIZATION`:目的地校验/归一化/allowlist/refuse scheme 的分支证据(含编码绕过处理分支)
## tracer 证据缺失处理(强制)
- 若无法定位上述 1~3 任一关键证据要点:该漏洞状态只能标记为 `⚠️待验证`,不得直接给出 `✅已确认可利用`。Details
- Skill name
php-open-redirect-audit- Repository
- NeverSight/learn-skills.dev
- Path
data/skills-md/0xshe/php-code-audit-skill/php-open-redirect-audit/SKILL.md- Repo updated
- 18 November 2026
FAQ
What does the Php Open Redirect Audit skill do?
PHP Web 源码开放重定向审计工具。识别用户可控重定向目的地进入 header Location/跳转函数,分析校验与 allowlist,输出分级、PoC 与修复建议(禁止省略)。
How do I install the Php Open Redirect Audit skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add NeverSight/learn-skills.dev --skill php-open-redirect-audit. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Php Open Redirect Audit popular?
It lives in NeverSight/learn-skills.dev, which has 223 GitHub stars and 42 forks.
Related skills
Council
223NeverSight/learn-skills.dev
Convene the Council of High Intelligence — multi-persona deliberation with historical thinkers for deeper analysis of complex problems.
Megaeth Developer
223NeverSight/learn-skills.dev
End-to-end MegaETH development playbook (Feb 2026). Covers wallet operations, token swaps (Kyber Network), eth_sendRawTransactionSync (EIP-7966) for instant receipts, JSON-RPC batching, real-time mini-block subscriptions, storage-aware contract patterns (Solady RedBlackTreeLib), MegaEVM gas model, WebSocket keepalive, bridging from Ethereum, and debugging with mega-evme. Use when building on MegaETH, managing wallets, sending transactions, or deploying contracts.
Openclaw Stock Skill
223NeverSight/learn-skills.dev
使用 data.diemeng.chat 提供的接口查询股票日线、分钟线、财务指标等数据,支持 A 股等市场。
Php Pro
121theguysudo/ENZO
Use when building PHP applications with modern PHP 8.3+ features, Laravel, or Symfony frameworks. Invokes strict typing, PHPStan level 9, async patterns with Swoole, and PSR standards. Creates controllers, configures middleware, generates migrations, writes PHPUnit/Pest tests, defines typed DTOs and value objects, sets up dependency injection, and scaffolds REST/GraphQL APIs. Use when working with Eloquent, Doctrine, Composer, Psalm, ReactPHP, or any PHP API development.
Php Nosql Audit
223NeverSight/learn-skills.dev
PHP Web 源码 NoSQL 注入审计工具。识别用户输入进入 MongoDB/DocumentDB 查询构造,分析是否存在 operator 注入($gt/$ne/$where 等),输出分级、PoC 与修复建议(禁止省略)。
Php Route Mapper
223NeverSight/learn-skills.dev
PHP Web 源码路由与参数映射分析工具。从源码中提取所有入口路由与参数结构,输出完整请求模板与参数清单(禁止省略)。
Browse the most popular Claude skills, all software development skills, or write your own with the skills generator.