Git Product home page Git Product logo

subtko24h's Introduction

SubTko24h

A 24/7 subdomain takeovers finder that glues together some open source tools using bash.

Subdomain takeover is a type of vulnerability where the attacker gains total control of a subdomain. It can be used to chain other vulns (like XSS), for mass phishing campaigns (that's almost impossible for the user to detect), and some other things. You can read more about it here.

Content

This script is running in cloud using a basic droplet from digital ocean.

It costs me only $5 per month, checking a few tens subdomains per second (it can do more, but I don't think it's necessary since the same subdomain is checked about 3 times a day).

Does subdomain enumeration. Currently using:

Checks for possible subdomain takeovers using:

To keep things simple.

Doing that, I can run my tools in a much effective way by avoid typing the full command (e.g. cat subs-list | massdns -q -r $resolvers -s 1000 -o S | awk '{print $1}' | sed 's/\.$//g' | sort -u turns into cat subs-list | massdns).

Database

To organize and making it easy to acess/read the data, a mysql database (named "recon") is used with the following tables:

targets

(program VARCHAR(255) NOT NULL, domain VARCHAR(255) PRIMARY KEY)

Domains to perform subdomain enumeration.

data

(domain VARCHAR(255), subdomain VARCHAR(255) PRIMARY KEY, alive BOOLEAN DEFAULT 0, source VARCHAR(255) NOT NULL, modified TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, created TIMESTAMP DEFAULT CURRENT_TIMESTAMP)

Subdomains that will be tested for takeover.

takeovers

(url VARCHAR(255) PRIMARY KEY, service VARCHAR(255) NOT NULL, modified TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, created TIMESTAMP DEFAULT CURRENT_TIMESTAMP)

Possible takeovers found.

Usage

What I do it's running adrecon24h [quick|medium|full] alongside subtko24h to continuous enumerate subdomains and test them. (A friendly tip here, you can use screen to run more than one script at the same time with only one terminal)

If you don't want to use adrecon, you can enumerate subdomains in your way and add them to db with
cat {yourSubdomainsList} | addtodb subs.
But be aware that your list MUST have the following format each line: subdomain source [alive|dead]

subtko24h's People

Contributors

adiffpirate avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.