Directory fuzzing

Theory

While Crawling allows testers to build the indexed architecture of website, this technique can't find directories and files that are not referenced. Directory fuzzing (a.k.a. directory bruteforcing) is a technique that can find some of those "hidden" paths. Dictionaries of common paths are used to request the web app for each path until exhaustion of the list.

Practice

Tools like dirb (C), dirbuster (Java), gobuster (Go), wfuzz (Python) and ffuf (Go) can do directory fuzzing/bruteforcing. Burp Suite can do it too. Depending on the web application, one will be better suited than another and additional options will be needed.
Directory fuzzing needs to be slowed down when testing production instances as it could lead to an unintended denial of service.
1
gobuster dir --useragent "PENTEST" -w /usr/share/seclists/Discovery/Web-Content/common.txt -u $URL
Copied!
1
wfuzz --hc 404,403 -H "User-Agent: PENTEST" -c -z file,/usr/share/seclists/Discovery/Web-Content/common.txt $URL/FUZZ
Copied!
1
ffuf -H "User-Agent: PENTEST" -c -w /usr/share/seclists/Discovery/Web-Content/common.txt -u $URL/FUZZ
Copied!
Another great tool named feroxbuster (Rust) can do really fast recursive content discovery. The tools mentioned above don't recurse in found directories.
1
feroxbuster -H "User-Agent: PENTEST" -w /usr/share/seclists/Discovery/Web-Content/common.txt -u http://192.168.10.10/
Copied!
In order to fuzz more accurately, there are many dictionaries adapted for many situations. The ultimate combo is ffuf + fzf + seclists.
In the following command, fzf is used to print a file fuzzer prompt allowing the user to quickly choose the perfect wordlist for content discovery.
1
feroxbuster -H "User-Agent: PENTEST" -w `fzf-wordlists` -u http://192.168.10.10/
Copied!
In this case, fzf-wordlists is an alias to the following command using fzf and find to fuzz wordlists from specific directories.
1
find /usr/share/seclists /usr/share/wordlists /usr/share/dirbuster /usr/share/wfuzz /usr/share/dirb -type f | fzf
Copied!
Last modified 6mo ago
Copy link