Gobuster Commands & Tutorial 2026 | Complete Web Enumeration Guide | A7 Security Hunters

A7 Security Hunters · Web Enumeration & Reconnaissance

Table of Contents

Gobuster Commands & Tutorial 2026 — Complete Web Enumeration Guide

Complete Gobuster guide covering authorized web and DNS enumeration, directory discovery, virtual-host testing, troubleshooting, and cybersecurity lab workflows.

Gobuster Web Enumeration Directory Discovery DNS Enumeration 2026 Guide
← Nmap → Gobuster → Burp Suite → SQLMap → Metasploit

What Is Gobuster?

Gobuster is an open-source command-line enumeration tool used by security professionals to discover directories, files, DNS records, and virtual hosts during authorized security assessments. It is particularly useful during the reconnaissance and enumeration stages of web application penetration testing.

What is Gobuster used for? Security professionals use Gobuster for authorized web directory enumeration, DNS subdomain discovery, virtual host discovery, and web reconnaissance in controlled cybersecurity assessments.

The basic workflow is: identify the target → choose the enumeration mode (dir, dns, vhost) → select a wordlist → run Gobuster → analyze results → document findings.

Featured Snippet Answers

What is Gobuster used for?

Gobuster is used for authorized web directory enumeration, DNS subdomain discovery, virtual host discovery, and web reconnaissance during cybersecurity assessments.

Is Gobuster legal?

Gobuster itself is legal software. Testing systems you own or have explicit written authorization to test is legal; testing systems without authorization is illegal.

Is Gobuster installed on Kali Linux?

Yes — Gobuster is pre-installed on Kali Linux. It can also be installed via sudo apt install gobuster.

What modes does Gobuster support?

Gobuster supports three main modes: dir (directory/file enumeration), dns (DNS subdomain enumeration), and vhost (virtual host enumeration).

What is the difference between Gobuster and FFUF?

Both are web fuzzing tools. Gobuster is simpler and more focused on directory and DNS enumeration. FFUF is faster and more flexible for complex fuzzing scenarios.

Gobuster Tutorial for Beginners

Gobuster is one of the most popular web enumeration tools used by security professionals. It helps map the attack surface of web applications by discovering hidden directories, files, DNS subdomains, and virtual hosts.

Important: Only use Gobuster against systems and applications that you own or are explicitly authorized to assess. Unauthorized enumeration is illegal in most jurisdictions.

Why Web Enumeration Matters

Web enumeration is a critical phase of any security assessment. It helps identify:

  • Hidden directories: Admin panels, backup directories, configuration files
  • Unlinked files: Backup files, log files, source code repositories
  • Subdomains: Development, staging, and internal subdomains
  • Virtual hosts: Other applications hosted on the same server
  • Additional attack surface: Endpoints that aren’t linked from the main application
A7 Security Hunters Training Insight: Enumeration is not the same as exploitation. A good penetration tester first maps the authorized attack surface, validates findings carefully, minimizes unnecessary requests, documents evidence, and then recommends remediation.

How to Install Gobuster

Kali Linux

Install Gobuster on Kali
sudo apt update
sudo apt install gobuster

Ubuntu and Debian

Install Gobuster
sudo apt update
sudo apt install gobuster

macOS

Install Gobuster on macOS
brew install gobuster

From Source (Go)

Install from source
go install github.com/OJ/gobuster/v3@latest

Verify the Installation

Check version
gobuster --version

# Show help
gobuster --help

Gobuster Syntax

Basic syntax
gobuster [mode] [options]
ModePurposeExample
dirDirectory/file enumerationgobuster dir -u http://target.com -w wordlist.txt
dnsDNS subdomain enumerationgobuster dns -d target.com -w wordlist.txt
vhostVirtual host enumerationgobuster vhost -u http://target.com -w wordlist.txt

Common Options

OptionPurposeExample
-uTarget URL (dir/vhost)-u http://target.com
-dDomain (DNS mode)-d target.com
-wWordlist path-w /usr/share/wordlists/dirbuster/directory-list-lowercase-2.3-medium.txt
-xFile extensions-x php,html,txt
-tThreads-t 50
-sStatus codes to include-s 200,301,302
-kSkip SSL verification-k
-rFollow redirects-r
-qQuiet mode-q
-oOutput file-o results.txt
-vVerbose output-v

Basic Gobuster Commands

Show Help

General help
gobuster --help
Directory mode help
gobuster dir --help
DNS mode help
gobuster dns --help
Vhost mode help
gobuster vhost --help

Directory Enumeration

Basic directory enumeration
gobuster dir -u http://target.com -w /usr/share/wordlists/dirbuster/directory-list-lowercase-2.3-medium.txt

With File Extensions

Search for specific file types
gobuster dir -u http://target.com -w wordlist.txt -x php,html,txt,js,css

With Status Code Filtering

Show only 200, 301, 302
gobuster dir -u http://target.com -w wordlist.txt -s 200,301,302

Exclude Status Codes

Exclude 404 responses
gobuster dir -u http://target.com -w wordlist.txt -b 404

With Threads and Output

Faster scanning with output
gobuster dir -u http://target.com -w wordlist.txt -t 50 -o results.txt

With Cookie Authentication

Authenticated directory enumeration
gobuster dir -u http://target.com -w wordlist.txt -c "session=abc123; security=low"

With Proxy

Route through Burp Suite
gobuster dir -u http://target.com -w wordlist.txt --proxy http://127.0.0.1:8080
Pro tip: Start with common extensions (.php, .html, .txt) and gradually add more as needed. Use -t to control speed and avoid detection.

DNS Enumeration

Basic DNS enumeration
gobuster dns -d target.com -w /usr/share/wordlists/SecLists/Discovery/DNS/subdomains-top1million-5000.txt
DNS enumeration with output
gobuster dns -d target.com -w wordlist.txt -o dns_results.txt
DNS enumeration with specific resolver
gobuster dns -d target.com -w wordlist.txt --resolver 8.8.8.8

Understanding DNS Output

ColumnDescription
Found:Subdomain discovered
Status:DNS resolution status
Record:IP address of the subdomain
Note: DNS enumeration can be noisy and may trigger detection. Use appropriate throttling and only on authorized targets.

Virtual Host Enumeration

Basic virtual host enumeration
gobuster vhost -u http://target.com -w /usr/share/wordlists/SecLists/Discovery/Web-Content/raft-small-words.txt
Vhost with custom headers
gobuster vhost -u http://target.com -w wordlist.txt --header "User-Agent: Gobuster"
Vhost with output
gobuster vhost -u http://target.com -w wordlist.txt -o vhost_results.txt
Important: Virtual host enumeration sends many requests with different Host headers. Ensure you have authorization and understand the target’s rate limiting.

Wordlists and Extensions

Recommended Wordlist Locations

WordlistLocationUse Case
Dirbuster medium/usr/share/wordlists/dirbuster/directory-list-lowercase-2.3-medium.txtGeneral directory enumeration
SecLists Discovery/usr/share/wordlists/SecLists/Discovery/Web-Content/Comprehensive web content discovery
Raft/usr/share/wordlists/SecLists/Discovery/Web-Content/raft-*.txtVarious wordlists for different purposes
Common/usr/share/wordlists/common.txtSmall, fast wordlist for quick scans
Subdomains/usr/share/wordlists/SecLists/Discovery/DNS/subdomains-top1million-5000.txtDNS subdomain discovery

Common File Extensions

ExtensionDescription
.phpPHP files (common in web applications)
.htmlHTML files
.txtText files (robots.txt, readme, etc.)
.jsJavaScript files
.cssCSS files
.bakBackup files
.oldOld versions
.zipCompressed archives
.sqlSQL database dumps
.logLog files
Common extension combinations
# Standard web extensions
-x php,html,txt,js,css

# Backup and sensitive files
-x bak,old,zip,sql,log,conf,config

# All common extensions
-x php,html,txt,js,css,bak,old,zip,sql,log,conf,config,xml,json,yml
Pro tip: Start with smaller wordlists for speed. Use comprehensive wordlists for thorough assessments when time permits.

HTTP Status Codes

Status CodeMeaningAction
200 OKResource found and accessibleInvestigate the resource
301 Moved PermanentlyResource has been movedFollow redirect to find new location
302 FoundTemporary redirectFollow redirect to find new location
401 UnauthorizedAuthentication requiredInvestigate potential authentication bypass
403 ForbiddenAccess deniedInvestigate potential privilege escalation
404 Not FoundResource not foundIgnore or exclude from results
500 Internal Server ErrorServer errorInvestigate for potential injection
502 Bad GatewayProxy/gateway errorMay indicate misconfiguration
Status code filtering
# Include specific status codes
gobuster dir -u http://target.com -w wordlist.txt -s 200,301,302

# Exclude status codes
gobuster dir -u http://target.com -w wordlist.txt -b 404,403

Response Size and Filtering

Filter by response size
# Exclude responses of a specific size (e.g., 404 pages)
gobuster dir -u http://target.com -w wordlist.txt -l --exclude-size=1234
Show response length
gobuster dir -u http://target.com -w wordlist.txt -l
Filter by status code and size
gobuster dir -u http://target.com -w wordlist.txt -b 404 -x php --exclude-size=1234
Why filter? Many web applications return the same size for 404 errors. Filtering out common sizes can significantly reduce false positives.

Authentication Considerations

Cookie-based authentication
gobuster dir -u http://target.com -w wordlist.txt -c "session=abc123; security=low"
Basic authentication
gobuster dir -u http://target.com -w wordlist.txt --username admin --password password123
Custom headers
gobuster dir -u http://target.com -w wordlist.txt -H "Authorization: Bearer token123"
Important: Only test authentication mechanisms on systems you own or have explicit authorization to test.

HTTPS and TLS Options

Skip SSL verification
gobuster dir -u https://target.com -w wordlist.txt -k
Follow redirects
gobuster dir -u http://target.com -w wordlist.txt -r
Custom TLS configuration
gobuster dir -u https://target.com -w wordlist.txt --tls-cert cert.pem --tls-key key.pem
Pro tip: Always use -k when testing self-signed or internal certificates to avoid SSL errors.

Common Gobuster Errors & Solutions

ErrorPossible CauseSolution
No wordlist provided-w option missingAdd -w /path/to/wordlist.txt
Target URL required-u option missingAdd -u http://target.com
Could not connect to targetTarget unreachableVerify URL, network, and firewall
Too many open filesHigh thread countReduce -t value
SSL certificate verification failedSelf-signed certificateAdd -k to skip verification
DNS resolution failedDNS issueVerify DNS; use --resolver
Permission deniedFile permissionCheck wordlist permissions

Gobuster vs Other Tools

ToolPrimary Purpose
GobusterWeb and DNS enumeration
FFUFFast web fuzzing
DirsearchWeb path discovery
NmapNetwork and service discovery
Burp SuiteWeb application security testing

Gobuster vs FFUF

Gobuster

  • Simpler syntax
  • Built-in DNS and vhost modes
  • Good for basic enumeration
  • Written in Go (fast)

FFUF

  • More flexible fuzzing
  • Faster performance
  • Complex filtering options
  • Customizable request patterns

Gobuster vs Dirsearch

Gobuster

  • Multiple modes (dir, dns, vhost)
  • Go implementation (fast)
  • Simple command structure
  • Good for quick scans

Dirsearch

  • Python-based
  • More output formats
  • Built-in proxy support
  • Extensive customization
Which to use? Use Gobuster for quick, simple enumeration with multiple modes. Use FFUF for complex fuzzing scenarios. Use Dirsearch when you need more output formats and Python compatibility.

Authorized Web Enumeration Lab

Lab environment: This example uses a deliberately vulnerable lab environment. All targets are under the control of the training organization. Never test systems you don’t have authorization to audit.

Scenario

You are conducting an authorized web application assessment on a lab target to discover hidden directories and files.

Step 1 — Identify the Target

Target URL
http://192.168.1.100:8080

Step 2 — Basic Directory Enumeration

Initial scan
gobuster dir -u http://192.168.1.100:8080 -w /usr/share/wordlists/dirbuster/directory-list-lowercase-2.3-medium.txt -t 20

Step 3 — Add File Extensions

Search for files
gobuster dir -u http://192.168.1.100:8080 -w wordlist.txt -x php,html,txt,js -t 20

Step 4 — Filter Results

Exclude 404 responses
gobuster dir -u http://192.168.1.100:8080 -w wordlist.txt -x php -b 404 -o results.txt

Step 5 — DNS Enumeration

Subdomain discovery
gobuster dns -d target.com -w /usr/share/wordlists/SecLists/Discovery/DNS/subdomains-top1million-5000.txt

Step 6 — Analyze Results

Sample findings
/admin           (Status: 200)
/login.php       (Status: 200)
/backup.sql      (Status: 200)
/robots.txt      (Status: 200)
/hidden          (Status: 301)
/api             (Status: 200)

Step 7 — Validate Findings

Manually verify each discovered resource:

  • /admin: Admin panel — check for default credentials
  • /login.php: Login page — test for SQL injection
  • /backup.sql: Database dump — contains sensitive data
  • /robots.txt: Contains disallowed directories
  • /api: API endpoints — test for security issues

Step 8 — Report Findings

Document findings and remediation recommendations:

  • Vulnerability: Exposed backup.sql file
  • Risk: Data exposure, credential compromise
  • Remediation: Remove backup files, restrict directory access
  • Vulnerability: Exposed admin panel
  • Risk: Unauthorized access
  • Remediation: Restrict access to admin panel by IP, implement MFA
Lab takeaway: This exercise demonstrates how web enumeration helps discover hidden attack surface. It shows why proper access controls, file management, and regular security assessments are essential.

Web Enumeration Best Practices

Start Small

Begin with smaller, targeted wordlists for speed. Expand wordlist size as needed based on initial results.

Use Appropriate Threads

Start with -t 20 and increase gradually. Avoid overwhelming the target server.

Filter Out Noise

Use -b to exclude common error codes (404, 403) and --exclude-size to filter uniform responses.

Save Results

Always use -o to save results for reporting and evidence collection.

Verify Findings

Manually verify all discovered resources before including them in reports.

Respect Rate Limiting

Monitor target response times and adjust -t to avoid triggering rate limiting or WAF blocks.

Document Everything

Document commands used, outputs, findings, and remediation recommendations.

Use Appropriate Wordlists

Choose wordlists based on the target’s technology stack and language.

Enumeration best practice: A good enumeration strategy balances speed, thoroughness, and stealth. Always prioritize authorization and responsible testing over speed.

Gobuster Cheat Sheet

PurposeCommand
Helpgobuster --help
Versiongobuster --version
Directory enumgobuster dir -u http://target.com -w wordlist.txt
Directory with extensionsgobuster dir -u http://target.com -w wordlist.txt -x php,html,txt
DNS enumgobuster dns -d target.com -w wordlist.txt
Vhost enumgobuster vhost -u http://target.com -w wordlist.txt
With threadsgobuster dir -u http://target.com -w wordlist.txt -t 50
With outputgobuster dir -u http://target.com -w wordlist.txt -o results.txt
Status code filtergobuster dir -u http://target.com -w wordlist.txt -s 200,301
Exclude statusgobuster dir -u http://target.com -w wordlist.txt -b 404
Cookie authgobuster dir -u http://target.com -w wordlist.txt -c "session=abc123"
Basic authgobuster dir -u http://target.com -w wordlist.txt --username admin --password pass
Skip SSLgobuster dir -u https://target.com -w wordlist.txt -k
Follow redirectsgobuster dir -u http://target.com -w wordlist.txt -r
Proxygobuster dir -u http://target.com -w wordlist.txt --proxy http://127.0.0.1:8080
Response lengthgobuster dir -u http://target.com -w wordlist.txt -l
Exclude sizegobuster dir -u http://target.com -w wordlist.txt --exclude-size=1234
Save this: Bookmark this cheat sheet for quick reference during authorized web enumeration labs and assessments.

Frequently Asked Questions About Gobuster

What is Gobuster?

Gobuster is an open-source command-line enumeration tool used to discover directories, files, DNS records, and virtual hosts during authorized security assessments.

Is Gobuster legal?

Gobuster is legal software. Testing systems you own or have explicit written authorization to test is legal; testing systems without authorization is illegal.

Is Gobuster installed on Kali Linux?

Yes — Gobuster is pre-installed on Kali Linux.

What modes does Gobuster support?

Gobuster supports dir (directory/file enumeration), dns (DNS subdomain enumeration), and vhost (virtual host enumeration).

What is the difference between Gobuster and FFUF?

Gobuster is simpler and focused on enumeration. FFUF is faster and more flexible for complex fuzzing scenarios.

What is the difference between Gobuster and Dirsearch?

Gobuster is written in Go (faster) and supports multiple modes. Dirsearch is Python-based with more output formats.

How do I use Gobuster for directory enumeration?

gobuster dir -u http://target.com -w wordlist.txt

How do I use Gobuster for DNS enumeration?

gobuster dns -d target.com -w wordlist.txt

How do I use Gobuster with file extensions?

gobuster dir -u http://target.com -w wordlist.txt -x php,html,txt

How do I filter status codes in Gobuster?

gobuster dir -u http://target.com -w wordlist.txt -s 200,301 or -b 404

Can Gobuster handle authenticated enumeration?

Yes — use -c for cookies, --username and --password for basic auth, or -H for custom headers.

How do I save Gobuster results?

Use -o results.txt to save output to a file.

How do I use Gobuster with a proxy?

gobuster dir -u http://target.com -w wordlist.txt --proxy http://127.0.0.1:8080

What wordlist should I use with Gobuster?

Start with Dirbuster medium or SecLists for general enumeration. Use specific wordlists based on the target technology.

Can beginners learn Gobuster?

Yes — Gobuster has a simple syntax and is a great tool for learning web enumeration.

How can organizations defend against enumeration?

Implement proper access controls, use WAFs, monitor for suspicious patterns, limit information disclosure, and conduct regular security assessments.

Gobuster: Quick Expert Summary

Gobuster is a comprehensive web enumeration tool. It helps cybersecurity professionals discover hidden directories, files, DNS subdomains, and virtual hosts in authorized environments.

The most important concepts to learn are: directory enumeration, DNS enumeration, virtual host enumeration, wordlists, filtering, authentication, and responsible enumeration practices.

A professional workflow should always include authorization, targeted enumeration, evidence collection, manual verification, and remediation recommendations.

Official & Authoritative Resources

Gobuster Official

GitHub — OJ/gobuster

Official repository, documentation, and releases.

Kali Linux

Kali Linux Gobuster Package

Kali-specific package information.

SecLists

SecLists — Wordlist Repository

Comprehensive wordlist collection for enumeration.

OWASP

OWASP WSTG — Information Gathering

Web application security testing guidance.

PortSwigger

PortSwigger Web Security Academy

Free web security training and labs.

NIST

NIST Web Security Guidelines

Government web security recommendations.

© A7 Security Hunters. Educational cybersecurity content. Use security tools only on systems, applications, and networks that you own or are explicitly authorized to assess.

Last Updated: August 2026

Leave a Reply

Your email address will not be published. Required fields are marked *

About Us

A7 Security Hunters is a leading provider of cybersecurity certifications and training, offering both online and offline courses tailored to professionals at all levels. Our comprehensive programs cover key areas like ethical hacking, network security, and threat management, designed to equip individuals with the skills to succeed in the fast-paced world of cybersecurity. With expert instructors and hands-on learning, A7 Security Hunters ensures you gain practical knowledge and industry-recognized certifications to advance your career in cybersecurity.

Cybersecurity Training & Certifications

Most Recent Posts

A7 Security Hunters

Enroll in A7 Security Hunters' Certifications and Transform into a Cybersecurity Expert

A7 Security Hunters provides cybersecurity training, ethical hacking courses, penetration testing education, digital forensics training, AI security learning, and professional cybersecurity certifications for students and professionals across India.

Address: Mata Darwaja, Gau Karan Rd, Near SD School, landmark Gau Karn Traffic Police Choki, Plot 736a Baba Laxman Puri Colony, Makhane or, Library Wali Gali, Rohtak124001, Haryana (India) | Official Email Address- [email protected] | [email protected] | Official Phone Numbers – +91 – 7988-28-5508 | +91 – 818181-6323

© 2026 A7 Security Hunters. Cybersecurity Training, Ethical Hacking Courses & Professional Certifications.