Installation of Haktrails in Kali Linux
Step 1: If you have downloaded Golang in your system, verify the installation by checking the version of Golang, use the following command.
go version
Step 2: Get the Haktrails repository or clone the Haktrails tool from Github, use the following command.
sudo go get github.com/hakluke/haktrails
Step 3: Copy the Haktrails tool in the bin directory so we can easily use the tool without running the tool manually by golang, use the following command.
sudo cp /root/go/bin/haktrails /usr/local/go/bin/
Step 4: To get your API key, go to https://securitytrails.com/app/signup?plan=api-0 website and register your account. You will get your unique API key;
https://securitytrails.com/app/signup?plan=api-0
Step 5: Make mkdir ~/.config/haktools/ directory to insert API key required for running the tool, use the following command.
sudo mkdir ~/.config/haktools/
Step 6: (Setting Up the Config File) Create a haktrails-config.yml file in which the API key will be inserted, use the following command.
sudo mousepad ~/.config/haktools/haktrails-config.yml
Step 7: Verify whether haktrails is successfully configured or not, use the following command.
haktrails
Step 8: Verify if your API key is properly inserted or not, use the following command.
haktrails ping
If you get this {“success”:true} response then your key is configured properly.
HakTrails – Subdomain Recon Tool for bug bounty
Haktrails tool is a Golang language-based tool used for querying SecurityTrails API data. Security Trails sponsor the Haktrails tool. Haktrails is an excellent tool for reconnaissance. The primary purpose of this tool is for subdomain enumeration, but you can work beyond this enumeration. Haktrails is designed in such a way that it can be chain easily with other tools. Being a Security Researcher, you can add this tool to your Bug Bounty Recon Bucket.
Note: As Haktrails is a Golang language-based tool, so you need to have a Golang environment on your system. So check this link to install Golang in your system – How to Install Go Programming Language in Linux