๐Ÿ“‘Gobuster

Introduction to Gobuster

Gobuster is an open-source tool used for web content discovery and reconnaissance. It can help you find hidden files, directories, and subdomains on a web server. The tool is designed to be fast, efficient, and highly customizable.

In this course, you will learn how to use Gobuster to perform various tasks such as directory and file enumeration, subdomain enumeration, and virtual host discovery. You will also learn how to customize the tool to fit your specific needs.

Prerequisites

Before you begin this course, you should have a basic understanding of web technologies such as HTTP and HTML. You should also be familiar with the command line interface (CLI) and have some experience with Linux or Unix-based operating systems.

Installation

Gobuster is written in Go, so you will need to have Go installed on your system to compile the tool. You can download Go from the official website at https://golang.org/dl/.

Once you have installed Go, you can download Gobuster from the GitHub repository at https://github.com/OJ/gobuster. You can either download the source code and compile it yourself or download a precompiled binary for your platform.

Basic Usage

To use Gobuster, you need to specify a target URL and a wordlist. The wordlist contains a list of common directories, files, or subdomains that Gobuster will use to perform its scan. You can use the -w option to specify the wordlist and the -u option to specify the target URL.

One of the most common use cases for Gobuster is directory enumeration. You can use Gobuster to scan a target URL for directories and files that are not linked from the main page.

To scan a target URL for directories, you can use the dir mode.

For example, to scan a target URL http://example.com using the default wordlist, you can use the following command:

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

This command will scan the target URL for directories using the specified wordlist.

Subdomain Enumeration

In addition to directory enumeration, Gobuster can also be used to perform subdomain enumeration. You can use Gobuster to scan a target domain for subdomains that may not be publicly visible.

To scan a target domain for subdomains, you can use the dns mode. For example:

gobuster dns -d example.com -w /usr/share/wordlists/dns/subdomains-top1million-5000.txt

This command will scan the target domain for subdomains using the specified wordlist.

You can also specify the type of DNS record to query using the -t option. For example, to query for CNAME records, you can use the following command:

gobuster dns -d example.com -w /usr/share/wordlists/dns/subdomains-top1million-5000.txt -t cname

This command will scan the target domain for CNAME records using the specified wordlist.

Virtual Host Discovery

Gobuster can also be used to perform virtual host discovery. This is useful when you want to identify all the virtual hosts that are hosted on a single IP address.

To scan a target IP address for virtual hosts, you can use the vhost mode. For example:

gobuster vhost -u http://10.10.10.10 -w /usr/share/wordlists/hosts.txt

This command will scan the target IP address for virtual hosts using the specified wordlist.

You can also specify the HTTP headers to use in the request using the -H option. For example, to specify the Host header, you can use the following command:

gobuster vhost -u http://10.10.10.10 -w /usr/share/wordlists/hosts.txt -H "Host: example.com"

This command will scan the target IP address for virtual hosts using the specified Host header.

Customization

Gobuster is highly customizable, and you can configure it to fit your specific needs. You can customize the tool by using various options and flags that are available.

Some of the common options and flags that you can use to customize Gobuster include:

  • -e: URL encode the input values

  • -f: show full URLs instead of just the path

  • -k: skip SSL certificate verification

  • -l: show the length of the response body

  • -n: do not print status codes of responses

  • -o: specify an output file for the results

  • -p: specify the proxy to use for requests

  • -q: suppress all output except for the results

  • -s: specify the HTTP status codes to include in the results

  • -x: specify file extensions to search for

You can find a complete list of options and flags in the Gobuster documentation.

Conclusion

In this course, you have learned how to use Gobuster to perform web content discovery and reconnaissance. You have learned how to perform directory and file enumeration, subdomain enumeration, and virtual host discovery. You have also learned how to customize Gobuster to fit your specific needs.

Gobuster is a powerful tool that can help you identify hidden files, directories, and subdomains on a web server. However, it is important to use this tool ethically and legally, and to obtain proper authorization before performing any scans.

Last updated