Gobuster

Gobuster is a tool used to brute-force:

  • URIs (directories and files) in web sites

  • DNS subdomains

  • Virtual Host names on target web servers

  • Open Amazon S3 buckets

Basic Usage

Gobuster has several modes:

  • dir - Directory/file bruteforcing mode

  • dns - DNS subdomain bruteforcing mode

  • vhost - Virtual host bruteforcing mode

  • s3 - Amazon S3 bucket bruteforcing mode

Command Line Options

General Options

  • -z - Don't display progress

  • -o filename - Output file to write results to

  • -q - Don't print the banner and other noise

  • -t threads - Number of concurrent threads (default 10)

  • -v - Verbose output

  • -w wordlist - Path to the wordlist

Directory Mode

Directory mode is used to brute force directories and files in websites.

Basic Directory Scan

With File Extensions

Handle Different Status Codes

Exclude Status Codes

With Basic Authentication

Follow Redirects

With Cookies

With Custom Headers

Specify User-Agent

Case-insensitive

DNS Mode

DNS mode is used to brute force subdomains.

Basic DNS Scan

Show IPs

Use Specific Resolver

Subdomain Wildcard Detection

Virtual Host Mode

Virtual host mode is used for brute forcing virtual host names.

Basic VHost Scan

Append Domain

Amazon S3 Bucket Mode

S3 mode is used to enumerate open Amazon S3 buckets.

Basic S3 Scan

Tips and Tricks

Use SecLists

The SecLists repository contains many wordlists useful for enumeration:

Custom Wordlists

For more targeted scans, create custom wordlists:

Faster Scanning

Increase the number of threads for faster scanning (may cause errors or missed results):

Combine with Other Tools

Pipe Gobuster output to other tools:

Practical Examples

Web Application Assessment

Subdomain Enumeration

Cheat Sheet

Command
Description

gobuster dir -u URL -w WORDLIST

Directory bruteforce

gobuster dir -u URL -w WORDLIST -x EXTENSIONS

With file extensions

gobuster dir -u URL -w WORDLIST -c COOKIE

With cookie

gobuster dir -u URL -w WORDLIST -U USERNAME -P PASSWORD

With Basic Auth

gobuster dir -u URL -w WORDLIST -r

Follow redirects

gobuster dns -d DOMAIN -w WORDLIST

DNS subdomain bruteforce

gobuster dns -d DOMAIN -w WORDLIST -i

Show IP addresses

gobuster vhost -u URL -w WORDLIST

Virtual host bruteforce

gobuster s3 -w WORDLIST

S3 bucket bruteforce

Resources

Last updated