Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

hash3liZer/Subrake

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

213 Commits
213 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

subrake
Subrake ๐Ÿฆ…

A DNS automated scanner and tool (Zone Transfer, DNS Zone Takeover, Subdomain Takeover).

... platform: linux Python: 3 lisence

subrake

Background ๐Ÿ“ˆ

Subrake, initially started as a personal project of mine for subdomain enumeration is a now a detailed DNS scanning tool that can help you identify Zone Transfers, DNS Zone Takeover and Subdomain Takeovers all in a single go.

Zone Transfers have been there for years now and if enabled for some reason on a domain can allow another party to enumerate all the records from the Zone. They are actually used when the owner is to tranfer domain from one provider to another.

Subdomain Takeover unlike it sounds is the takeover of the service that the subdomain is pointing to. The service needs to be stale or not in use.

DNS Zone Takeover as compared to Subdomain Takeover can be more severe if exploited. It is the takeover of one of the zones of the domain. This allows much more than just creating the service on the backend. You can actually setup your own DNS records and play with them as you line

For more in-depth detail, you can read my blog here: A Guide to Zone Transfer, DNS Zone Takeover and Subdomain Takeover

About Subrake ๐Ÿ’ฐ

Subrake is DNS Assessment tool (mostly automated) with both a UI and CLI goes trough various phases in order to cover DNS issues. The tool is continuously undergoing changes and development and everybody is welcome to contribute to the project.

It was designed primarily for bug bounty and infosec industry but can be leveraged for blue teaming and internal pentests as well. It supports both a CLI and Web Based GUI Interface and supports multiple installation modes. The key features are:

Features โš–๏ธ

  • โš™๏ธ All in one automated solution. Its working cycle is:
    • ๐Ÿช™ DNS Enumeration (DNS Records)
    • ๐Ÿชœ Zone Transfer Detection and enumerate records if enabled
    • ๐Ÿ’ฒ DNS Zone Takeover Detection
    • ๐Ÿ’ด False Positive Detection (Wildcard subdomains)
    • ๐Ÿ’ถ Getting results from other tools (Sublist3r, Knock.py)
    • ๐Ÿ’ท Bruteforce using wordlists (Can work with multiple wordlists)
    • ๐Ÿ’ต Get 5 parameters for each subdomain (HTTP Codes, Resolution, Headers, CNAME, Ports)
    • ๐Ÿ’ฐ Detect Subdomain Takeover
  • ๐Ÿ›’ Support for external tools. You can add your own functions.
  • ๐Ÿ›๏ธ Automated and Manual Mode.
  • ๐Ÿ—„๏ธ Can run concurrent sessions.
  • ๐Ÿ–ผ๏ธ UI for Reports and results available in csv format.
  • ๐Ÿ›Ž๏ธ Flexible and Fast.

Execution

subrake.webm

Installation ๐Ÿ’พ

You can setup subrake by an automated mode or by manually cloning the repo and install through setuptools. The first provides more control and is flexible with a UI. But if you prefer a simple CLI mode or on windows, go through the manual section.

Clone the repo and jump into it:

$ git clone https://github.com/hash3liZer/Subrake.git
$ cd ./Subrake

Automated Setup ๐Ÿ› ๏ธ

You can setup subrake through vagrant (with KVM) where a machine will be spawned and everything will be automatically setup. Install the requirements first:

$ apt update
$ apt install -y qemu qemu-kvm libvirt-daemon libvirt-clients bridge-utils virt-manager vagrant vagrant-libvirt

Then inside the repo, run vagrant up:

$ vagrant up

This will take a while to provision the server. After done, you will receive the URL: http://127.0.0.1:9090

image

The default credentials are: subrake/password. You can change them during provisioning as well:

$ SUBRAKE_USERNAME="username" SUBRAKE_PASSWORD="password" vagrant up

After done, you can manage the state of your newly created machine through these commands:

# See the machine status
$ vagrant status

# Suspend the machine
$ vagrant suspend

# Resume machine
$ vagrant resume

# Shutdown machine
$ vagrant halt

# Start back
$ vagrant up

# Delete the machine
$ vagrant destroy

Manual Setup ๐Ÿช›

With the manual setup, you can directly jump into directory and the setuptools for installation

Install the requirements and run setup.py:

$ pip3 install -r requirements.txt
$ python3 setup.py install

Verify if subrake is installed or not:

subrake --help

Docker ๐Ÿณ

You can also build the docker image from Dockerfile:

$ docker build -t subrake:latest .

Verify the docker container:

$ docker run --rm subrake --help

Deployment ๐Ÿšฉ

You can deploy the script on a baremetal server as well. To do so, get a fresh ubuntu 20.04 server up and running and run the following command:

$ chmod +x ./installer.sh
$ ./installer.sh --deploy

The server is then accessible at: 0.0.0.0:9090. You can setup an nginx service and use it s a reverse proxy.

Usage ๐Ÿ’ฌ

User Interface ๐Ÿ”ณ

With the UI, you can directly jump to the Subtap a Domain page and run a scan. Expect a couple questions for the scan:

image

The scan is launched inside a tmux session. You can press CTRL+E => d to exit the running screen and launch a new scan. Also, to pause the screen and move up and down, you can press CTRL+E => [. Its just TMUX shortcuts with the global bind key changed to CTRL+E.

You can also jump back to a running screen by entering its name again:

image

Reports

image

Scan Results

image

Command line ๐ŸŸฐ

On command line, you an directly access the tool by typing subrake. Here are a couple example of using subrake:

A simple run with default options:

$ subrake -d google.com

Subrake with Multiple Threads:

$ subtake -d google.com -t 50

Subrake with modules and a wordlist:

$ subrake -d google.com --wordlists SecLists/Discovery/DNS/namelist.txt

Subrake with OSINT results + Multiple SecLists subdomains list:

Note: Subdomains with similar names will automatically be filtered and counted as 1

$ subrake -d google.com --wordlists SecLists/Discovery/DNS/namelist.txt,SecLists/Discovery/DNS/dns-Jhaddix.txt

Subrake without search engine + Output from multiple tools combined + IP Filtering (Note that you can integrate your tools into subrake):

$ domain="google.com"
$ subfinder -d $domain -nW -o $domain/1.txt && sublist3r -d $domain -o $domain/2.txt && cat $domain/* >> /tmp/output.txt
$ subrake -d $domain -w tmp/output.txt --filter --skip-search

Subrake with Port Scanning:
NOTE: The port 80,443 will be scanned by default for every host under HTTP/HTTPS banner. So, there's no need to specify them here

$ subrake -d google.com --ports 8080,8443,8000,23,445

Manual ๐Ÿ“‘

image

ToDo LIST ๐Ÿ“œ

Feel free to open pull requests and a feature. You can contribute by:

  • Add more vulnerable services. Currently 10
  • Improve Insatllation script.
  • Add GUI Mode
  • Add Docker support.

Get me at โ˜Ž๏ธ

About

๐Ÿš€ A DNS automated scanner and tool ๐Ÿ–ฑ๏ธ (Zone Transfer, DNS Zone Takeover, Subdomain Takeover).

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Morty Proxy This is a proxified and sanitized view of the page, visit original site.