The alterx is a command line tool for generating subdomains to find potential subdomain misconfigurations or vulnerabilities. During a penetration test, security testers can use alterx to create variations of subdomain to discover hidden resources. This tutorial explains how to install alterx on Ubuntu 24.04.
Install alterx
Get the latest version of alterx release from GitHub and assign it to variable:
ALTERX_VERSION=$(curl -s "https://api.github.com/repos/projectdiscovery/alterx/releases/latest" | grep -Po '"tag_name": "v\K[0-9.]+')
Run the following command to download archive file from releases page:
wget -qO alterx.zip https://github.com/projectdiscovery/alterx/releases/latest/download/alterx_${ALTERX_VERSION}_linux_amd64.zip
Extract executable from archive file to /usr/local/bin
directory:
sudo unzip -q alterx.zip -d /usr/local/bin alterx
We can check alterx version as follows:
alterx --version
Remove unnecessary file:
rm -rf alterx.zip
Testing alterx
To use alterx, run it from the command line with specific options for domain alteration. For example, the command:
alterx -l example.com -silent -limit 10 -pattern "{{word}}.{{suffix}}"
-l
- specifies the base domain for generating variations.-silent
- runs the tool without verbose output.-limit
- limits the output to a specific number of variations.-pattern
- defines the pattern for variations.
Output example:
qa.example.com
market.example.com
faq.example.com
private.example.com
role.example.com
lab.example.com
live.example.com
shop.example.com
builds.example.com
administrator.example.com
Uninstall alterx
If you want to completely remove alterx, delete the related file:
sudo rm -rf /usr/local/bin/alterx
We can also remove alterx configuration directory:
rm -rf ~/.config/alterx
Leave a Comment
Cancel reply