Information Disclosure Methodology
- 攻击大类:C09 Web应用漏洞利用
⛔ Further Reading (Must Read)
- Full .git exploit chain (dump → history audit → stash/branches → credential extraction) → references/source-recovery.md
- .svn exploitation (entries file / wc.db SQLite queries / pristine file recovery) → references/source-recovery.md
- .DS_Store parsing, Swagger exploitation, credential search → references/source-recovery.md
- API parameter manipulation disclosure (query=% wildcard, info→list transformation, pageSize enlargement, empty array bypass) → references/api-param-tricks.md
Phase 1: Source Code and Configuration Files
Directly request common sensitive paths (test them one by one or scan in bulk):
/.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 check status codes - For 200 responses, further check whether the content is a real file (rule out custom 404 pages)
.git/HEADreturns 200 → dump the whole thing with git-dumper → audit the historical commits with git log to find passwords/flags!.svn/entriesor.svn/wc.dbreturns 200 → dump with svn-extractor → extract the file list and contents.envreturns 200 → directly read sensitive configuration such as the database connection string, API keys, and SECRET_KEY → Detailed source recovery steps → references/source-recovery.md
Phase 2: Debug Information
- Send malformed requests to trigger 500 error pages (missing parameters, type mismatches, illegal characters)
- Flask
debug=Trueshows the full source code and an interactive debugger (possibly direct RCE) - Django DEBUG=True shows settings, URL routes, and SQL queries
- Extract from the stack trace: absolute file paths, framework versions, database type, variable values
- Check the response headers:
Server,X-Powered-By,X-Debug-Token,X-Request-Id - Try accessing
/debug,/trace,/actuator(Spring Boot),/elmah.axd(.NET)
Phase 3: API Documentation Disclosure
- Request the documentation endpoints one by one:
/docs,/swagger,/swagger.json,/swagger-ui.html - Additional paths:
/openapi.json,/redoc,/api-docs,/graphql,/graphiql - Check version-prefixed paths such as
/v1/docsand/v2/docs - Extract from the API documentation: the full endpoint list, parameter types and sample values, authentication methods, data model definitions
- Pay special attention to admin interfaces (
/admin/*), user management (/users), and file operations (/upload,/download) - GraphQL introspection query:
{__schema{types{name,fields{name}}}}
Phase 4: Backups and Logs
- Scan for 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
sprayorffufwith a backup wordlist to scan for more paths - Database backups:
/dump.sql,/db.sql,/database.sql,/backup.sql - Version control leftovers:
/.hg/(Mercurial),/.bzr/(Bazaar)
Phase 5: API Parameter Manipulation
- After discovering an API endpoint, apply four manipulations to the query parameters: empty value,
%wildcard, null, and parameter removal pageSize=9999enlarges the pagination to retrieve more datainfo→listendpoint transformation to find list interfaces- Empty array
[]→ remove the Token to test authentication bypass - Add
verbose=trueanddebug=1parameters and check whether extra information is returned → Detailed techniques and case studies → references/api-param-tricks.md
Phase 6: Credential Search
- Search the obtained source code/configuration for:
password,secret,api_key,token,mysql:// - Check database connection strings and third-party API keys in the
.envfile - Search for SSH private keys:
/.ssh/id_rsa,/home/*/.ssh/id_rsa - Base64-encoded credentials: decode all Base64 strings and inspect their contents
- Use the credentials immediately once found: log in to the web app, connect over SSH, connect directly to the database
- Search the git history for deleted passwords:
git log -p -S 'password'