the_open_door
coffee
ESEN
← Back to index

Web Content Discovery (Directory Fuzzing)

Full command arsenal in the cheatsheet

A web server only shows what someone chose to link. The admin panel, the forgotten backup.zip, the .git/ deployed by mistake or the leftover db.php are still there and still answering, but no link leads to them. Not being linked is not the same as not existing, so once you have looked at the landing page the next step is to ask for paths blindly: thousands of requests with names from a wordlist, watching which ones answer differently from the ones that do not exist.

# gobuster: fast, with extensions matching the detected technology
gobuster dir -u http://10.10.10.10 -w /usr/share/seclists/Discovery/Web-Content/directory-list-2.3-medium.txt \
  -x php,txt,bak,zip -t 50

# dirsearch: similar, filtering out the status codes that add nothing
dirsearch -u http://10.10.10.10 -e php,html -x 403,404

# ffuf / wfuzz: the FUZZ keyword marks where the wordlist goes, so they work
# for paths, parameters, headers or POST fields
ffuf -u http://10.10.10.10/FUZZ -w raft-medium-directories.txt -fs 4242
wfuzz -u 'http://10.10.10.10/index.php?FUZZ=id' -w burp-parameter-names.txt --hh=275

What each flag does (and why).

Reading the output. The status code says more than "found or not": a 200 is content being served; a 301/302 is usually a directory redirecting to its trailing-slash version, or a protected resource bouncing you to the login; a 401/403 is just as valuable a finding, because it means it exists but I am not allowed in, and that marks where it is worth pushing (default credentials, bypassing the restriction, another path that reaches the same place).

Why it matters. Almost every chain that starts on the web goes through here: the login panel that yields credentials, the upload directory where the webshell later lands, the .git/ leaking the source code or the config file with the database password all show up at this step and not at another. When a web target "has no vector", usually it does have one and the wordlist or the extensions were simply the wrong ones.

How to detect it. Fuzzing is among the loudest things in the access log: hundreds or thousands of requests from a single IP in a few seconds, most of them 404 (or the size of the "not found" page), walking dictionary names no user would type. The gobuster/ffuf/dirsearch User-Agent and requests to sensitive paths (/.git/, .bak, /admin) confirm it; a WAF or a per-source rate-limit alerts on and throttles it. A spike of 403/401 also gives away that protected paths are being probed.

Defence. Disable directory listing, return a consistent 404 (same code and same size for everything that does not exist, so there is nothing to filter on), keep backups and repositories out of the docroot, and protect panels with authentication rather than with a hard-to-guess path.

ToolsgobusterdirsearchwfuzzffufferoxbusterNiktowafw00fdirbJoomScanEyeWitnessAquatoneFinalReconOWASP ZAP

Machines where it's used