Giter Site home page Giter Site logo

jakejarvis / subtake Goto Github PK

View Code? Open in Web Editor NEW
142.0 7.0 32.0 26 KB

Automatic finder for subdomains vulnerable to takeover. Written in Go, based on @haccer's subjack.

License: Apache License 2.0

Go 77.80% Shell 22.20%
pentesting security infosec takeover subdomain go golang subdomain-takeovers bug-bounty

subtake's Introduction

subtake

Build Status

Based on @haccer's subjack script for subdomain takeover recon.

Installation

Requires Go.

go get github.com/jakejarvis/subtake

Usage

Options

  • -f to-check.txt is the path to your list of subdomains to check. One subdomain per line. Required.
  • -t is the number of threads to use. (Default: 10)
  • -a skips CNAME check and sends requests to every URL. (Default: false, but Highly recommended.)
  • -timeout is the number seconds to wait before timing out a check (Default: 10).
  • -o results.txt is a filename to output results to. If the file ends with .json, subtake will automatically switch to JSON format.
  • -v enables verbose mode. Displays all checks including not vulnerable URLs.
  • -c Path to file containing JSON fingerprint configuration. (Default: ./fingerprints.json)
  • -ssl enforces HTTPS requests which may return a different set of results and increase accuracy.

Resources

sonar.sh can be used first to gather a list of CNAMEs collected by Rapid7/scan.io's Project Sonar. This list can then be passed into subtake to return subdomains not in use. sonar.sh is based off of scanio.sh.

fingerprints.json can be modified to add or remove hosted platforms to probe for. Many obscure platforms are included, and removing fingerprints for services that are uninteresting to you can speed up the scan.

If you plan on using a high number of threads to speed the process up, you may need to temporarily raise the ulimit of your shell:

ulimit -a          # show current limit (usually 1024)
ulimit -n 10000    # set waaaaay higher
ulimit -a          # check new limit

After generating a list of all vulnerable subdomains, you can use my collection of domains invoked in bug bounty programs to narrow down valuable targets and possibly get some ca$h monie$$$.

Examples

./sonar.sh 2018-10-27-1540655191 sonar_all_cnames.txt

subtake -f sonar_all_cnames.txt -t 50 -ssl -a -o vulnerable.txt

Subdomain Takeover Tips

Services Checked

  • Amazon S3
  • Amazon CloudFront (no longer vulnerable?)
  • Microsoft Azure
  • Heroku
  • GitHub Pages
  • Fastly
  • Pantheon.io
  • Shopify
  • Tumblr
  • WordPress.com
  • Ghost
  • Surge
  • Statuspage
  • Bitbucket Pages
  • UserVoice
  • Zendesk
  • Brightcove
  • Big Cartel
  • Acquia
  • ReadMe.io
  • MaxCDN
  • Apigee
  • Smugmug

To-Do

  • Integrate sonar.sh into the main Go script as an option instead of input file.
  • All-in-one Docker image to automatically download the latest FDNS Project Sonar file and check for takeover possibilities.
  • Have sonar.sh pull domains to check for from fingerprints.json, instead of hard-coding them.

subtake's People

Contributors

jakejarvis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

subtake's Issues

NXDOMAIN check provides inconsistent results

Whilst performing checks against a list of subdomains i am getting inconsistent results for the NXDOMAIN check on azure based services.

Sometimes the results are correct in identifiying NXDOMAIN and other times the results contain false positives.

The false positives are confirmed with a quick DIG check with some of the results reporting NOERROR.

Each successive scan produces slightly different results.

I have confirmed this by reducing the fingerprints.json to contian only the azure services info with NXDMAIN set to true and performing scans in succesion.

./subtake -f '/root/subdomains.txt' -t 50 -c '/root/fingerprints_azure.json' -o '/root/vulnerable.txt'

I have tried with both -a flags enabled and disabled both having a similar problem.

Is MaxCDN vulnerable?

I got some results point to netdna-cdn.com, which is manage by MaxCDN, and now StackPath,
I've checked the StackPath manage panel but can't find anywhere to claim the site, Is there any proof-of-concept or links useful for this please?

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.