Gobuster

3 min read432 words

Gobuster

Gobuster – Directory & File Brute-Forcing Tool

Gobuster is a fast tool used for brute-forcing directories, files, subdomains, and virtual hosts. It helps in discovering hidden endpoints in web applications and is widely used during the reconnaissance phase of penetration testing.

Installation / Check

Check if Gobuster is installed:

which gobuster

Install Gobuster:

sudo apt install gobuster

Basic Syntax

gobuster dir -u <URL> -w <wordlist>

Common Commands

Directory scanning:

gobuster dir -u http://192.168.1.1 -w /usr/share/wordlists/dirb/common.txt

Find specific file extensions:

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

Subdomain enumeration:

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

Save output to file:

gobuster dir -u http://192.168.1.1 -w wordlist.txt -o results.txt

Increase speed (threads):

gobuster dir -u http://192.168.1.1 -w wordlist.txt -t 50

Filter by status codes:

gobuster dir -u http://192.168.1.1 -w wordlist.txt -s "200,204,301,302,307,401"

Exclude status codes:

gobuster dir -u http://192.168.1.1 -w wordlist.txt -b "403,404"

Follow redirects:

gobuster dir -u http://192.168.1.1 -w wordlist.txt -r

Ignore SSL certificate errors:

gobuster dir -u http://192.168.1.1 -w wordlist.txt -k

Use cookies (authenticated scan):

gobuster dir -u http://192.168.1.1 -w wordlist.txt -c "PHPSES

Custom headers:

gobuster dir -u http://192.168.1.1 -w wordlist.txt -H "Authorization: Bearer token"

Custom User-Agent:

gobuster dir -u http://192.168.1.1 -w wordlist.txt -a "Mozilla/5.0"

Use proxy:

gobuster dir -u http://192.168.1.1 -w wordlist.txt -p http://127.0.0.1:8080

Virtual host enumeration:

gobuster vhost -u http://192.168.1.1 -w vhosts.txt

DNS enumeration with IP:

gobuster dns -d target.com -w subdomains.txt -i

Handle wildcard DNS:

gobuster dns -d target.com -w subdomains.txt --wildcard

Fuzzing mode:

gobuster fuzz -u http://192.168.1.1/FUZZ -w wordlist.txt

Suppress errors:

gobuster dir -u http://192.168.1.1 -w wordlist.txt --no-error

Expanded output:

gobuster dir -u http://192.168.1.1 -w wordlist.txt -e

HTTP authentication:

gobuster dir -u http://192.168.1.1 -w wordlist.txt -U admin -P password

Step-by-Step Guide

  1. Identify target URL
  2. Choose a wordlist (e.g., common.txt)
  3. Run directory scan:
 gobuster dir -u <url> -w <wordlist>
  1. Look for interesting responses
  2. Test discovered paths manually
  3. Use extensions (-x) to find specific files
  4. Save results:
-o output.txt

Understanding the Output

  • /path (Status: 200) → Resource exists
  • 301/302 → Redirected resource
  • 403 → Exists but access denied
  • 404 → Not found

Also shows response size and path details.

⚠️ Legal Warning

Use enumeration tools only on systems you own or have explicit permission to test. Unauthorized scanning is illegal.

Keep learning. Keep building. Keep growing.

© 2026 Ugenz Academy