Content Discovery
A website shows only what it wants you to see; content discovery finds what it doesn’t link: hidden directories, admin panels, backup files, API endpoints, old versions, .git/, config files. It’s active enumeration over HTTP: you try dictionary paths against the server and watch what responds. What isn’t linked is usually the most interesting.
The principle: classify by response code
Section titled “The principle: classify by response code”You request candidate paths (/admin, /backup.zip, /api/v1) and classify by the HTTP status code:
- 200 — exists and is accessible.
- 301/302 — redirects (follow the chain; sometimes to a login).
- 403 — forbidden. Often a sign the resource exists, but not proof: many servers and WAFs return 403 for made-up paths too.
- 404 — doesn’t exist.
A 403 can hint at a hidden resource, but always compare it against a random nonexistent path: if that also returns 403, the code doesn’t distinguish and you’ll get false positives.
Directory and file fuzzing
Section titled “Directory and file fuzzing”ffuf -w wordlist.txt -u https://target/FUZZ -mc 200,301,302,403 -o out.jsonferoxbuster -u https://target -w wordlist.txt -x php,bak,zip,old,txt # recursivegobuster dir -u https://target -w wordlist.txt -x php,html,bakWhen the server returns 200 for non-existent paths (soft-404), filter by size or word count to remove that noise: -fs <size> or -fw <words> in ffuf. Measure that baseline first with a made-up path; the full strategy is in ffuf and gobuster.
Juicy extensions and files
Section titled “Juicy extensions and files”Backups and sources that shouldn’t be in the webroot: .bak, .old, .zip, .tar.gz, .sql, .swp, index.php~, config.php.bak.
Exposed version control and configuration: /.git/, /.svn/, /.env, /.htaccess, /web.config, /wp-config.php.bak.
If you find an accessible .git/, the full source code can be reconstructed (see Exposed .git):
curl -s https://target/.git/HEADAn exposed .git, step by step
Section titled “An exposed .git, step by step”curl -s https://target/.git/HEAD # "ref: refs/heads/main" → exposedgit-dumper https://target/.git/ loot/ && cd lootgit log --oneline --all; git branch -a # history and branches (staging, testing)git log -p --all | grep -inE 'pass|secret|token|api[_-]?key' # what was deleted is still in historygit show <hash>History keeps what was removed later: credentials, keys and configuration files the developer “took out” in a later commit.
| File | What it usually contains |
|---|---|
.env |
Database credentials, API keys, Laravel’s APP_KEY |
config.php.bak, wp-config.php.bak, web.config.old |
Configuration with credentials, served as text because it no longer has an executable extension |
*.sql, backup.zip, site.tar.gz |
Database or full code dumps |
.DS_Store |
A directory’s file listing (macOS) |
.swp, ~ |
Editor temporary copies with the source code |
High-value endpoints
Section titled “High-value endpoints”| Category | Paths to try |
|---|---|
| Authentication and panels | /admin, /login, /dashboard, /panel, /manager/html |
| APIs and documentation | /api, /api/v1, /swagger.json, /openapi.json, /api-docs, /graphql |
| Environments and leftovers | /dev, /test, /staging, /old, /backup, /tmp |
| Configuration and debugging | /server-status, /actuator, /phpinfo.php, /console, /.git/, /.env |
Facing a 403
Section titled “Facing a 403”A 403 usually suggests something is there, but doesn’t prove it: a proxy or rule may return 403 for any path. Compare it with a made-up path first; if the response differs, before discarding it try:
- Other methods:
POST,PUT,OPTIONS,HEAD(the check may apply only toGET). - Path variants:
/admin/,/Admin,/admin/.,//admin,/admin;/,/%2fadmin(normalisation differences between proxy and application). - Headers:
X-Forwarded-For: 127.0.0.1,X-Original-URL: /admin,X-Rewrite-URL: /adminwhen there’s a proxy in front. - Another vhost: the same resource may be unprotected under a different host name.
How to automate this with ffuf is in ffuf and gobuster.
Wordlists: the key to results
Section titled “Wordlists: the key to results”The result depends more on the dictionary than on the tool:
- SecLists →
Discovery/Web-Content/(raft-*,directory-list-*,common.txt). - Technology-specific (if you already fingerprinted):
Discovery/Web-Content/CMS/. - Generated from the site itself with
cewl, which pulls words from the page as a dictionary:
cewl https://target -w custom.txtPaths from the site itself
Section titled “Paths from the site itself”Not everything is brute force; the site already reveals paths you can collect:
katana -u https://target -jc # crawling + JS extractiongau target.com | sort -u # historical URLs (see recon-wayback)curl -s https://target/robots.txt https://target/sitemap.xmlrobots.txt and sitemap.xml often reveal paths the organization “didn’t want” indexed. Historical URLs are covered in Historical Archives (Wayback).
API documentation is often left exposed (/swagger.json, /openapi.json, /api-docs, /graphql) and is a direct map of endpoints. You can also fuzz API paths with a specific dictionary:
ffuf -w api-wordlist.txt -u https://target/api/FUZZCommon mistakes
Section titled “Common mistakes”- Not filtering the soft-404: the output fills with false 200s and nothing stands out.
- Using a generic dictionary when you already know the stack (wasting the specific wordlists).
- Forgetting extensions (
-x): you missbackup.ziporconfig.php.bak. - Fuzzing without rate control and getting blocked or taking down a fragile staging environment.
Defensive note
Section titled “Defensive note”Reduce findings: don’t leave backups or configs in the webroot, block access to .git/, .env, and .svn, remove old panels and versions, and return consistent 404s (don’t leak existence via 403 or response timing). Watch logs for bursts of 404/403 (a fuzzing signature) and use a WAF with rate-limiting to slow mass brute force.
Testing checklist
Section titled “Testing checklist”- Directory fuzzing with a good wordlist (SecLists).
- File fuzzing by extension (bak, zip, sql, env, old).
- Filter soft-404 by size/words.
- Exposed
.git/,.env,.svn, and configs. -
robots.txtandsitemap.xmlreviewed. - Endpoints extracted from JS (katana / linkfinder).
- Historical URLs (gau / waymore).
- API documentation and paths (swagger / graphql).
-
.githistory reviewed if exposed. - 403s tried with methods, path variants and headers.