sub404: check subdomain takeover vulnerability
Sub404: A Fast Tool To Check Subdomain Takeover Vulnerability
Sub 404 is a tool written in python which is used to check the possibility of subdomain takeover vulnerability and it is fast as it is Asynchronous.
Why
During the recon process, you might get a lot of subdomains(e.g more than 10k). It is not possible to test each manually or with traditional requests or the urllib method as it is very slow. Using Sub 404 you can automate this task in a much faster way. Sub 404 uses aiohttp/asyncio which makes this tool asynchronous and faster.
How it works
Sub 404 uses subdomains list from a text file and checks for url of 404 Not Found status code and in addition, it fetches CNAME(Canonical Name) and removes those URL which has target domain name in CNAME. It also combines results from subfinder and sublist3r(subdomain enumeration tool) if you don’t have target subdomains as two is better than one. But for this sublist3r and subfinder tools must be installed in your system. Sub 404 is able to check 7K subdomains in less than 5 minutes.
Key Features:
– Fast( as it is Asynchronous)
– Uses two more tool to increase efficiency
– Saves result in a text file for future reference
– Umm that’s it, nothing much!
How to use:
Note: Only works on Python3.7+
- git clone https://github.com/r3curs1v3-pr0xy/sub404.git
- Install dependencies: pip install -r requirements.txt
- Install Subfinder (optional)
- Install Sublist3r (optional)
Using docker
As an alternative, it is also possible to build a Docker image, so no prerequisites are necessary.
$ docker build -t sub404 . $ docker run --rm sub404 -h
Usage example:
Note: If subfinder and sublist3r are installed.
This combines results from the sublist3r and subfinder tool and checks for the possibility of a takeover.
$ python3 sub404.py -d anydomain.com
– If subfinder and sublist3r is not installed, provide subdomains in the text file
$ python3 sub404.py -f subdomain.txt
Note:
This tool is mostly tested in Linux but should works on other OS too.
Usage options:
$ python3 sub404.py -h
This will display help for the tool. Here are all the switches it supports.
Flag | Description | Example |
---|---|---|
-d | Domain name of the target. | python3 sub404.py -d noobarmy.tech |
-f | Provide the location of the subdomain file to check for takeover if the subfinder is not installed. | python3 sub404.py -f subdomain.txt |
-p | Set protocol for requests. The default is “http”. | python3 sub404.py -f subdomain.txt -p https or python3 sub404.py -d noobarmy.tech -p https |
-o | Output unique subdomains of sublist3r and subfinder to a text file. Default is “uniqueURL.txt” | python3 sub404.py -d noobarmy.tech -o output.txt |
-h | show this help message and exit | python3 sub404.py -h |
Note:
This tool fetches CNAME of 404 response code URL and removes all URL which have target domain in CNAME. So chances of false positives are high.
Copyright (C) 2020 Bipul Jaiswal