⛔ In-Depth Reference (Required Reading)
- .git full exploitation chain (dump → history audit → stash/branch → credential extraction) → references/source-recovery.md
- .svn exploitation (entries file / wc.db SQLite query / pristine file recovery) → references/source-recovery.md
- .DS_Store parsing, Swagger exploitation, credential search → references/source-recovery.md
- API parameter manipulation leakage (query=% wildcard, info→list transformation, pageSize amplification, empty array bypass) → references/api-param-tricks.md
Phase 1: Source Code and Configuration Files
Directly request common sensitive paths (test one by one or batch scan):
/.git/HEAD /.env /config.py /Dockerfile
/.svn/entries /.svn/wc.db /.DS_Store /robots.txt
/WEB-INF/web.xml /package.json /app.py /backup.sql
/.dockerenv /composer.json /Gemfile /requirements.txt
- Use
curl -s -o /dev/null -w '%{http_code}' http://TARGET/<path>to batch detect status codes - For 200 responses, further check whether the content is a real file (rule out custom 404 pages)
.git/HEADreturns 200 → git-dumper full dump → git log audit historical commits to find passwords/flags!.svn/entriesor.svn/wc.dbreturns 200 → svn-extractor dump → extract file list and contents.envreturns 200 → directly read sensitive configurations such as database connection strings, API Keys, SECRET_KEY, etc. → Detailed source code recovery steps → references/source-recovery.md
Phase 2: Debug Information
- Send malformed requests to trigger 500 error pages (missing parameters, type mismatch, illegal characters)
- Flask
debug=Truedisplays full source code and interactive debugger (may directly lead to RCE) - Django DEBUG=True displays settings, URL routing, SQL queries
- Extract from Stack Trace: absolute file paths, framework version, database type, variable values
- Check response Header:
Server、X-Powered-By、X-Debug-Token、X-Request-Id - Try to access
/debug、/trace、/actuator(Spring Boot)、/elmah.axd(.NET)
Phase 3: API Documentation Leakage
- Request documentation endpoints one by one:
/docs、/swagger、/swagger.json、/swagger-ui.html - Additional paths:
/openapi.json、/redoc、/api-docs、/graphql、/graphiql - Check
/v1/docs、/v2/docsand other paths with version prefixes - Extract from API documentation: list of all endpoints, parameter types and example values, authentication methods, data model definitions
- Focus on admin interfaces (
/admin/*), user management (/users), file operations (/upload、/download) - GraphQL introspection query:
{__schema{types{name,fields{name}}}}
Phase 4: Backups and Logs
- Scan backup files:
/backup.zip、/backup.tar.gz、/app.py.bak、/web.config.old - Filename variants:
index.php.bak、index.php~、index.php.swp、.index.php.swp - Log files:
/access.log、/error.log、/debug.log、/app.log - Use
sprayorffuftogether with a backup dictionary to scan more paths - Database backups:
/dump.sql、/db.sql、/database.sql、/backup.sql - Version control remnants:
/.hg/(Mercurial)、/.bzr/(Bazaar)
Phase 5: API Parameter Manipulation
- After discovering an API endpoint, perform four manipulations on query parameters: blank out,
%wildcard, null, delete parameter pageSize=9999amplify pagination to obtain more datainfo→listendpoint transformation, look for list interfaces- Empty array
[]→ delete Token, test authentication bypass - Add
verbose=true、debug=1parameter, check whether additional information is returned → Detailed techniques and cases → references/api-param-tricks.md
Phase 6: Credential Search
- Search in the obtained source code/configuration:
password、secret、api_key、token、mysql:// - Check
.envdatabase connection strings and third-party API keys in the file - Search for SSH private keys:
/.ssh/id_rsa、/home/*/.ssh/id_rsa - Base64-encoded credentials: decode all Base64 strings to inspect the contents
- Use credentials immediately upon finding them: log in to the web, SSH connections, direct database connections
- Search Git history for deleted passwords:
git log -p -S 'password'