Gobuster Explained | Web Enumeration & Pentesting | TryHackMe Gobuster: The Basics

Motasem Hamdan
3 min readFeb 4, 2025

--

Gobuster is a popular tool for web enumeration and penetration testing, used to discover directories, subdomains, and virtual hosts. In this article, we go over the tool along with providing the answers for TryHackMe Gobuster: The Basics room.

Gobuster for Web Enumeration & Pentesting

Gobuster is a widely used tool in penetration testing and ethical hacking, primarily designed for web enumeration. It helps security professionals and ethical hackers discover hidden directories, subdomains, and virtual hosts on a web server. This article will provide an in-depth look at Gobuster’s functionalities, practical usage, and best practices.

What is Web Enumeration?

Web enumeration is the process of discovering hidden resources on a web application or server. This includes:

  • Directories that may not be publicly listed.
  • Subdomains that could lead to undiscovered application areas.
  • Virtual hosts running multiple websites on the same IP address.
  • Sensitive files such as .env, admin.php, or .git/

Gobuster automates this enumeration process, making it an essential tool for security auditing and penetration testing

Installation of Gobuster

To install Gobuster, use the following command on a Kali Linux or Debian-based system

sudo apt install gobuster

Alternatively, you can install it via Go:

go install github.com/OJ/gobuster/v3@latest

Ensure that Go is installed before using this method.

Key Features of Gobuster

1. Directory Enumeration

This is the most commonly used mode to find hidden directories on a web server.

gobuster dir -u http://example.com -w /usr/share/wordlists/dirb/common.txt
  • dir → Directory enumeration mode
  • -u → Target URL
  • -w → Wordlist file path

Useful Flags:

FlagDescription-x php,htmlCheck for specific file extensions-t 50Set thread count (default: 10)-o results.txtOutput results to a file

Subdomain Enumeration

This mode is used to discover subdomains of a target domain.

gobuster dns -d example.com -w /usr/share/wordlists/subdomains-top1million-5000.txt
  • dns → DNS enumeration mode
  • -d → Target domain
  • -w → Subdomain wordlist

Useful Flags:

FlagDescription--wildcardDetect wildcard subdomains--delay 1sAdd a delay between requests to avoid rate limits

3. Virtual Host Enumeration

Used to find multiple websites hosted on the same IP address.

gobuster vhost -u http://example.com -w /usr/share/wordlists/virtual-hosts.txt
  • vhost → Virtual host enumeration mode
  • -u → Target URL
  • -w → Wordlist file

Best Practices for Effective Enumeration

✅ Use the Right Wordlists: Bigger lists take longer but provide better results.

✅ Filter HTTP Status Codes: Use --status-codes to only show relevant responses.

✅ Adjust Thread Count: Using -t 50 can speed up scans but may overload servers.

✅ Avoid Detection: Implement rate limits using --delay 1s to avoid being blocked

TryHackMe Gobuster: The Basics| Room Answers

Room answers can be found here.

Conclusion

Gobuster is a powerful and essential tool for web enumeration in penetration testing. By leveraging different modes (directories, subdomains, and virtual hosts), security professionals can uncover hidden resources and improve the security posture of web applications. Practicing with CTF challenges like TryHackMe helps users build real-world skills in ethical hacking.

Summary

🔍 Introduction to Gobuster: A popular tool for web enumeration and penetration testing, used to discover directories, subdomains, and virtual hosts.

🛠️ Getting Started: Always begin with the help menu (gobuster -h) to understand available commands and flags.

📁 Directory Mode: Use gobuster dir to enumerate web directories and identify hidden files or directories.

🌐 Subdomain Enumeration: The gobuster dns mode helps find subdomains of a target website.

🏠 Virtual Host Enumeration: The gobuster vhost mode checks for multiple websites hosted on the same server.

⚙️ Key Flags & Options:

  • -o : Output results to a file for later analysis.
  • -t : Threads control to manage system resources.
  • -w : Wordlists are critical for effective enumeration.
  • -c : Cookies for authenticated scanning.
  • --no-tls-validation : Skips SSL/TLS verification for scenarios without certificates.
  • -x : Specifies file extensions like .php, .js for targeted scans.

Video Walkthrough

--

--

Motasem Hamdan
Motasem Hamdan

Written by Motasem Hamdan

Motasem Hamdan is a content creator and swimmer who creates cyber security training videos and articles. https://www.youtube.com/@MotasemHamdan

No responses yet