![Kali Linux:An Ethical Hacker's Cookbook(Second Edition)](https://wfqqreader-1252317822.image.myqcloud.com/cover/772/36698772/b_36698772.jpg)
How to do it...
Since GoBuster is built on Go, we first need to install Go on Kali:
- Do this by using the following command:
apt install golang
- First, we clone the Git repository from the following URL: https://github.com/OJ/gobuster. You will see the following output:
![](https://epubservercos.yuewen.com/E581D7/19470380608818806/epubprivate/OEBPS/Images/d04275eb-060a-4b40-bf93-d0f84e27d522.png?sign=1738845037-JFpugSyTROEjNFbVuSdmAHZoojNCqyHX-0-9ec6b3b9ce8a5e20fd6fbabe0c5d45fc)
- Now, browse into the directory and pull the external dependencies before building the binary using the following command:
go get -u github.com/OJ/gobuster && go build
The following screenshot shows the output of the preceding command:
![](https://epubservercos.yuewen.com/E581D7/19470380608818806/epubprivate/OEBPS/Images/ac78420d-2fa6-4790-81e7-9f2a69fe45f7.png?sign=1738845037-vogCdeZfW3jgJEmEVBx4THgQTzEP0mkv-0-5fe47582e3d8ec28502c376abb3a7d01)
As we can see from the preceding screenshot, the build command completed successfully without any error.
- Now, run the help command and see what options are available for us to use:
![](https://epubservercos.yuewen.com/E581D7/19470380608818806/epubprivate/OEBPS/Images/3ed0ac06-f97d-4edd-b3cf-50c90deb38d9.png?sign=1738845037-ryjKUIOJMKwIwO0DmLyMJL7FSGOnv4lx-0-6c36be976395fb4d40471cc5717a7b22)
Gobuster has lots of features such as brute forcing directories that are behind HTTP authentication, setting a custom user-agent, and so on. Let's try it.
By default, Gobuster needs a wordlist. We can use the -w flag to specify a list and -x to specify the extension of the file we are trying to brute force:
./gobuster -x php -u "http://testphp.vulnweb.com/" -w /usr/share/wordlists/dirbuster/directory-list-2.3-small.txt
The following screenshot shows the output of the preceding command:
![](https://epubservercos.yuewen.com/E581D7/19470380608818806/epubprivate/OEBPS/Images/2d5f9b0c-49e5-43d5-bf50-5a6c5227e87a.png?sign=1738845037-1kvKpVqBeIIVyfR2npmM1Q2QX6EXn3jM-0-c31cdbbaacd250c0165931cf1bd539a3)
As we can see in the preceding screenshot, the tool successfully starts brute forcing and returns the page responses for everything it finds.