Skip to content
Back to skills

Source Disclosure

ASecurity

Recovery of server-side source code via PHP filter wrappers, backup/.bak/.swp/editor temp files, source maps and misserved handlers that return raw code instead of executing it. Tier 1. Use when backups/editor artifacts appear or a parameter looks file-driven.

  • 16 stars
  • 0 votes
  • 0 copies
  • 9 views
  • Added November 17, 2026
securityphpsqldatabasebackend

Works with

  • vscode
  • cli

Security analysis

A100/100

Scanned November 17, 2026

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

Installs into .claude/skills of the current project.

Are you the author of Source Disclosure?

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

Security grade badge for Source Disclosure
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/anandjogawade-source-disclosure/badge)](https://www.skillsdirectory.com/skills/anandjogawade-source-disclosure)

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: source-disclosure
description: Recovery of server-side source code via PHP filter wrappers, backup/.bak/.swp/editor temp files, source maps and misserved handlers that return raw code instead of executing it. Tier 1. Use when backups/editor artifacts appear or a parameter looks file-driven.
---

# Source Code Disclosure

Reading server source hands over logic, hardcoded secrets, DB creds, hidden endpoints and the exact code to attack next.

## Trigger phrases
`source disclosure, source code leak, php filter, bak file, swp file, source map, raw source, code disclosure`

## Method
1. **Backup/temp variants** of every known server file (per `content-discovery`): append `~ .bak .old .orig .save .swp .swo .txt .inc .dist .sample .1 .copy` and prefix patterns (`.index.php.swp`, `#file#`, `file.php~`). Vim swap `.<name>.swp` holds full buffers.
2. **Source maps**: append `.map` to each JS bundle; parse `sourcesContent[]` to reconstruct original TS/JS + inline secrets/endpoints → `secrets-disclosure`.
3. **Misserved handlers**: request scripts with alternate extensions/case/encoding (`index.phps`, `index.php.`, `index.php%00.txt`, `.PHP`, `::$DATA` on IIS) to make the server return raw code instead of executing.
4. **PHP filter chain read** (error-based oracle, RARE): where a param drives `include`/file read, use `php://filter/convert.base64-encode/resource=index.php` to dump source, or `convert.iconv.*` chains (`php_filter_chain_generator`) to leak bytes under an error oracle. See ${CLAUDE_PLUGIN_ROOT}/payloads/injection.md and `code-injection`.
5. **LFI → source**: file-driven params (`?page=`, `?template=`, `?file=`) with filter wrappers or `../` to read `.php`/`.config` source.

## Modern / rare techniques
- **Apache confusion (Orange Tsai)**: filename/handler/doc-root confusion can return `.php` source instead of running it → `tech-misconfig`.
- **Editor artifacts**: `.vscode/`, `.idea/`, `*.php.save-failed`, `nohup.out`.
- **Template/engine source** via SSTI read primitives when direct read is blocked.

## Bypass / evasion
Encoding/case tricks and wrapper chaining to defeat extension/handler filters; see ${CLAUDE_PLUGIN_ROOT}/payloads/waf-bypass.md.

## Escalation / chaining
Recovered source → `secrets-disclosure`, `database-enumeration` (creds), targeted `web-sqli`/`code-injection`/`web-deserialization` from exact code, `idor`/`business-logic` from logic review. Overlaps `script-source-control` (VCS dumps) and `exposed-files`.

## Backend & tooling
Kali/HexStrike (ffuf/curl/`php_filter_chain_generator`). Burp Repeater for handler/encoding fuzzing.

## Verification (background, before reporting)
Re-fetch and confirm the response is genuine server source (not client JS or an error page); diff against expected execution output to prove it's raw code. Validate any recovered secret safely.

## Evidence
URL + method of disclosure, source excerpt (redact secrets), what it reveals, impact + remediation (block dotfiles/backups/`.map` in prod, disable dangerous wrappers, fix handler mappings).

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.