Php Auth Config Audit logo

Php Auth Config Audit

OrganizationPopular
wgpsec
php-auth-config-audit

PHP 源码认证、配置与逻辑类漏洞审计。当在 PHP 白盒审计中需要检测认证绕过、 权限控制、安全配置、密码学误用或业务逻辑漏洞时触发。 覆盖 5 类风险: 认证绕过(硬编码凭据/弱比较/JWT 缺陷)、授权失控(IDOR/水平越权)、 安全配置(CORS/错误暴露/调试模式)、密码学误用(弱哈希/ECB/硬编码密钥)、业务逻辑(竞争条件/支付篡改)。

Overview

Publisherwgpsec
RepositoryAboutSecurity
Skill namephp-auth-config-audit
Stars
1.7K
Forks
242
Bundled files
1
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.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

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

Installation

Install the Php Auth Config 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.
  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/wgpsec/AboutSecurity.git /tmp/AboutSecurity
mkdir -p .claude/skills
cp -r /tmp/AboutSecurity/skills/code-audit/php/php-auth-config-audit .claude/skills/php-auth-config-audit
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Php Auth Config 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 Auth Config 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 Auth Config 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 认证配置与逻辑类漏洞源码审计

本 skill 聚焦源码层面的认证、授权、配置、密码学和业务逻辑缺陷。运行时利用(如 JWT 伪造、条件竞争脚本)属于对应黑盒 exploit skill 范畴。

深入参考


5 类风险速查表

类型典型模式危险信号严重度
认证绕过硬编码凭据、== 弱比较、JWT algorithm none登录/令牌验证逻辑Critical-High
授权失控IDOR 直接引用、缺少 ownership 检查、中间件跳过资源访问无权限校验High-Critical
安全配置display_errors=On、CORS *、调试模式残留信息泄露/跨域滥用Medium-High
密码学误用md5($pass)、ECB 模式、硬编码密钥密码存储/加解密逻辑High-Critical
业务逻辑竞争条件、支付金额可控、状态机跳步交易/库存/状态流转High-Critical

认证审计要点

  • 硬编码密码/API Key: 搜索 password/secret/api_key/token 赋值为字面量字符串的位置
  • 弱比较: == 对比密码/token 导致类型混淆("0e123" == "0e456" 为 true),必须使用 ===hash_equals
  • JWT 缺陷: algorithm confusion(RS256→HS256)、签名未验证、alg:none 接受、密钥泄露、kid 参数注入
  • Remember Me: token 是否可预测(md5(username.time()))、是否绑定用户/设备
  • 密码重置: token 可预测性、token 是否绑定目标用户、是否有过期机制

授权审计要点

  • IDOR: $_GET['id'] 直接查询无 WHERE user_id= 归属检查,对象引用可水平篡改
  • 路由级 vs 函数级权限: 中间件挂载范围是否完整覆盖、是否存在未保护的路由
  • 中间件跳过: 路由分组遗漏、withoutMiddleware 滥用、OPTIONS 预检绕过
  • 水平越权 vs 垂直越权: 水平 — 同角色访问他人资源;垂直 — 低权限访问高权限功能

配置审计要点

  • 错误暴露: display_errors=On + error_reporting=E_ALL 泄露路径/SQL/栈信息
  • CORS: Access-Control-Allow-Origin: * 配合 Allow-Credentials: true 允许任意源携带凭据
  • 调试模式: Laravel APP_DEBUG=true、ThinkPHP app_debug、自定义 DEBUG 常量残留
  • 安全头缺失: X-Frame-OptionsContent-Security-PolicyX-Content-Type-Options 未设置

密码学审计要点

  • 弱哈希: md5($pass) / sha1($pass) 用于密码存储,应使用 password_hash(PASSWORD_BCRYPT)
  • ECB 模式: 确定性加密,相同明文产生相同密文,可分析推断内容
  • 硬编码密钥: KEY/IV/SECRET 写死在源码中,搜索 openssl_encrypt/mcrypt_* 调用的密钥来源
  • 弱随机数: mt_rand/rand/uniqid 用于生成安全令牌,应使用 random_bytes/random_int

逻辑审计要点

  • 竞争条件: 余额/库存先查后减无事务/无锁(SELECT→UPDATE 无 FOR UPDATE
  • 支付金额篡改: 金额从客户端传入而非服务端计算、缺少签名验证
  • 状态机跳步: 订单状态从"待支付"直接跳到"已发货",缺少状态转换合法性校验
  • 批量操作无限制: 无频率限制/无数量上限,可被滥用进行批量操作

检测清单

  • 硬编码凭据搜索已完成(password/secret/key/token/api_key)
  • 所有 == 比较密码/token 的位置已标记
  • JWT 签名验证逻辑已审查(algorithm、密钥来源、kid)
  • IDOR 风险点已检查 ownership 校验
  • 路由权限覆盖完整性已验证
  • php.ini / 框架配置安全基线已对照
  • 密码存储方式已确认(password_hash vs md5/sha1)
  • 加密密钥管理方式已审查(硬编码 vs 环境变量/密钥管理)
  • 竞争条件敏感操作已检查事务/锁机制
  • 支付/交易流程的金额来源和签名验证已确认

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Php Auth Config Audit AI skill do?

PHP 源码认证、配置与逻辑类漏洞审计。当在 PHP 白盒审计中需要检测认证绕过、 权限控制、安全配置、密码学误用或业务逻辑漏洞时触发。 覆盖 5 类风险: 认证绕过(硬编码凭据/弱比较/JWT 缺陷)、授权失控(IDOR/水平越权)、 安全配置(CORS/错误暴露/调试模式)、密码学误用(弱哈希/ECB/硬编码密钥)、业务逻辑(竞争条件/支付篡改)。

Why use Php Auth Config Audit on TypingMind?

Because you install it once and use it with any model. Php Auth Config 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 Auth Config Audit in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/wgpsec/AboutSecurity/tree/master/skills/code-audit/php/php-auth-config-audit. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Php Auth Config 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 Auth Config Audit?

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

Is the Php Auth Config Audit AI skill free?

It is published on GitHub by wgpsec. 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 👇