phpinfo-to-rce
Agent skill fromuphiago/recon-skills
Chain phpinfo to RCE via exec check when info.php exposed.
How to install phpinfo-to-rce
install phpinfo-to-rce
# install the recon-skills pack with the skills CLI
npx skills add uphiago/recon-skills# or add only this skill to Claude Code: copy the folder
recon/phpinfo-to-rce/
# into
~/.claude/skills/phpinfo-to-rce/ (all projects)
.claude/skills/phpinfo-to-rce/ (one project)
1# PHPInfo → RCE Chain Skill23Evaluate exposed `phpinfo()` pages for configuration disclosure and the4prerequisites of a separate execution path. Enabled process functions do not5create RCE without an authorized code or file-execution primitive.67## When to Use89- `source-leak-hunt` flags a target with `info.php` or `phpinfo.php` exposed.10- You need to confirm whether RCE is possible before investing in upload vectors.11- Building an attack chain that requires code execution.12- Target has a file upload path (open registration + XMLRPC, contact form, profile image, etc.).1314## Prerequisites1516- `terminal` with curl.17- Confirmed exposed phpinfo page (HTTP 200, contains "PHP Version").18- For RCE: a file upload vector on the same host (XMLRPC with credentials, open registration, contact form, etc.).1920## How to Run2122```bash23# Step 1: Fetch phpinfo and check for exec restrictions24curl --max-time 30 --connect-timeout 10 -sk "https://TARGET/info.php" | grep -i "disable_functions"2526# Step 2: If ONLY pcntl_* is disabled, all exec functions are available27# Step 3: Find upload vector and deliver webshell28```2930## Quick Reference3132| Check | What to Look For | Implication |33|-------|-----------------|-------------|34| `disable_functions` | Only `pcntl_alarm,pcntl_fork,...` | All exec available — RCE possible |35| `disable_functions` | `exec,system,passthru,shell_exec,popen,proc_open` | Exec blocked — need bypass |36| `allow_url_fopen` | On | Remote file inclusion possible |37…
Excerpt shown under the repository's MIT license.
