Skip to content
Pwnversity
RECON-CONTENTintermediate · 6 min · upd. 2026-11

Content Discovery

T1595.003

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.

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.

Ventana de terminal
ffuf -w wordlist.txt -u https://target/FUZZ -mc 200,301,302,403 -o out.json
feroxbuster -u https://target -w wordlist.txt -x php,bak,zip,old,txt # recursive
gobuster dir -u https://target -w wordlist.txt -x php,html,bak

When 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.

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):

Ventana de terminal
curl -s https://target/.git/HEAD
Ventana de terminal
curl -s https://target/.git/HEAD # "ref: refs/heads/main" → exposed
git-dumper https://target/.git/ loot/ && cd loot
git 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 history
git 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
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

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 to GET).
  • 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: /admin when 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.

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:
Ventana de terminal
cewl https://target -w custom.txt

Not everything is brute force; the site already reveals paths you can collect:

Ventana de terminal
katana -u https://target -jc # crawling + JS extraction
gau target.com | sort -u # historical URLs (see recon-wayback)
curl -s https://target/robots.txt https://target/sitemap.xml

robots.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:

Ventana de terminal
ffuf -w api-wordlist.txt -u https://target/api/FUZZ
  • 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 miss backup.zip or config.php.bak.
  • Fuzzing without rate control and getting blocked or taking down a fragile staging environment.

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.

  • 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.txt and sitemap.xml reviewed.
  • Endpoints extracted from JS (katana / linkfinder).
  • Historical URLs (gau / waymore).
  • API documentation and paths (swagger / graphql).
  • .git history reviewed if exposed.
  • 403s tried with methods, path variants and headers.