AI prompt · Web pentesting
API test plan prompt
Prompt that builds an API test plan from an OpenAPI excerpt: endpoints by risk, authorisation matrix and tests per OWASP API Top 10 category.
Published
Cheatsheet · Web pentesting
ffuf commands for web content discovery: directories, extensions, virtual hosts, parameters, filters, rate limiting, recursion and output.
Official website: ffuf
ffuf replaces the FUZZ keyword (or a keyword of your choice) with each entry of a wordlist, then analyses the response. It is used to find directories, forgotten files, virtual hosts and undocumented parameters. Replace https://target.example with a target inside your authorised scope, agreed beforehand using the penetration test scoping checklist. To find the exposed web services first, see the Nmap cheatsheet.
# Directories and files at the site root
ffuf -u https://target.example/FUZZ -w /path/wordlist.txt
# Add extensions (each one is tried in addition to the bare word)
ffuf -u https://target.example/FUZZ -w /path/wordlist.txt -e .php,.bak,.old,.txt
# Ignore comment lines in the wordlist
ffuf -u https://target.example/FUZZ -w /path/wordlist.txt -ic
# Add a header (session cookie, token) and change the method
ffuf -u https://target.example/FUZZ -w /path/wordlist.txt \
-H "Cookie: session=VALUE" -X POST
Pick the wordlist according to the technology you have observed (CMS, framework, language) rather than a huge generic list: results are more relevant and the request volume stays reasonable.
Without filters, an application that answers 200 to everything buries the results. Observe the default behaviour first, then filter on what never varies.
# Automatic filter calibration
ffuf -u https://target.example/FUZZ -w /path/wordlist.txt -ac
# Keep only certain HTTP status codes (all = every code)
ffuf -u https://target.example/FUZZ -w /path/wordlist.txt -mc 200,204,301,302,401,403
# Exclude by status, size, word count or line count
ffuf -u https://target.example/FUZZ -w /path/wordlist.txt -fc 404
ffuf -u https://target.example/FUZZ -w /path/wordlist.txt -fs 4242
ffuf -u https://target.example/FUZZ -w /path/wordlist.txt -fw 18
ffuf -u https://target.example/FUZZ -w /path/wordlist.txt -fl 7
# Filter or keep according to a regular expression in the response
ffuf -u https://target.example/FUZZ -w /path/wordlist.txt -fr "Page not found"
| Option | Purpose |
|---|---|
-mc, -fc |
match or filter HTTP status codes |
-ms, -fs |
match or filter a response size |
-mw, -fw |
match or filter a word count |
-ml, -fl |
match or filter a line count |
-mr, -fr |
match or filter with a regular expression |
-ac |
automatic filter calibration |
-ac is convenient but can hide a legitimate result: always check a few responses by hand.
Several sites can share one IP address. Vary the Host header while the URL keeps pointing at the IP.
# First measure the response size for a non-existent host, then filter it out
ffuf -u http://10.0.0.12/ -H "Host: FUZZ.target.example" \
-w /path/subdomains.txt -fs 1234
Replace 1234 with the size observed for a non-existent host. For HTTPS, use the URL https://10.0.0.12/: the certificate will not match, which is expected here.
# GET parameter names
ffuf -u "https://target.example/page.php?FUZZ=test" -w /path/parameters.txt -fs 1234
# Values of a known parameter (numeric identifiers, for example)
ffuf -u "https://target.example/page.php?id=FUZZ" -w /path/numbers.txt -fc 404
# Parameter names in a POST body
ffuf -u https://target.example/page.php -X POST -d "FUZZ=test" \
-H "Content-Type: application/x-www-form-urlencoded" -w /path/parameters.txt -fs 1234
# Two wordlists with distinct keywords
ffuf -u https://target.example/INDEX/FILE -w folders.txt:INDEX -w files.txt:FILE
With several wordlists, -mode clusterbomb (the default) tries every combination, while -mode pitchfork pairs lines one to one. The request count of clusterbomb grows very quickly: work it out before launching.
# Number of threads (40 by default)
ffuf -u https://target.example/FUZZ -w /path/wordlist.txt -t 10
# Cap the number of requests per second
ffuf -u https://target.example/FUZZ -w /path/wordlist.txt -rate 20
# Delay between requests (in seconds, or a random range)
ffuf -u https://target.example/FUZZ -w /path/wordlist.txt -p 0.5
ffuf -u https://target.example/FUZZ -w /path/wordlist.txt -p "0.1-0.8"
# Maximum running time, in seconds
ffuf -u https://target.example/FUZZ -w /path/wordlist.txt -maxtime 600
On a production site, start with a moderate rate (-rate) and agree it with the client. Aggressive fuzzing can overwhelm a fragile application, trigger blocking, or lock accounts if forms are reached.
# Automatically rerun inside each directory found
ffuf -u https://target.example/FUZZ -w /path/wordlist.txt \
-recursion -recursion-depth 2 -e .php
# Greedy strategy: also recurse on the files found
ffuf -u https://target.example/FUZZ -w /path/wordlist.txt \
-recursion -recursion-depth 1 -recursion-strategy greedy
Recursion multiplies the number of requests at every level. Limit -recursion-depth and combine it with -rate and -maxtime.
# A specific format: json, ejson, html, md, csv, ecsv
ffuf -u https://target.example/FUZZ -w /path/wordlist.txt -o results.json -of json
# Every format at once (the name is used as a prefix)
ffuf -u https://target.example/FUZZ -w /path/wordlist.txt -o results -of all
# Quiet output for scripts, or verbose output to understand a request
ffuf -u https://target.example/FUZZ -w /path/wordlist.txt -s
ffuf -u https://target.example/FUZZ -w /path/wordlist.txt -v
# Send the requests through an intercepting proxy
ffuf -u https://target.example/FUZZ -w /path/wordlist.txt -x http://127.0.0.1:8080
Keep the JSON or HTML output: it documents, with the exact parameters, what was tested and what was found.
| Need | Command |
|---|---|
| Careful first pass | ffuf -u https://target.example/FUZZ -w list.txt -ac -rate 20 -o root.json -of json |
| Backup files | ffuf -u https://target.example/FUZZ -w list.txt -e .bak,.old,.zip,.orig -mc 200 |
| Virtual hosts of an IP | ffuf -u http://10.0.0.12/ -H "Host: FUZZ.target.example" -w subdomains.txt -fs 1234 |
| Parameters of a page | ffuf -u "https://target.example/p.php?FUZZ=1" -w parameters.txt -fs 1234 |
| Authenticated area | ffuf -u https://target.example/app/FUZZ -w list.txt -H "Cookie: session=VALUE" -fc 404 |
AI prompt · Web pentesting
Prompt that builds an API test plan from an OpenAPI excerpt: endpoints by risk, authorisation matrix and tests per OWASP API Top 10 category.
Published
Cheatsheet · Web pentesting
Burp Suite for an authorised web test: proxy and CA certificate, scope, HTTP history, Repeater, careful Intruder use, Decoder and evidence export.
Published
AI prompt · Web pentesting · Infrastructure and AD pentesting
Prompt that drafts the urgent client notification when a critical vulnerability is found during testing: facts, impact and immediate containment advice.
Published
BEAROPS
BEAROPS experts test your applications, infrastructure and cloud, black box or grey box, following OWASP, NIST and ANSSI guidance.