This article is a comprehensive tutorial on Gobuster, a Go-based brute-forcing tool used in web application security assessments to discover hidden directories, files, subdomains, and virtual hosts that are not publicly linked or documented. The article explains how Gobuster works, its three primary modes (dir, dns, vhost), proper wordlist selection, and practical command syntax for different scenarios. This matters because hidden endpoints—admin panels, backup files, API paths, configuration files—often contain critical vulnerabilities that cannot be found through standard web crawling or reconnaissance.
- Why hidden content matters in securityEvery web server contains unlinked pages where sensitive assets live: admin panels left from development, forgotten backup files, undocumented API endpoints, accidentally exposed configuration files, and version control folders revealing entire codebases. These do not appear in sitemaps or search engine results, making direct enumeration the only discovery method. The article emphasizes that in real penetration tests, critical findings—backup files with database credentials, admin panels with default authentication, exposed .git directories—come from paths Gobuster discovers, not from active e
- Gobuster architecture and speed advantageGobuster is written in Go and leverages native concurrency to fire multiple HTTP requests simultaneously, making it significantly faster than older Python-based tools like DirBuster or dirb. A 220,000-word wordlist scan that took 45 minutes in DirBuster completes in under 5 minutes with Gobuster, using a default of 10+ configurable threads. This speed advantage matters in time-limited engagements where rapid enumeration is critical.
- Three primary modes and their functionsDir mode performs directory and file enumeration by sending GET requests for every wordlist entry appended to a base URL and reports non-404 responses—the most commonly used mode for web application assessment. DNS mode performs subdomain enumeration by resolving WORD.target.com for each wordlist entry and reporting which subdomains exist. Vhost mode brute-forces the HTTP Host header to discover virtual hosts on a single IP serving multiple applications, useful when subdomains are not DNS-resolvable.
- Wordlist selection strategy and timingThe article provides a hierarchical wordlist strategy: start with dirb/common.txt (4,614 words, ~5 seconds) for every engagement as a quick first pass; escalate to SecLists directory-list-2.3-medium.txt (220,000 words, 3–8 minutes) for thorough scans if initial results warrant investigation; use CMS-specific wordlists when technology stack is known. For DNS subdomain enumeration, use subdomains-top1million-5000.txt rather than directory wordlists. This tiered approach balances speed with coverage based on engagement phase.
- File extension discovery and high-value findingsThe -x flag appends file extensions to every wordlist entry, transforming directory scans into file discovery scans. The article demonstrates this with critical extensions: .php (source files, login pages), .bak (backup files like config.php.bak), .sql (database dumps), .zip (archives), .conf (configuration files), .log (log files exposing paths/users), .txt (robots.txt, credentials.txt). The article describes this technique as finding 'some of the highest-value findings in web application testing' because it discovers files that exist but are never linked.
- Status code filtering and false positive handlingSome web servers return 200 for every path by serving custom 'page not found' pages, creating thousands of false positives. Gobuster filters using -s to include specific status codes (200, 204, 301, 302, 307, 401, 403) or --exclude-length to exclude responses of a specific byte size. The article emphasizes that 403 Forbidden responses are not dead ends—they indicate the path exists but access is blocked, and may be bypassable with header manipulation like X-Original-URL or X-Forwarded-For injection.
- Gobuster versus ffuf comparisonGobuster offers simpler, mode-based commands (dir/dns/vhost) and is best for straightforward directory, subdomain, and vhost discovery where the wordlist is applied to the URL path only. ffuf is more flexible, allowing the FUZZ keyword to appear anywhere in the URL, headers, POST body, or cookies, with finer-grained filtering options (status, size, words, lines, regex). The article recommends Gobuster for discovery tasks and ffuf for complex parameter fuzzing and filter bypassing scenarios.
- Practical engagement workflow and authorizationThe article outlines a five-step real pentest workflow: run common.txt first (5 seconds) to identify technology; switch to targeted CMS wordlist if technology is identified; run 220K medium list with extensions in background; recursively scan interesting directories (e.g., /admin may contain /admin/upload, /admin/config); investigate and document every non-404 response. Critical legal warning: Gobuster sends high-volume HTTP requests visible in logs and triggers IDS/WAF alerts, making it illegal to run against unauthorized systems. It should only run against personal labs, TryHackMe, HackTheBo
Bottom line: Gobuster is a systematic, not sophisticated tool that discovers security-critical hidden content—admin panels, backup files, APIs, configuration files—by brute-forcing web paths that are intentionally unlinked and undocumented; proper execution requires careful wordlist selection strategy, status code filtering to reduce false positives, appropriate threading to avoid overwhelming target systems, and strict authorization before execution against any target.
Day 180 — Advanced Kali Mastery
Need a lab? → Ethical Hacking Lab Setup at Home · DVWA Labs Hub
What Is Gobuster and How Does It Work?
Gobuster is a brute-forcing tool written in Go, built specifically for enumerating hidden content on web servers and in DNS. It works by taking a wordlist and sending one HTTP request (or DNS query) per word — appending each word to the target URL and recording which paths return a response that is not a 404. Unlike a web crawler, which follows links, Gobuster discovers content that is intentionally not linked.
(dir, dns, vhost)
fast + concurrent
(configurable)
on Kali Linux
Gobuster’s speed advantage over older tools like DirBuster or dirb comes from Go’s native concurrency — it fires multiple HTTP requests simultaneously, making a 220,000-word scan that took 45 minutes in DirBuster complete in under 5 minutes. This matters in time-limited engagements.
Installation & Verification
gobuster –version
gobuster v3.6.0
# If not installed:
sudo apt install gobuster -y
# Install SecLists (best wordlist collection — do this once):
sudo apt install seclists -y
# Installs to /usr/share/seclists/ — hundreds of categorised wordlists
# View Gobuster modes:
gobuster –help
Available Commands:
dir Uses directory/file enumeration mode
dns Uses DNS subdomain enumeration mode
fuzz Uses fuzzing mode
vhost Uses virtual host brute-forcing mode
Wordlists — Which to Use and When
The wordlist determines what Gobuster looks for. A small wordlist means faster scans but more missed content. A large wordlist finds more but takes longer. The right choice depends on the phase of the engagement and what you already know about the target’s technology stack.
/usr/share/wordlists/dirb/common.txt # 4.6K — start here
/usr/share/wordlists/dirb/big.txt # 20K — next step up
/usr/share/seclists/Discovery/Web-Content/directory-list-2.3-medium.txt # 220K
/usr/share/seclists/Discovery/Web-Content/directory-list-2.3-small.txt # 87K
/usr/share/seclists/Discovery/DNS/subdomains-top1million-5000.txt # DNS
/usr/share/seclists/Discovery/Web-Content/CMS/wordpress.txt # WP
dir Mode — Directory & File Discovery
gobuster dir is the mode you will use in almost every web application assessment. It sends GET requests for every word in your wordlist appended to the base URL and reports everything that returns a non-404 response.
gobuster dir -u http://target.com -w /usr/share/wordlists/dirb/common.txt
# ─── Against DVWA in your home lab ────────────────────────────────
gobuster dir \
-u http://192.168.56.101/dvwa/ \
-w /usr/share/wordlists/dirb/common.txt \
-t 50 \ # 50 threads — fast on local lab
-v \ # verbose — show all attempts
-o dvwa_dirs.txt # save output
# ─── HTTPS target ─────────────────────────────────────────────────
gobuster dir -u https://target.com -w wordlist.txt -k
# -k = skip SSL certificate verification (for self-signed certs)
# ─── With authentication (cookie) ─────────────────────────────────
gobuster dir -u http://target.com -w wordlist.txt \
-c “PHPSESSID=abc123; security=low” # inject session cookie
# ─── With custom header ───────────────────────────────────────────
gobuster dir -u http://target.com -w wordlist.txt \
-H “Authorization: Bearer eyJhbGci…”
File Extension Discovery — The -x Flag
The -x flag appends file extensions to every wordlist entry. This transforms a directory scan into a file discovery scan — finding backup files, config files, source code, and documentation that the server serves but never links to. Some of the highest-value findings in web application testing come from this technique.
gobuster dir \
-u http://target.com \
-w /usr/share/wordlists/dirb/big.txt \
-x php,html,txt,bak,zip,conf,xml,json,sql,log \
-t 50 -o files_found.txt
# What these extensions find:
.php # PHP source files, login pages
.bak # Backup files: config.php.bak, index.php.bak ← goldmine
.zip # Archive files: backup.zip, site.zip
.conf # Config files: nginx.conf, apache.conf
.sql # SQL dumps: db.sql, backup.sql ← critical if found
.log # Log files: error.log, access.log ← may expose paths/users
.txt # robots.txt, sitemap, credentials.txt (yes, this happens)
-t 50 or even -t 100 is fine. Against production systems in authorised engagements, keep -t 10 or lower and add --delay 100ms to avoid overwhelming the server. Crashing a production system during a pentest is a very bad day for everyone.Status Code Filtering — Cutting Through the Noise
Some web servers return 200 for every path — even paths that do not exist — by serving a custom “page not found” page. Without filtering, Gobuster reports thousands of false positives. These flags let you cut through them:
gobuster dir -u http://target.com -w wordlist.txt -s 200,204,301,302,307,401,403
# ─── Exclude specific status codes ───────────────────────────────
gobuster dir -u http://target.com -w wordlist.txt –exclude-length 1234
# If the custom 404 page is always 1234 bytes, exclude it
# ─── What each status means: ─────────────────────────────────────
200 OK — path exists, content returned # HIGH VALUE
301 Moved Permanently — redirects to /path/ # FOLLOW IT
302 Found (temp redirect) — path exists # CHECK TARGET
401 Unauthorised — path exists, requires auth # INTERESTING
403 Forbidden — path exists, access denied # TRY TO BYPASS
404 Not Found — path does not exist # IGNORE
500 Server Error — path triggered an error # INVESTIGATE
X-Original-URL: /admin or X-Forwarded-For: 127.0.0.1 to see if the server grants access. Never ignore 403s in your output.dns Mode — Subdomain Enumeration
gobuster dns performs DNS-based subdomain discovery — it resolves WORD.target.com for every word in the wordlist and reports which subdomains exist. This is passive from the web server’s perspective but generates DNS queries. Use for bug bounty recon and authorised external assessments.
gobuster dns \
-d target.com \
-w /usr/share/seclists/Discovery/DNS/subdomains-top1million-5000.txt \
-t 50 \
-o subdomains.txt
# ─── Show IP addresses of found subdomains ────────────────────────
gobuster dns -d target.com -w subdomains.txt -i
# -i = show IP addresses alongside found subdomains
# Sample output:
Found: dev.target.com [192.168.1.50] # Dev environment!
Found: staging.target.com [192.168.1.51] # Staging server!
Found: api.target.com [203.0.113.5] # API endpoint
Found: mail.target.com [203.0.113.6]
# dev. and staging. subdomains are often less hardened → priority targets
dev.target.com is usually in scope when *.target.com is listed — but always verify against the programme’s scope definition. More on recon workflow: Bug Bounty Reconnaissance.vhost Mode — Virtual Host Discovery
Virtual hosts allow a single server IP to serve multiple different websites using the HTTP Host header. Gobuster vhost mode brute-forces the Host header value to discover virtual hosts that are not resolvable through DNS — useful when a single IP is hosting multiple applications, some of which may not be documented.
gobuster vhost \
-u http://192.168.56.101 \
-w /usr/share/seclists/Discovery/DNS/subdomains-top1million-5000.txt \
–append-domain # Appends .target.com to each word
# Gobuster sends: GET / HTTP/1.1 with Host: dev.target.com
# Reports responses that differ from baseline (vhost exists)
Gobuster vs ffuf — When to Use Each
| Aspect | Gobuster | ffuf |
|---|---|---|
| Best for | Directory + subdomain discovery | Complex fuzzing — parameters, headers, bodies |
| Syntax | Simpler — mode-based commands | More flexible — FUZZ keyword anywhere |
| FUZZ placement | URL path only | URL, headers, POST body, cookies, anywhere |
| Filter options | Status code, length | Status, size, words, lines, regex — very granular |
| Use when | Discovering directories, subdomains, vhosts | Fuzzing parameters, bypassing filters, POST data |
Full ffuf reference: ffuf Cheat Sheet (60+ Commands) | ffuf Guide for Ethical Hackers | Directory Bruteforce Guide
Real Pentest & Bug Bounty Workflow — In Order
-x php,txt,bak,zip,conf,sql while you investigate the quick scan results. Let it run in background./admin directory may contain /admin/upload, /admin/config, etc.📋 Gobuster Command Reference Card — Screenshot This
-o output -k skip-SSL -c cookie -s status
-b blacklist-status –delay rate-limit
Frequently Asked Questions
In almost every web application assessment I have conducted, the highest-severity finding came from a path that Gobuster found — not from active exploitation. A backup file with database credentials. An admin panel using default authentication. A /.git directory that exposed the entire codebase. None of these were linked. None of them were documented. All of them were catastrophic. Gobuster is not sophisticated. It is systematic. That is what makes it effective.

