AUTOOUES is a powerful and automated Bash script designed to identify potential subdomain takeover vulnerabilities. It streamlines the process by first enumerating all subdomains for a given target, then performing intelligent CNAME record checks, and finally leveraging the nuclei tool with specialized templates for deeper validation on potentially vulnerable targets. All scan results are neatly organized into a dedicated directory named after the target domain.
-
Automated Subdomain Enumeration: Discovers subdomains using
subfinder. -
Intelligent CNAME Analysis: Identifies CNAME records pointing to external services and checks if those services are unresolved or potentially available for registration (via
digandwhois). -
Targeted Nuclei Scanning: Automatically feeds potentially vulnerable CNAME targets to
nucleiusing specific subdomain takeover templates for precise validation. -
Organized Output: Creates a dedicated directory for each scan, saving all results (discovered subdomains, CNAME analysis, Nuclei findings) within it.
-
Interactive Menu: Provides an easy-to-use menu for initiating scans.
Before running AUTOOUES, ensure you have the following tools installed on your system. These are common tools in penetration testing environments like Kali Linux, but can be installed on most Linux distributions and macOS.
-
subfinder: For passive subdomain enumeration.-
Installation: Follow instructions on ProjectDiscovery/subfinder GitHub.
# If you have Go installed (recommended method) go install -v [github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latest](https://github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latest)Ensure
~/go/binis in your PATH.
-
-
dig: For DNS lookups (part ofdnsutilsorbind-utils).-
Installation (Debian/Ubuntu):
sudo apt update sudo apt install dnsutils
-
Installation (CentOS/RHEL):
sudo yum install bind-utils
-
Installation (macOS with Homebrew):
brew install dnsutils
-
-
whois: For querying WHOIS information.-
Installation (Debian/Ubuntu):
sudo apt update sudo apt install whois
-
Installation (CentOS/RHEL):
sudo yum install whois
-
Installation (macOS with Homebrew):
brew install whois
-
-
nuclei: For vulnerability scanning with templates.-
Installation: Follow instructions on ProjectDiscovery/nuclei GitHub.
# If you have Go installed (recommended method) go install -v [github.com/projectdiscovery/nuclei/v3/cmd/nuclei@latest](https://github.com/projectdiscovery/nuclei/v3/cmd/nuclei@latest)Ensure
~/go/binis in your PATH. -
Update Nuclei Templates (Crucial!): After installing
nuclei, always run this command to get the latest templates:Copy and paste this command into your terminal:
nuclei -update-templates
-
-
Clone the repository (once uploaded to GitHub) or download the script:
git clone [https://github.com/your-username/AUTOOUES.git](https://github.com/your-username/AUTOOUES.git) cd AUTOOUES(For now, you'll just copy the script content into a file.)
-
Make the script executable:
chmod +x auto_takeover_scanner.sh
Run the script without any arguments to enter the interactive menu:
./auto_takeover_scanner.shYou will be greeted with the tool's banner and a menu:
ββββββ βββ ββββββββββββ βββββββ βββββββ βββ βββββββββββββββββββ
βββββββββββ βββββββββββββββββββββββββββββββββ βββββββββββββββββββ
βββββββββββ βββ βββ βββ ββββββ ββββββ βββββββββ ββββββββ
βββββββββββ βββ βββ βββ ββββββ ββββββ βββββββββ ββββββββ
βββ ββββββββββββ βββ βββββββββββββββββββββββββββββββββββββββββββ
βββ βββ βββββββ βββ βββββββ βββββββ βββββββ ββββββββββββββββ
Automated Subdomain Takeover Scanner
--------------------------------------
Made by @ethical_kunal (Kunal Kumar)
Main Menu:
1. Scan a new domain
2. Exit
Enter your choice (1 or 2):
Choose option 1 and follow the prompts to enter your target domain.
You can also provide the target domain directly as a command-line argument for a one-time scan:
./auto_takeover_scanner.sh example.com(Replace example.com with your actual target domain.)
For each scan, a new directory will be created in the format yourdomain_com_scan_results (e.g., example_com_scan_results/). This directory will contain the following files:
-
yourdomain_com_discovered_subdomains.txt: A list of all subdomains found bysubfinder. -
yourdomain_com_cname_takeover_results.txt: Detailed output of the CNAME checks, including potential takeover flags and WHOIS information. -
yourdomain_com_potential_takeover_targets.txt: A temporary file listing only the CNAME targets identified as potentially vulnerable, used as input for Nuclei. -
yourdomain_com_nuclei_takeover_results.txt: The results from thenucleiscan, indicating confirmed subdomain takeover vulnerabilities.
This tool was created by:
@ethical_kunal (Kunal Kumar)
Contributions are welcome! If you have suggestions for improvements, new features, or bug fixes, please feel free to:
-
Fork the repository.
-
Create a new branch (
git checkout -b feature/YourFeature). -
Make your changes.
-
Commit your changes (
git commit -m 'Add some feature'). -
Push to the branch (
git push origin feature/YourFeature). -
Open a Pull Request.
This project is open-source and available under the MIT License.
Follow these steps to upload your auto_takeover_scanner.sh script and its README.md to a new GitHub repository.
Step 1: Create a New Repository on GitHub
-
Go to GitHub and log in to your account.
-
On the left sidebar, click on the "New" button (or the
+sign in the top right corner and select "New repository"). -
Repository name: Enter
AUTOOUES(or any name you prefer for your tool). -
Description (Optional): Add a short description, e.g., "Automated Subdomain Takeover Scanner".
-
Public/Private: Choose
Publicif you want others to see and use your tool, orPrivateif you want to keep it to yourself for now. -
Initialize this repository with:
-
DO NOT check "Add a README file" (we're creating our own).
-
DO NOT check "Add .gitignore".
-
DO NOT check "Choose a license" (we'll add it manually, or you can add it here if you prefer).
-
-
Click the "Create repository" button.
Step 2: Initialize a Local Git Repository
-
Open your terminal on your local machine.
-
Navigate to the directory where your
auto_takeover_scanner.shscript is located.cd /path/to/your/script/directory -
Create the
README.mdfile: Copy the content of this immersive into a new file namedREADME.mdin the same directory as your script.# You can use a text editor: nano README.md # Paste the content, then save and exit (Ctrl+X, Y, Enter for nano)
-
Initialize a new Git repository in your current directory:
git init
Step 3: Add and Commit Your Files
-
Add your script and README file to the staging area:
git add auto_takeover_scanner.sh README.md
(If you have other files you want to include, add them here too, e.g.,
git add .to add all files in the current directory.) -
Commit your changes:
git commit -m "Initial commit of AUTOOUES scanner"
Step 4: Connect to GitHub and Push
-
Go back to your GitHub repository page (the one you just created). You should see instructions under "Quick setup".
-
Copy the remote repository URL. It will look something like:
https://github.com/your-username/AUTOOUES.git -
Add the remote origin to your local repository:
git remote add origin [https://github.com/your-username/AUTOOUES.git](https://github.com/your-username/AUTOOUES.git)
(Replace the URL with the one you copied from your GitHub page.)
-
Push your local commits to GitHub:
git push -u origin main
(GitHub recently changed the default branch name from
mastertomain. Ifmaindoesn't work, trygit push -u origin master.) -
Enter your GitHub username and Personal Access Token (PAT) when prompted.
-
Note: GitHub no longer accepts passwords for Git operations. You need to create a Personal Access Token (PAT).
-
How to create a PAT:
-
Go to GitHub.com.
-
Click your profile picture (top right) ->
Settings. -
Scroll down to
Developer settings(left sidebar). -
Click
Personal access tokens->Tokens (classic). -
Click
Generate new token->Generate new token (classic). -
Give it a descriptive name (e.g., "Git CLI Token").
-
Set an expiration date.
-
Under "Select scopes," check
repo(full control of private repositories) and other scopes as needed. -
Click
Generate token. -
IMPORTANT: Copy the generated token immediately! You won't be able to see it again. Use this token as your password when prompted by
git push.
-
-
Step 5: Verify on GitHub
- Refresh your GitHub repository page. You should now see your
auto_takeover_scanner.shscript andREADME.mdfile listed there!
Congratulations! Your AUTOOUES tool is now live on GitHub.