Php Ssrf Audit logo

Php Ssrf Audit

Community
0xShe
php-ssrf-audit

PHP Web 源码 SSRF 审计工具。识别用户可控 URL/地址进入网络请求 Sink,追踪内网/协议/端口限制与回显,输出可利用性分级、PoC 与修复建议(禁止省略)。

Overview

Publisher0xShe
RepositoryPHP-Code-Audit-Skill
Skill namephp-ssrf-audit
Stars
406
Forks
42
Bundled files
Instructions only
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by 0xShe on GitHub. Read the source before you install it.

Installation

Install the Php Ssrf Audit AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/0xShe/PHP-Code-Audit-Skill/tree/main/php-ssrf-audit
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/0xShe/PHP-Code-Audit-Skill.git /tmp/PHP-Code-Audit-Skill
mkdir -p .claude/skills
cp -r /tmp/PHP-Code-Audit-Skill/php-ssrf-audit .claude/skills/php-ssrf-audit
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Php Ssrf Audit in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Php Ssrf Audit on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Php Ssrf Audit is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

PHP SSRF 审计(php-ssrf-audit)

分析 PHP 项目源码,识别 SSRF 风险:用户可控 URL/主机/路径进入网络请求或读取类函数,且缺少协议 allowlist、DNS/IP 内网拒绝、端口限制等控制。

分级与编号

  • 详见:shared/SEVERITY_RATING.md
  • 漏洞编号:{C/H/M/L}-SSRF-{序号}

SSRF Sink(必做)

识别至少以下网络/地址访问点:

  • curl_setopt(CURLOPT_URL, $url) / curl_exec
  • file_get_contents($url) / readfile($url) / fopen($url, {value})
  • stream_get_contents($stream) / fsockopen / pfsockopen
  • get_headers($url) / dns_get_record(配合地址解析时) 危险模式:
  • URL/Host/Port/Path 来自用户输入且可控
  • 协议未限制(允许 file://、gopher://、php:// 等)

必做的安全检查点

  • 协议白名单:仅允许 http/https(如有必要)
  • DNS/IP 解析后内网网段拦截:拒绝 127.0.0.1/::1/10.0.0.0/8/172.16.0.0/12/192.168.0.0/16 等
  • 端口限制:拒绝内网高危端口(由项目策略决定)
  • 重定向处理:跟随跳转的限制(如 CURLOPT_FOLLOWLOCATION)
  • 重定向与最终地址校验:即使初始 URL 通过 allowlist,仍必须对“重定向后的最终 URL”执行同等拦截与协议校验
  • DNS rebinding 防护:允许域名访问时,必须在实际发起请求前进行最终解析,或使用安全解析策略避免“先外网后内网”
  • URL 归一化:对编码后的主机/路径(双重编码、大小写、用户信息段 user:pass@host)先归一化再做 allowlist 判断

触发 tracer 的条件

  • URL 由多字段拼接(schema + host + path + query)
  • 存在多层函数调用或编码/解码/替换
  • 安全判断依赖字符串规范化(必须追踪真实最终 URL)

报告输出

{output_path}/vuln_audit/ssrf_{timestamp}.md

漏洞条目模板(强制)

与 php-sql-audit 同结构,但在数据流链里必须覆盖:

  • 最终用于发起请求的 URL/Host/Port 变量来源与拼接过程
  • 协议选择与内网拦截判断的分支证据

证据引用(强制:来自 php-route-tracer)

每条 SSRF 疑似漏洞必须逐项引用 trace 输出中 ## 9) Sink Evidence Type Checklist 的 SSRF 行对应证据要点(禁止只写“可能”;允许状态为待验证,但证据引用必须存在):

  1. EVID_SSRF_URL_NORMALIZATION:URL 归一化步骤(对应 SSRF 行中的证据点)
  2. EVID_SSRF_FINAL_URL_HOST_PORT:发起请求前的最终 URL/Host/Port(对应 SSRF 行中的证据点)
  3. EVID_SSRF_FINAL_REDIRECT_URL:若存在重定向/跟随跳转:最终重定向后地址证据(对应 SSRF 行中的证据点)
  4. EVID_SSRF_DNSIP_AND_INNER_BLOCK:DNS/IP 解析与内网拦截判定证据(对应 SSRF 行中的证据点)

tracer 证据缺失处理(强制)

  • 若在 trace 中找不到上述 1~4 任一关键证据点:该条漏洞状态只能标记为 ⚠️待验证,不得给出 ✅已确认可利用。
PoC(强制)
  • 必须给出可执行请求(HTTP 代码块)
  • PoC URL 必须使用真实路由并替换为真实可控字段名

Frequently asked questions

What does the Php Ssrf Audit AI skill do?

PHP Web 源码 SSRF 审计工具。识别用户可控 URL/地址进入网络请求 Sink,追踪内网/协议/端口限制与回显,输出可利用性分级、PoC 与修复建议(禁止省略)。

Why use Php Ssrf Audit on TypingMind?

Because you install it once and use it with any model. Php Ssrf Audit is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Php Ssrf Audit in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/0xShe/PHP-Code-Audit-Skill/tree/main/php-ssrf-audit. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Php Ssrf Audit?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Php Ssrf Audit?

As many as you like. As long as a model supports skills, you can use Php Ssrf Audit with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Php Ssrf Audit AI skill free?

It is published on GitHub by 0xShe. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇