commands // 2026-01-05 // ID: REF-Gobuster Command List

Gobuster Command List


Welcome, aspiring cybersecurity professionals! Today, we're going to dive into a powerful and very common tool used in the early stages of a penetration test or CTF challenge: Gobuster. Think of it as a digital detective that helps us find hidden doors and secret rooms on websites.

1. Brief Explanation: What is Gobuster and Why is it Used?

Gobuster is an open-source tool written in Go that's designed for brute-forcing directories and files on web servers. In simpler terms, imagine a website is like a house. You know the main entrance (the website's URL), but there might be other doors (directories) or even hidden rooms (files) that aren't advertised. Gobuster tries to guess the names of these hidden paths to see if they exist.

Why is this important in cybersecurity?

It's a fundamental step in reconnaissance and enumeration, which are the first phases of understanding a target system.

2. Top 10 Useful Gobuster Commands

Let's explore some of the most common and useful ways to use Gobuster. We'll break down each command and its output so you understand exactly what's happening.


Command 1: Basic Directory Brute-Force

This is the most fundamental use of Gobuster. We're telling it to look for common directories on a target website.

gobuster dir -u http://testphp.vulnweb.com -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt

Example Output Snippet:

/admin            (Status: 200) [Size: 4096]
/backup           (Status: 403) [Size: 128]
/config           (Status: 403) [Size: 128]
/images           (Status: 200) [Size: 4096]
/phpinfo.php      (Status: 200) [Size: 1024]

🧠 Beginner Analysis:


Command 2: Specifying File Extensions

Many web applications use specific file extensions like .php, .html, .asp, etc. This command helps narrow down the search to only those extensions.

gobuster dir -u http://testphp.vulnweb.com -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -x php,html,bak

Example Output Snippet:

/index.php        (Status: 200) [Size: 512]
/admin.php        (Status: 200) [Size: 2048]
/config.bak       (Status: 403) [Size: 1024]
/login.html       (Status: 200) [Size: 1536]

🧠 Beginner Analysis:


Command 3: Changing the Wordlist Size (Shorter/Longer)

Wordlists can be very large, and sometimes a smaller, more targeted list is better, or a larger, more exhaustive list is needed.

# Using a small, common wordlist
gobuster dir -u http://testphp.vulnweb.com -w /usr/share/wordlists/dirbuster/directory-list-2.3-small.txt

# Using a larger, more comprehensive wordlist (if available)
gobuster dir -u http://testphp.vulnweb.com -w /usr/share/wordlists/dirbuster/directory-list-2.3-big.txt

Example Output Snippet (with a small wordlist):

/admin   (Status: 200) [Size: 4096]
/images  (Status: 200) [Size: 4096]

Example Output Snippet (with a big wordlist):

/admin            (Status: 200) [Size: 4096]
/backup           (Status: 403) [Size: 128]
/cgi-bin          (Status: 403) [Size: 128]
/config           (Status: 403) [Size: 128]
/docs             (Status: 404) [Size: 0]
/etc              (Status: 403) [Size: 128]
/images           (Status: 200) [Size: 4096]
/images/logo.png  (Status: 200) [Size: 1024]
/phpinfo.php      (Status: 200) [Size: 1024]
/robots.txt       (Status: 200) [Size: 64]

🧠 Beginner Analysis:


Command 4: Ignoring Specific Status Codes

Sometimes, you want to filter out results you know aren't useful, like 404 Not Found pages, which indicate a path doesn't exist.

gobuster dir -u http://testphp.vulnweb.com -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -x php -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -f -nmap -sC -sV -oA nmap_output http://testphp.vulnweb.com

Example Output Snippet (Gobuster with -f - less common to see direct output changes, more about what it finds):

Gobuster's output doesn't dramatically change with -f in terms of formatting, but it will now report paths that previously might have been ignored if they resulted in a redirect.

Example Output Snippet (Nmap):

Starting Nmap 7.80 ( https://nmap.org ) at 2023-10-27 10:00 EDT
Nmap scan report for testphp.vulnweb.com (192.168.1.100)
Host is up (0.050s latency).
Not shown: 997 filtered ports
PORT    STATE SERVICE VERSION
21/tcp  open  ftp     vsftpd 3.0.3
22/tcp  open  ssh     OpenSSH 7.4p1 Debian 10+deb9u7 (protocol 2.0)
80/tcp  open  http    Apache httpd 2.4.25 ((Debian))
|_http-server-header: Apache/2.4.25 ((Debian))
|_http-title: Welcome to the Apache2 Debian Default Page!
135/tcp closed msrpc
139/tcp closed netbios-ssn
445/tcp closed microsoft-ds
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel

Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 12.34 seconds

🧠 Beginner Analysis:


Command 5: Recursively Discovering Directories

This is where Gobuster starts to feel like a true explorer, not just looking one level deep, but going deeper into discovered directories.

gobuster dir -u http://testphp.vulnweb.com/admin/ -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -r

Example Output Snippet (illustrative, as full recursion can be long):

/admin/users/           (Status: 200) [Size: 4096]
/admin/users/profile/   (Status: 200) [Size: 4096]
/admin/users/profile/view.php (Status: 200) [Size: 2048]
/admin/settings/        (Status: 403) [Size: 128]

🧠 Beginner Analysis:


Command 6: Searching for Virtual Hosts

Web servers can host multiple websites on the same IP address, each with its own domain name. This is called virtual hosting. Gobuster can help find these hidden hosts.

gobuster vhost -u http://testphp.vulnweb.com -w /usr/share/wordlists/dirbuster/vhost-common.txt

Example Output Snippet:

Found: blog.testphp.vulnweb.com (Status: 200) [Size: 4096]
Found: api.testphp.vulnweb.com  (Status: 200) [Size: 2048]
Found: staging.testphp.vulnweb.com (Status: 200) [Size: 1536]

🧠 Beginner Analysis:


Command 7: Controlling Thread Count

Gobuster can run multiple requests simultaneously. This is controlled by the number of threads.

gobuster dir -u http://testphp.vulnweb.com -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -t 50

Example Output Snippet:

The output will appear to update faster, with many more lines appearing in quick succession as each thread finds something or times out.

🧠 Beginner Analysis:


Command 8: Setting a Timeout

Sometimes, requests to a server can hang indefinitely. A timeout prevents Gobuster from waiting forever.

gobuster dir -u http://testphp.vulnweb.com -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -timeout 10

Example Output Snippet:

You'll notice that any requests that would have taken longer than 10 seconds are simply dropped, and Gobuster continues without waiting.

🧠 Beginner Analysis:


Command 9: Outputting to a File

While seeing output in the terminal is good, it's often necessary to save it for later analysis or reporting.

gobuster dir -u http://testphp.vulnweb.com -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -o gobuster_results.txt

Example Output Snippet:

The terminal will show the standard output, but all of it will also be written into the gobuster_results.txt file.

/admin            (Status: 200) [Size: 4096]
/backup           (Status: 403) [Size: 128]
...

🧠 Beginner Analysis:


Command 10: Skipping Specific URLs

Sometimes, you might want to exclude certain directories from your scan, perhaps if they are known to be irrelevant or could cause issues.

gobuster dir -u http://testphp.vulnweb.com -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -s '200,204,301,302,403' -x php

Example Output Snippet:

/index.php          (Status: 200) [Size: 512]
/admin.php          (Status: 200) [Size: 2048]
/config.php         (Status: 200) [Size: 1024]

(Note: If config.bak from earlier was requested, and it returned 403, it would be shown here. If backup directory returned 403, it would also be shown.)

🧠 Beginner Analysis:


3. The Most Powerful Command

While many commands offer specific functionalities, the "most powerful" command is often a combination that provides a broad yet deep scan. For Gobuster's directory busting, a powerful command aims for thoroughness and speed without being overly noisy.

gobuster dir -u http://testphp.vulnweb.com -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -x php,html,bak,old,backup,config -t 50 -o gobuster_comprehensive_scan.txt

Explanation of its Power:

  1. gobuster dir: We're using the core directory discovery mode.
  2. -u http://testphp.vulnweb.com: Specifies the target website.
  3. -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt: Uses a well-balanced wordlist that finds common and some less common paths, avoiding the excessive noise of a big list but being more thorough than small.
  4. -x php,html,bak,old,backup,config: This is a key addition. We're targeting specific file extensions that are commonly associated with web applications and sensitive information. This significantly increases the chances of finding something useful compared to just looking for directories.
  5. -t 50: Uses a healthy number of threads (50) for efficient scanning, balancing speed with the risk of overwhelming the server.
  6. -o gobuster_comprehensive_scan.txt: Saves all the results to a file for easy review and further processing.

🧠 Beginner Analysis:

This combination provides a robust and efficient way to discover a significant portion of a web application's hidden structure, making it a cornerstone command for any beginner learning web enumeration. Happy hacking!