Subfinder is an open-source command line tool for discovering subdomains associated with a target domain. It helps security researchers, penetration testers, and bug bounty hunters find potential attack vectors by identifying all the subdomains that belong to a given domain. This tutorial shows how to install Subfinder on Ubuntu 24.04.
Install Subfinder
Determine the current Subfinder version from its GitHub repository and assign it to a variable:
SUBFINDER_VERSION=$(curl -s "https://api.github.com/repos/projectdiscovery/subfinder/releases/latest" | grep -Po '"tag_name": "v\K[0-9.]+')
Download and place the archive into the /usr/local/bin
directory:
sudo wget -qO /usr/local/bin/subfinder.gz https://github.com/projectdiscovery/subfinder/releases/latest/download/subfinder_${SUBFINDER_VERSION}_linux_amd64.zip
Unpack the archive to retrieve the executable:
sudo gunzip /usr/local/bin/subfinder.gz
Apply executable rights to the specified file:
sudo chmod a+x /usr/local/bin/subfinder
Run this command to check which version of Subfinder is installed:
subfinder --version
Testing Subfinder
To use Subfinder, simply run it with the -d
option followed by the domain you want to scan:
subfinder -d google.com
The tool collects and outputs a list of discovered subdomains, which can be further used for security analysis. Output example:
_______ __/ /_ / __(_)___ ____/ /__ _____
/ ___/ / / / __ \/ /_/ / __ \/ __ / _ \/ ___/
(__ ) /_/ / /_/ / __/ / / / / /_/ / __/ /
/____/\__,_/_.___/_/ /_/_/ /_/\__,_/\___/_/
projectdiscovery.io
[INF] Current subfinder version v2.6.6 (latest)
[INF] Loading provider config from /home/adminer/.config/subfinder/provider-config.yaml
[INF] Enumerating subdomains for google.com
www.google.com
gds.google.com
mt0.google.com
...
[INF] Found 5872 subdomains for google.com in 23 seconds 262 milliseconds
Uninstall Subfinder
To uninstall Subfinder, remove the corresponding file:
sudo rm -rf /usr/local/bin/subfinder
You can also delete the Subfinder configuration directory:
rm -rf ~/.config/subfinder
Leave a Comment
Cancel reply