Working with Haktrails Tool
The contents or the target domains are listed in the domains.txt file. In the below screenshot, the contents of domains.txt are shown.
Example 1: Gathering associated domains
“Gathering Associated Domains” is the term of getting just domains that are acquired or owned by the same company. We will gather all the associated domains for every specified domain in our domains.txt file.
cat domains.txt | haktrails associateddomains
Example 2: Gathering associated IPs
In this example, we will gather the IP addresses or IP ranges that are owned by the company. We will specify the domains list and find the IP addresses.
cat domains.txt | haktrails associatedips
Example 3: Ping
Ping attributes check whether our API key is working properly or not. If it’s having any problem then ping will return an error.
haktrails ping
Example 4: Getting historical DNS data
In this example, we will try to gather the important historical or past DNS (Domain Name System) data for the target domain or company.
cat domains.txt | haktrails historicaldns
Example 5: Getting company details
Getting detailed information about the company is very important. So in this example, we will try to get company details and explore the company more briefly.
cat domains.txt | haktrails company
Example 6: Getting domain detail
In this example, we will gather the details about the specified domain, which includes DNS records, Alexa ranking of the domain, and last seen time.
cat domains.txt | haktrails details
Example 7: Getting whois data
WHOIS data or records are very important while penetrating the domain. So to gather the whois data is also crucial work. So in this example, we will gather the Whois data of the domain. The output is shown in JSON format.
cat domains.txt | haktrails whois
Example 8: Getting domain tags
In this example, we will return the tags of a specific target domain.
cat domains.txt | haktrails tags
Example 9: Getting API Usage Data
In this example, we will return the information or usage data of API on our SecurityTrails Account.
haktrails usage
Example 10: Checking Your API Key
The following command will Ping SecurityTrails to check if your API key is working properly.
haktrails ping
Example 11: Showing Some Average ASCII Art
Banner is the creative art of showing the design of Tool. So in this example, we will use the banner to just show a fancy banner or ASCII Art
haktrails banner
Example 12: Getting Subdomains
Haktrails has the feature to gather the subdomains related to the target domain. So in this example, we will gather the subdomains for our domains.txt file
cat domains.txt | haktrails subdomains
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