The Gobuster cheat sheet covers directory/file brute-forcing, DNS subdomain enumeration, vhost discovery, and S3 bucket enumeration.
# 1. Dir scan with extensions, skip 404, output to file
gobuster dir -u http://target.com -w /usr/share/seclists/Discovery/Web-Content/raft-large-directories.txt \
-x php,html,txt,bak -b 404 -t 50 -o results.txt
# 2. DNS subdomain bruteforce, show IPs, custom resolver
gobuster dns -d target.com -w /usr/share/seclists/Discovery/DNS/subdomains-top1million-110000.txt \
-i -r 8.8.8.8 -t 50
# 3. VHost enumeration with response-size filter (drop default page)
gobuster vhost -u http://10.10.10.10 -w /usr/share/seclists/Discovery/DNS/subdomains-top1million-5000.txt \
--append-domain -d target.htb --exclude-length 4242 -t 40
# 4. Fuzz GET parameter value through Burp proxy
gobuster fuzz -u "http://target.com/api?id=FUZZ" -w /usr/share/seclists/Fuzzing/1-4_all_letters_a-z.txt \
-b 400,404 --proxy http://127.0.0.1:8080
# 5. Dir scan over HTTPS with client cert bypass + pattern file
gobuster dir -u https://target.com -w common.txt -k \
-p patterns.txt -x php -t 30
| Mode | Target | Primary Use | Required Flags |
|---|---|---|---|
dir |
HTTP/S URL | Directory & file enumeration | -u, -w |
dns |
Domain name | Subdomain discovery via DNS resolution | -d, -w |
vhost |
HTTP/S URL | Virtual host / subdomain on same IP | -u, -w |
fuzz |
HTTP/S URL | Generic fuzzing with FUZZ placeholder |
-u, -w |
s3 |
AWS S3 | Amazon S3 public bucket enumeration | -w |
gcs |
Google Cloud | Google Cloud Storage bucket discovery | -w |
tftp |
TFTP server | File enumeration over TFTP | -s, -w |
# Directory brute-force (most common)
gobuster dir -u http://TARGET -w /usr/share/seclists/Discovery/Web-Content/raft-medium-directories.txt -t 50
# With extensions
gobuster dir -u http://TARGET -w /usr/share/seclists/Discovery/Web-Content/raft-medium-files.txt -x php,txt,bak,conf,log -t 50
# DNS subdomain enumeration
gobuster dns -d TARGET.COM -w /usr/share/seclists/Discovery/DNS/subdomains-top1million-5000.txt -t 50
# VHost discovery
gobuster vhost -u http://TARGET -w /usr/share/seclists/Discovery/DNS/subdomains-top1million-5000.txt --append-domain -t 50
# S3 bucket enumeration
gobuster s3 -w /usr/share/seclists/Discovery/Web-Content/bucket-names.txt
# Fuzz mode (custom parameter fuzzing)
gobuster fuzz -u "http://TARGET/api?id=FUZZ" -w /usr/share/seclists/Fuzzing/fuzz-Bo0oM.txt -t 30
| Flag | Long Form | Default | Description |
|---|---|---|---|
-t |
--threads |
Concurrent goroutines | |
-o |
--output |
- | Write results to file |
-q |
--quiet |
false | Suppress banner |
-z |
--no-progress |
false | Hide progress bar |
-v |
--verbose |
false | Verbose output |
--debug |
false | Debug mode | |
--delay |
0 | Delay between requests (e.g. 500ms, 1s) |
|
--no-error |
false | Suppress error messages | |
--wordlist-offset |
0 | Skip first N wordlist entries |
| Flag | Long Form | Description |
|---|---|---|
-k |
--no-tls-validation |
|
--proxy |
Proxy URL (e.g. http://127.0.0.1:8080) |
|
-a |
--useragent |
Custom User-Agent string |
-H |
--headers |
Add HTTP header (repeatable) |
-c |
--cookies |
Cookie string |
-U |
--username |
Basic auth username |
-P |
--password |
Basic auth password |
--timeout |
HTTP timeout (default: 10s) |
|
--retry |
Retry on timeout | |
--retry-attempts |
Number of retries | |
--client-cert-p12 |
Client TLS cert (PKCS12) | |
--client-cert-p12-password |
Password for PKCS12 cert |
| Flag | Long Form | Default | Description |
|---|---|---|---|
-u |
--url |
- | |
-w |
--wordlist |
- | Wordlist path or - for stdin |
-x |
--extensions |
- | Extensions: php,html,txt,bak |
--extensions-file |
- | Load extensions from file | |
-s |
--status-codes |
200,204,301,302,307,401,403 |
Allowlisted HTTP codes |
-b |
--status-codes-blacklist |
404 |
|
--exclude-length |
- | Exclude by body length (bytes) | |
-l |
--show-length |
false | Print response body length |
-e |
--expanded |
false | Show full URL in output |
--no-status |
false | Hide status codes | |
--hide-length |
false | Hide length column | |
-r |
--follow-redirect |
false | Follow HTTP redirects |
--add-slash |
false | Append / to each word |
|
--discover-backup |
false | ||
-p |
--pattern |
- | Pattern file (see below) |
-m |
--method |
GET |
HTTP method to use |
--force |
false | Continue despite precheck errors |
# Web application extensions
gobuster dir -u http://target.com -w common.txt -x php,php3,php5,phtml
# Backup file discovery (manual)
gobuster dir -u http://target.com -w common.txt -x bak,old,orig,backup,copy,tmp
# Auto-discover backup variants with --discover-backup flag
gobuster dir -u http://target.com -w common.txt -x php --discover-backup
# Config / data files
gobuster dir -u http://target.com -w common.txt -x conf,config,cfg,ini,env,xml,yaml,yml,json
# Java / .NET stack
gobuster dir -u http://target.com -w common.txt -x jsp,jspx,do,action,aspx,asp,ashx
# Multiple purposes in one pass
gobuster dir -u http://target.com -w /usr/share/seclists/Discovery/Web-Content/raft-large-words.txt \
-x php,html,js,txt,xml,json,bak,old,zip -t 50 -b 404,429
# Default - show common positive codes
gobuster dir -u http://target.com -w common.txt
# Shows: 200,204,301,302,307,401,403
# Only 200 OK (strict)
gobuster dir -u http://target.com -w common.txt -s "200"
# Exclude 404 and rate-limit responses
gobuster dir -u http://target.com -w common.txt -b "404,429"
# Exclude by response body length (e.g. default error page is always 1337 bytes)
gobuster dir -u http://target.com -w common.txt --exclude-length 1337
# Exclude multiple lengths
gobuster dir -u http://target.com -w common.txt --exclude-length 1337,0,2048
# Show length to identify baseline noise
gobuster dir -u http://target.com -w common.txt -l
Pattern files let gobuster append strings to each discovered word. The placeholder {GOBUSTER} is replaced with each word from the wordlist, enabling compound path discovery.
# patterns.txt
{GOBUSTER}/admin
{GOBUSTER}/login
{GOBUSTER}/api/v1
{GOBUSTER}.php.bak
{GOBUSTER}~
_{GOBUSTER}
.{GOBUSTER}
# Use pattern file
gobuster dir -u http://target.com -w common.txt -p patterns.txt
# Practical: discover backup files alongside normal discovery
gobuster dir -u http://target.com -w /usr/share/seclists/Discovery/Web-Content/raft-medium-files.txt \
-p patterns.txt -t 40
# Aggressive authenticated scan through Burp
gobuster dir -u http://target.com -w raft-large-directories.txt \
-x php,html,txt -b 404 -t 50 -r \
-H "Authorization: Bearer eyJ..." \
-H "X-Forwarded-For: 127.0.0.1" \
--proxy http://127.0.0.1:8080 \
-o dir-results.txt
# HTTPS with self-signed cert
gobuster dir -u https://192.168.1.1 -w common.txt -k -x php,html
# Slow evasion mode (IDS bypass attempt)
gobuster dir -u http://target.com -w common.txt --delay 200ms -t 5
# Pivot through SOCKS proxy
gobuster dir -u http://internal.corp -w common.txt \
--proxy socks5://127.0.0.1:1080
| Flag | Long Form | Description |
|---|---|---|
-d |
--domain |
|
-w |
--wordlist |
Subdomain wordlist |
-i |
--show-ips |
Show resolved IP addresses |
-r |
--resolver |
Custom DNS server (1.1.1.1 or 1.1.1.1:53) |
--wildcard |
Force continue on wildcard DNS | |
--timeout |
DNS query timeout |
# Basic - quiet with IP resolution
gobuster dns -d target.com -w subdomains-top1million-5000.txt -i -q
# Large list, custom resolver, high threads
gobuster dns -d target.com \
-w /usr/share/seclists/Discovery/DNS/subdomains-top1million-110000.txt \
-r 1.1.1.1:53 -t 100 -i -o dns-results.txt
# Force past wildcard DNS (target returns * for all)
gobuster dns -d target.com -w subdomains.txt --wildcard -i
# Internal domain via internal resolver
gobuster dns -d corp.internal -w subdomains.txt -r 192.168.1.53 -t 30
# With timeout for slow DNS
gobuster dns -d target.com -w subdomains.txt --timeout 5s
# Gobuster auto-detects wildcard DNS at startup
# If wildcard found without --wildcard flag, scan aborts
# Output when wildcard detected:
# [-] Wildcard DNS found. IP address(es): 1.2.3.4
# [!] To force processing of Wildcard DNS, specify the '--wildcard' switch.
# Force scan anyway - compare with known wildcard IPs in post-processing
gobuster dns -d target.com -w subdomains.txt --wildcard -i | \
grep -v "1.2.3.4"
| Flag | Long Form | Description |
|---|---|---|
-u |
--url |
|
-w |
--wordlist |
Vhost names wordlist |
--append-domain |
Append base domain to each word | |
-d |
--domain |
Domain to append (with --append-domain) |
-r |
--follow-redirect |
Follow redirects |
-s |
--status-codes |
Allowlisted status codes |
-b |
--status-codes-blacklist |
|
--exclude-length |
||
-m |
--method |
HTTP method (default: GET) |
# Basic vhost discovery (wordlist contains full vhost names)
gobuster vhost -u http://10.10.10.10 -w vhosts-full.txt
# Auto-append domain: wordlist has "dev", "staging", result is "dev.target.htb"
gobuster vhost -u http://10.10.10.10 \
-w /usr/share/seclists/Discovery/DNS/subdomains-top1million-5000.txt \
--append-domain -d target.htb -t 50
# Filter noise: identify default page length first, then exclude it
# Step 1: note the length of the default response
curl -s http://10.10.10.10 | wc -c # e.g. 4242 bytes
# Step 2: exclude that length to reveal real vhosts
gobuster vhost -u http://10.10.10.10 \
-w /usr/share/seclists/Discovery/DNS/subdomains-top1million-5000.txt \
--append-domain -d target.htb \
--exclude-length 4242 -t 40
# HTTPS vhost (internal lab)
gobuster vhost -u https://192.168.56.10 -k \
-w subdomains.txt --append-domain -d lab.local \
--exclude-length 0,612
DNS mode: Bruteforces DNS resolution. A subdomain is "found" if DNS resolves it.
Result: host.target.com → 1.2.3.4
VHost mode: Bruteforces the HTTP Host header. A vhost is "found" if the server
returns a different response than the default.
Result: Host: dev.target.com → HTTP 200 (not 404)
Use DNS when: subdomains have real DNS records
Use VHost when: multiple apps share one IP (CTF boxes, internal apps)
| Flag | Long Form | Description |
|---|---|---|
-u |
--url |
FUZZ keyword (required) |
-w |
--wordlist |
Payload wordlist |
-d |
--data |
POST body containing FUZZ |
-H |
--headers |
Header string containing FUZZ |
-b |
--status-codes-blacklist |
|
-s |
--status-codes |
Allowlist status codes |
--exclude-length |
Exclude responses of N bytes | |
-m |
--method |
HTTP method (default: GET) |
-r |
--follow-redirect |
Follow redirects |
# Fuzz URL path segment
gobuster fuzz -u "http://target.com/FUZZ" -w common.txt -b 404
# Fuzz GET parameter value
gobuster fuzz -u "http://target.com/api?user=FUZZ" -w usernames.txt -b 404,400
# Fuzz GET parameter key (discover hidden params)
gobuster fuzz -u "http://target.com/api?FUZZ=test" \
-w /usr/share/seclists/Discovery/Web-Content/burp-parameter-names.txt -b 404
# Fuzz POST body
gobuster fuzz -u "http://target.com/login" -m POST \
-d "username=admin&password=FUZZ" \
-w /usr/share/seclists/Passwords/Leaked-Databases/rockyou-75.txt \
-b 401,403 -H "Content-Type: application/x-www-form-urlencoded"
# Fuzz JSON POST body
gobuster fuzz -u "http://target.com/api/auth" -m POST \
-d '{"username":"admin","password":"FUZZ"}' \
-w passwords.txt \
-H "Content-Type: application/json" -b 401
# Fuzz HTTP header value (e.g. Host-based bypass)
gobuster fuzz -u "http://target.com/admin" \
-H "X-Forwarded-For: FUZZ" \
-w /usr/share/seclists/Fuzzing/Integers/Integers-onlythree.txt -b 403
# Fuzz in URL fragment / scheme
gobuster fuzz -u "http://target.com/FUZZ.php" \
-w /usr/share/seclists/Discovery/Web-Content/raft-medium-words-lowercase.txt \
-b 404 -t 40 --exclude-length 0
# Basic S3 bucket discovery
gobuster s3 -w /usr/share/seclists/Discovery/Web-Content/s3-buckets.txt
# Verbose output (shows ACL status for found buckets)
gobuster s3 -w bucket-names.txt -v
# Higher threads
gobuster s3 -w bucket-names.txt -t 50
# Google Cloud Storage bucket enumeration
gobuster gcs -w /usr/share/seclists/Discovery/Web-Content/s3-buckets.txt -t 50
# TFTP file discovery (requires -s for server)
gobuster tftp -s 10.10.10.1 -w /usr/share/seclists/Discovery/Web-Content/raft-small-files.txt
# TFTP with custom timeout
gobuster tftp -s 192.168.1.1 -w filenames.txt --timeout 3s -t 20
| Flag | Applies To | Description |
|---|---|---|
-w |
s3, gcs, tftp | |
-s |
tftp | TFTP server address |
-v |
s3, gcs | Verbose (show ACL / permission info) |
--debug |
s3, gcs | Debug output |
-t |
all | Threads |
Select what you're looking for and the advisor builds the right gobuster command with wordlist recommendations.
| Goal | Mode | Command | When to use |
|---|---|---|---|
| Find files and directories | dir |
gobuster dir -u http://target -w wordlist.txt |
Web server content discovery, CTF recon |
| Find subdomains via DNS | dns |
gobuster dns -d target.com -w subdomains.txt |
Subdomain enumeration when DNS resolves |
| Find virtual hosts on same IP | vhost |
gobuster vhost -u http://IP -w wordlist.txt --append-domain |
Multiple apps on same server, no DNS records |
| Fuzz parameters or paths | fuzz |
gobuster fuzz -u "http://target?id=FUZZ" -w payloads.txt |
Custom fuzzing with FUZZ keyword |
| Find AWS S3 buckets | s3 |
gobuster s3 -w bucket-names.txt |
Cloud recon, public bucket discovery |
| Find GCS buckets | gcs |
gobuster gcs -w bucket-names.txt |
Google Cloud Storage enumeration |
| Enumerate TFTP files | tftp |
gobuster tftp -s 10.10.10.1 -w filenames.txt |
TFTP server file discovery |
# Fast: high thread count (beware WAF/rate limits)
gobuster dir -u http://target.com -w wordlist.txt -t 100
# Throttled: delay between requests (IDS evasion)
gobuster dir -u http://target.com -w wordlist.txt -t 5 --delay 300ms
# Skip first N words (resume aborted scan)
gobuster dir -u http://target.com -w wordlist.txt --wordlist-offset 50000
# Retry on flaky targets
gobuster dir -u http://target.com -w wordlist.txt --retry --retry-attempts 3
# DNS: increase threads for large wordlists
gobuster dns -d target.com -w top1million.txt -t 150
# Bind to specific interface (multi-homed host)
gobuster dir -u http://target.com -w wordlist.txt --interface eth1
| Scenario | Recommended Timeout |
|---|---|
| Fast local network | 3s |
| Standard internet | 10s (default) |
| Slow / unstable target | 30s |
| TFTP | 3s |
| DNS | 5s |
# Skip TLS validation (self-signed cert, lab environment)
gobuster dir -u https://target.com -w wordlist.txt -k
# Use client certificate (mutual TLS)
gobuster dir -u https://target.com -w wordlist.txt \
--client-cert-p12 client.p12 --client-cert-p12-password "secret"
# Custom CA / pinned cert environment - bypass with -k
gobuster vhost -u https://10.10.10.10 -k -w subdomains.txt \
--append-domain -d target.htb --exclude-length 0
# Route through Burp Suite (inspect & replay)
gobuster dir -u http://target.com -w wordlist.txt \
--proxy http://127.0.0.1:8080
# SOCKS5 proxy (pivoting through SSH tunnel)
gobuster dir -u http://internal.corp -w wordlist.txt \
--proxy socks5://127.0.0.1:1080
# DNS over custom resolver (via internal resolver when pivoting)
gobuster dns -d corp.internal -w subdomains.txt -r 10.10.10.1:53
# Write results to file
gobuster dir -u http://target.com -w wordlist.txt -o results.txt
# Quiet mode - output only results (pipeable)
gobuster dir -u http://target.com -w wordlist.txt -q -o results.txt
# Expanded URLs (full path in output)
gobuster dir -u http://target.com -w wordlist.txt -e
# Show response lengths (useful for baseline identification)
gobuster dir -u http://target.com -w wordlist.txt -l
# Suppress noisy error lines
gobuster dir -u http://target.com -w wordlist.txt --no-error
# Filter gobuster dir output for 200 OK only
grep "\(Status: 200\)" results.txt
# Extract just URLs
grep "\(Status: 200\)" results.txt | awk '{print $1}'
# Pipe quiet output to other tools
gobuster dir -u http://target.com -w wordlist.txt -q | tee results.txt | \
grep "(Status: 200)"
# Feed discovered dirs back for recursive enumeration (manual recursion)
gobuster dir -u http://target.com -w wordlist.txt -q | \
awk '{print $1}' | while read path; do
gobuster dir -u "$path" -w wordlist.txt -q -b 404 >> deep-results.txt
done
| Use Case | Wordlist Path | Size |
|---|---|---|
/usr/share/wordlists/dirb/common.txt |
~4k | |
/usr/share/dirbuster/wordlists/directory-list-2.3-medium.txt |
~220k | |
| General files (raft) | /usr/share/seclists/Discovery/Web-Content/raft-large-files.txt |
~37k |
| General dirs (raft) | /usr/share/seclists/Discovery/Web-Content/raft-large-directories.txt |
~73k |
/usr/share/seclists/Discovery/Web-Content/raft-large-words.txt |
~119k | |
| API endpoints | /usr/share/seclists/Discovery/Web-Content/api/api-endpoints.txt |
~1k |
| Backup / sensitive | /usr/share/seclists/Discovery/Web-Content/quickhits.txt |
~2.5k |
| Subdomains 5k | /usr/share/seclists/Discovery/DNS/subdomains-top1million-5000.txt |
5k |
/usr/share/seclists/Discovery/DNS/subdomains-top1million-20000.txt |
20k | |
| Subdomains 110k | /usr/share/seclists/Discovery/DNS/subdomains-top1million-110000.txt |
110k |
| DNS deep | /usr/share/seclists/Discovery/DNS/dns-Jhaddix.txt |
~1.9M |
| Bitquark subdomains | /usr/share/seclists/Discovery/DNS/bitquark-subdomains-top100000.txt |
100k |
| VHosts | /usr/share/seclists/Discovery/DNS/subdomains-top1million-5000.txt |
5k |
| S3 / GCS buckets | /usr/share/seclists/Discovery/Web-Content/s3-buckets.txt |
~8k |
| CGI scripts | /usr/share/seclists/Discovery/Web-Content/CGIs.txt |
~3.5k |
| HTTP params | /usr/share/seclists/Discovery/Web-Content/burp-parameter-names.txt |
~6k |
gobuster dir -u http://box.htb -w common.txt -x php,txt,html -b 404/etc/hosts, note the hostnamegobuster vhost -u http://box.htb -w subdomains-5k.txt --append-domain --exclude-length <default>gobuster fuzz -u "http://box.htb/api?id=FUZZ" -w numbers.txt -b 404--discover-backupgobuster dns -d client.com -w subdomains-110k.txt -i -r 8.8.8.8 -t 100gobuster dir -u https://host -w raft-large-words.txt -x php,aspx,jsp -k -b 404gobuster s3 -w company-name-variants.txt| Feature | |||
|---|---|---|---|
| Language | Go | Go | Rust |
| Recursive scanning | Limited (-recursion) |
||
| Multiple wordlists | No | No | |
| FUZZ in URL/header/body | fuzz mode only | No | |
| Filter by size | --exclude-length |
-fs |
-S |
| Filter by words/lines | No | -fw, -fl |
No |
| Filter by regex | No | -fr |
No |
| Interactive pause/adjust | No | Yes | |
| Auto-tune / auto-bail | No | No | |
| Rate limiting detection | No | No | |
| DNS enumeration | No | No | |
| VHost enumeration | Headers only | No | |
| S3 / GCS / TFTP modes | No | No | |
| Output formats | txt | json, html, csv, md | txt, json |
| Config file | No | Yes | |
| Best for |
| Situation | Best Tool |
|---|---|
| Quick dir/file brute-force | |
| DNS subdomain enumeration | |
| VHost / virtual host discovery | |
| S3 / GCS bucket discovery | |
| Deep recursive crawl (many dirs) | |
| Fuzz multiple parameters simultaneously | |
| Filter by response word/line count | |
| Auto-tune against WAF / rate-limiting | |
| Need JSON/HTML/CSV output | |
| Simple, fast, scriptable output |
# Go install (recommended, latest)
go install github.com/OJ/gobuster/v3@latest
# Kali / Debian
apt install gobuster
# Docker
docker pull ghcr.io/oj/gobuster:latest
docker run --rm ghcr.io/oj/gobuster:latest dir --help
# Build from source
git clone https://github.com/OJ/gobuster.git
cd gobuster && go build .
# Check version
gobuster version
# List all modes
gobuster --help
# Mode-specific help
gobuster dir --help
gobuster dns --help
gobuster vhost --help
gobuster fuzz --help
gobuster s3 --help
gobuster gcs --help
gobuster tftp --help