Content discovery is the bread-and-butter use of ffuf: find directories, hidden files, and backup artifacts the application doesn’t link to. Technique matters less than wordlist choice and output discipline.

Directory Fuzzing

ffuf -w /opt/useful/seclists/Discovery/Web-Content/directory-list-2.3-small.txt:FUZZ \
     -u http://target.htb/FUZZ

Place FUZZ where a path segment would go. For nested discovery, add it deeper:

ffuf -w common.txt:FUZZ -u http://target.htb/admin/FUZZ

Wordlist Choice

Pick by scope, not by instinct. Start small, escalate only if you find signs of hidden content.

Discovery/Web-Content/common.txt                      ~ 4,700 entries — fast first pass
Discovery/Web-Content/raft-small-words.txt            ~ 36k   — broader, still fast
Discovery/Web-Content/raft-small-directories.txt      — directory names only
Discovery/Web-Content/raft-small-files.txt            — file names only
Discovery/Web-Content/directory-list-2.3-small.txt    ~ 87k  — DirBuster list
Discovery/Web-Content/directory-list-2.3-medium.txt   ~ 220k — thorough
Discovery/Web-Content/big.txt                         — curated, less noisy than raw dirbuster

raft lists are underrated

The raft-* lists are frequency-sorted from real-world crawls. They find things common.txt misses and finish in a fraction of the time of the medium DirBuster list.

Extension Fuzzing with -e

Rather than running the wordlist seven times for seven extensions, append them in one pass:

ffuf -w /opt/useful/seclists/Discovery/Web-Content/common.txt:FUZZ \
     -u http://target.htb/FUZZ \
     -e .php,.html,.txt,.bak,.old,.zip,.conf

For every word in the list, ffuf requests word, word.php, word.html, etc. Match extensions to the stack:

  • PHP: .php, .phtml, .php5, .php7, .phar, .inc, .bak
  • ASP.NET: .aspx, .asp, .ashx, .asmx, .config
  • Java: .jsp, .jspx, .do, .action, .war
  • Static/backup: .html, .htm, .txt, .bak, .old, .orig, .swp, .zip, .tar.gz, .git, .env

Extension-Only Fuzzing

When you know a page name and want to find the extension handler, flip the pattern — put FUZZ after the base name:

cat extensions.txt
.php
.php5
.phtml
.bak
 
ffuf -w extensions.txt:FUZZ -u http://target.htb/indexFUZZ

Ffuf will try /index.php, /index.php5, /index.phtml, /index.bak.

Page / File Name Fuzzing

Fix the extension, fuzz the base name:

ffuf -w raft-small-words.txt:FUZZ \
     -u http://target.htb/admin/FUZZ.php

Combine with the -e form above when you don’t know the extension.

Recursive Fuzzing

Manually re-running ffuf on every discovered directory is a waste. Let it recurse:

ffuf -w /opt/useful/seclists/Discovery/Web-Content/raft-small-words.txt:FUZZ \
     -u http://target.htb/FUZZ \
     -recursion \
     -recursion-depth 2 \
     -e .php \
     -v
  • -recursion — enables descent into any directory ffuf finds (status 301/302 responses with trailing /, or anything matching a directory pattern)
  • -recursion-depth N — caps how deep ffuf will go. 2–3 is usually enough; unbounded recursion on a medium wordlist can run for days
  • -v — prints full URLs so you can see which depth each hit came from

Recursion multiplies your request count fast

A 36k wordlist recursing 2 levels with 5 discovered directories is already 36k × (1 + 5 + 25) = ~1.1M requests. Pick small lists for recursive runs and tighten with filters.

Status Code Tuning

Default matchers (200,204,301,302,307,401,403) are a good starting point, but tune them to the target:

  • 401 and 403 — keep them. These are protected resources you might attack or bypass later
  • 405 Method Not Allowed — often reveals that the path exists but doesn’t accept GET
  • 500 — the application errored on your input; the endpoint is real and reacted to you
  • 301/302 — follow the Location; redirects to /login.php often reveal real app paths

To match broader:

ffuf -w common.txt:FUZZ -u http://target.htb/FUZZ -mc 200,204,301,302,307,401,403,405,500

To filter noise you’ve already seen:

ffuf -w common.txt:FUZZ -u http://target.htb/FUZZ -fc 403 -fs 1256

Handling Rate Limiting

If the app starts dropping connections or returning 429s partway through:

ffuf -w common.txt:FUZZ -u http://target.htb/FUZZ -t 10 -p 0.1-0.3
  • -t 10 — lowers threads
  • -p 0.1-0.3 — randomized delay between 100ms and 300ms

Or cap by rate:

ffuf -w common.txt:FUZZ -u http://target.htb/FUZZ -rate 20

Don't forget backups

After directory discovery, re-run the top hits with backup extensions appended: index.php.bak, config.old, database.sql.zip. These are regularly left behind by sysadmins and contain credentials, source code, or full database dumps.