maple leaves, autumn, leaves, foliage, autumn leaves, autumn foliage, autumn colors, autumn season, fall foliage, fall leaves, fall colors, nature, maple, red leaves, red foliage, seoul, korea, dobong, seasonal, autumn, autumn, autumn, autumn, autumn, leaves, autumn leaves, korea

ffuf vs Gobuster: Web Directory Brute Forcing on Kali Linux

If you’re weighing up ffuf vs Gobuster for finding hidden directories and files, the short answer is: both are fast, both are in the Kali repos, and both will do the job. ffuf is the more flexible fuzzer, with filters, auto-calibration and recursion built in. Gobuster is simpler, with separate modes for directories, DNS and virtual hosts. This guide runs through each one with real commands so you can pick the right tool for the job.

Only use these tools against systems you own, your own lab, CTF boxes, or targets you have written permission to test. Directory brute forcing sends thousands of requests, and doing that to someone else’s site without permission is illegal in most countries, including under the UK’s Computer Misuse Act.

Installing ffuf, Gobuster and SecLists on Kali

Both tools are packaged in the Kali repos, and so is SecLists, the wordlist collection you’ll use with them:

sudo apt update
sudo apt install ffuf gobuster seclists

SecLists installs to /usr/share/seclists/. A good starting wordlist for web content is /usr/share/seclists/Discovery/Web-Content/common.txt. Move up to the bigger lists in the same folder once you know the target responds sensibly.

Directory brute forcing with ffuf

ffuf works by replacing the FUZZ keyword with each word from your list. You put FUZZ wherever you want to fuzz: the path, a parameter or a header.

ffuf -u http://10.10.10.5/FUZZ -w /usr/share/seclists/Discovery/Web-Content/common.txt

By default ffuf runs 40 threads (-t 40) and matches these status codes: 200-299, 301, 302, 307, 401, 403, 405 and 500. The real power is in its filters, which hide results you don’t care about:

  • -fc: filter by status code, e.g. -fc 403
  • -fs: filter by response size in bytes
  • -fw: filter by word count
  • -fl: filter by line count
  • -ac: auto-calibration, which sends a few junk requests first and filters out whatever the server’s “not found” page looks like

Auto-calibration is the one to remember. Plenty of apps return 200 with a custom error page for every path, which floods your output. -ac deals with that without you working out the size by hand:

ffuf -u http://10.10.10.5/FUZZ -w /usr/share/seclists/Discovery/Web-Content/common.txt -ac

To look for files as well as directories, add extensions with -e:

ffuf -u http://10.10.10.5/FUZZ -w /usr/share/seclists/Discovery/Web-Content/common.txt -e .php,.txt,.bak -ac

Recursion and output in ffuf

ffuf can recurse into directories it finds. The URL has to end in FUZZ for this to work, and -recursion-depth stops it going on forever:

ffuf -u http://10.10.10.5/FUZZ -w /usr/share/seclists/Discovery/Web-Content/common.txt -recursion -recursion-depth 2 -ac

Save results with -o and pick a format with -of (for example json, csv or html):

ffuf -u http://10.10.10.5/FUZZ -w /usr/share/seclists/Discovery/Web-Content/common.txt -ac -o results.json -of json

Directory brute forcing with Gobuster

Gobuster splits its work into modes. You’ll mostly use dir, but there’s also dns, vhost and a general fuzz mode. A basic directory scan looks like this:

gobuster dir -u http://10.10.10.5 -w /usr/share/seclists/Discovery/Web-Content/common.txt

Gobuster defaults to 10 threads, so it’s gentler than ffuf out of the box. Raise it with -t if the target can cope. The dir mode options you’ll use most:

  • -x: file extensions to try, e.g. -x php,txt,bak
  • -b: status codes to hide (defaults to 404)
  • -s: status codes to show instead (clear -b with -b "" if you use this)
  • --exclude-length: hide responses of a given size, which helps with soft-404 pages
  • -k: skip TLS certificate checks, handy for self-signed lab certs
  • -r: follow redirects
  • --delay: wait between requests, e.g. --delay 100ms
gobuster dir -u https://10.10.10.5 -w /usr/share/seclists/Discovery/Web-Content/common.txt -x php,txt -k -t 30

Gobuster has no built-in recursion. If it finds /admin/, you run it again against http://10.10.10.5/admin/ yourself.

Virtual host discovery with both tools

Both can find virtual hosts by fuzzing the Host header. In ffuf you put FUZZ in the header and usually filter by size, because the default site answers every unknown host:

ffuf -u http://10.10.10.5 -H "Host: FUZZ.example.com" -w /usr/share/seclists/Discovery/DNS/subdomains-top1million-5000.txt -ac

Gobuster’s vhost mode does the same job. --append-domain adds the base domain to each word, and -xs excludes status codes:

gobuster vhost -u http://example.com -w /usr/share/seclists/Discovery/DNS/subdomains-top1million-5000.txt --append-domain -xs 400

For proper DNS subdomain hunting rather than vhosts, see my roundup of subdomain brute force and enumeration tools.

ffuf vs Gobuster at a glance

  • Speed: both are written in Go and very quick. ffuf starts at 40 threads, Gobuster at 10.
  • Flexibility: ffuf can fuzz anything (paths, parameters, headers, POST bodies) using FUZZ. Gobuster is built around fixed modes.
  • Filtering: ffuf has filters by status, size, words and lines, plus -ac. Gobuster has -b, -s and --exclude-length.
  • Recursion: ffuf has it built in. Gobuster doesn’t.
  • Ease of use: Gobuster’s mode-based commands are easier to read and remember when you’re starting out.
  • Output: ffuf writes JSON, CSV, HTML and more. Gobuster writes plain text with -o.

Which one should you use?

If you’re new to web testing or just want a quick directory sweep on a CTF box, Gobuster is simple and hard to get wrong. Once you’re dealing with soft-404 pages, parameter fuzzing or apps that need recursion, ffuf is the better tool. Most people end up with both installed and use ffuf by default.

Directory brute forcing works best as one step in a wider workflow. Run Nikto for quick misconfiguration checks, then point the Nuclei vulnerability scanner at anything interesting ffuf or Gobuster turns up.


Leave a Reply