VTsubs is a command-line tool designed to enumerate subdomains for a given domain using the VirusTotal API. This tool is useful for penetration testers, security researchers, and anyone interested in identifying subdomains associated with a domain, leveraging the powerful VirusTotal API.
- Subdomain Enumeration: Discover subdomains for a given domain by querying the VirusTotal API.
- VirusTotal API Key Integration: Authenticate requests using your personal VirusTotal API key.
- Output to File: Export the discovered subdomains into a text file.
- User-Friendly Output: Easy-to-read, colored output showing the found subdomains.
To use VTsubs, you need the following:
- Rust: The programming language used for development. Install it from rust-lang.org.
- VirusTotal API Key: Obtain an API key from VirusTotal to authenticate API requests.
If you don't have Rust installed, you can install it using the following command:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shAfter installation, reload the environment:
source $HOME/.cargo/env-
Clone the repository:
git clone https://github.com/ahmedhamdy0x/VTsubs.git cd VTsubs -
Build the project:
Ensure you have Rust installed, then run:
cargo build --release
-
Install Dependencies:
Ensure that all dependencies are correctly installed by running:
cargo build
This will create the executable in the
target/release/directory. -
Add VTsubs to Your System PATH:
Move it to
/usr/local/bin/to make the tool globally accessible:sudo cp target/release/VTsubs /usr/local/bin/
-
Make VTsubs Executable:
Ensure that the tool is executable:
sudo chmod +x /usr/local/bin/VTsubs
To run the tool and enumerate subdomains for a domain, use the following syntax:
VTsubs -d <DOMAIN> -a <API_KEY> -o <OUTPUT_FILE>-dor--domain(required): The target domain (e.g.,example.com).-aor--api(required): Your VirusTotal API key.-oor--output(optional): The output file where the subdomains will be saved. Default isoutput.txt.
VTsubs -d example.com -a 4f7be9aaa6ad6421cd64b66d3e30f1b7ad651cbebe4d450b293509e21401e548 -o subdomains.txtThis command will retrieve all the subdomains for example.com using your VirusTotal API key and save them to subdomains.txt.
Upon execution, the output will display the discovered subdomains in the terminal:
__ _________ _
\ \ / |__ __| | |
\ \ / / | |___ _ _| |__ ___
\ \/ / | / __| | | | '_ \/ __|
\ / | \__ | |_| | |_) \__ \
\/ |_|___/\__,_|_.__/|___/
Author: @ahmedhamdy0x
YouTube: Gentil Security
Version: 0.1.0
Domain: example.com
API Key: YOUR_API_KEY
Output File: subdomains.txt
[+] Found Subdomain: https://community.example.com
[+] Found Subdomain: https://admin.example.com
[+] Found Subdomain: https://shop.example.com
...The discovered subdomains will also be written to the specified output file (subdomains.txt).
This project is licensed under the MIT License - see the LICENSE file for details.
- VirusTotal API: Used for querying domain and subdomain information.
- Rust: The programming language used to develop this tool.
- Ahmed Hamdy
