What is Gobuster?
Gobuster is a brute-force scanner tool to enumerate directories and files of websites. It will also assist in finding DNS subdomains and virtual host names. Gobuster is written in the Go programming language and is designed to function similarly to other tools like Dirbuster. Go is a very fast language and can be used in a command-line interface. A brute-force technique is a trial-and-error method of finding an answer to a solution. This innately means Gobuster is a “loud” enumerator that can be more easily detected by an Intrusion Detection System (IDS). Gobuster will not recursively enumerate directories, so it’s a good idea to run Gobuster again on any discovered directories. Overall, Gobuster is an excellent tool for enumerating web applications at the beginning of a pentest.
How to Install in Linux OS
First, we need to install the tool itself.
sudo apt install gobuster
Our next step is to get the dictionaries that we will use to populate our enumeration.
sudo apt-get install seclists
Using Gobuster
gobuster -h
We will examine the options that we can use with Gobuster. We can use the dir (directory or file), dns (subdomain), s3 (aws bucket), fuzz, or vhost options to define what scanner type we will use.
The next options are to choose the flags we will use to further define our scanner.
DIR mode
gobuster dir -u <url> -w <wordlist.txt> -x <file_extensions>
Example: gobuster dir -u abrictosecurity.com -w /usr/share/dirbuster/wordlists/directory-list-2.3-medium.txt -x php,php3, html
DNS mode
DNS mode is used to enumerate subdomains. -d is the identifiable target domain. -w is the wordlist that we will use to define our possible subdomain name list. -i will show the IP address. –wildcard allows parameters to continue even if there is a Wildcard DNS. This means a result will post, even if the results are from the same IP address.
gobuster dns -d <domain> -w <wordlist.txt> -i --wildcard
example: gobuster dns -d abrictosecurity -w /usr/share/wordlists/subdomains/top5000subdomains -i –wildcard
VHOST mode
gobuster vhost -v -u <url> -w <wordlist.txt> -o <output_file.txt>
example: gobuster vhost -v -u https://abrictosecurity.com -w /usr/share/wordlists/subdomains/top5000subdomains -o vhostlist.txt
S3 Mode
gobuster s3 -w <wordlist.txt>
example: gobuster s3 -w /usr/share/wordlists/s3_bucket_masterlist
Other Useful Flags
-e : completes printing the URL from enumerated directories
-n : will print results without the status code
-k : skip SSL verification
-t : assign the number of threads that will be used during enumeration
-r : allows redirection from one HTTP request to another
-p : allows proxy URLs to be used for requests on port 1080. This port can be changed in the URL.
-timeout : allows a timeout parameter to be set
-U <username> -P <password> : define a username and password for basic HTTP authentication mechanisms
References:
Special thanks to OJ Reeves for the amazing tool. Please visit his Github at https://github.com/OJ
The Gobuster tool Github can be found at https://github.com/OJ/gobuster
No comments:
Post a Comment