Git Product home page Git Product logo

subsnipe's Introduction

Go Version Docker Image Size

SubSnipe ๐Ÿš€โšก

SubSnipe is a multi-threaded tool designed to help finding subdomains that are vulnerable to takeover. It can be used in two different ways:

  1. Provide a domain as input and the tool then searches crt.sh to search for known subdomains
  2. Provide the path to a file that already contains subdomains

Next, Subsnipe queries for each subdomain if it has a CNAME record. If so, we try to fingerprint it and check if the top-level domain of the CNAME is known to be vulnerable to subdomain takeover. The fingerprinting logic leverages https://github.com/EdOverflow/can-i-take-over-xyz.

Say we find that test.someapp.com has a CNAME to abcd1234.azurewebsites.net. Since azurewebsites.net domains can potentially be leveraged for subdomain takeover, SubSnipe flags this as a domain that is generally exploitable. Of course, for this to be a vulnerability, you need to be able to register abcd1234.azurewebsites.net, so as a next step, you need to verify if this domain is available to for you to register.

In the last step, SubSnipe tries to do this for you by checking if the CNAME, e.g. abcd1234.azurewebsites.net, can actually be taken over. If it could verify that the domain can very likely be taken over, it tags the domain with Takeover Likely Possible! in the output.md.

Built-in Help ๐Ÿ†˜

Help is built-in!

  • subsnipe --help - outputs the help.

How to Use โš™

SubSnipe identifies potentially take-over-able subdomains

Usage:
  subsnipe [flags]

Examples:
./subsnipe -d test.com
./subsnipe -d test.com --threads 50
./subsnipe -f subdomains.txt

Flags:
  -d, --domain string       The domain to query for subdomains
  -h, --help                Help for SubSnipe
  -f, --subdomains string   Path to the file containing subdomains to query (subdomains are separated by new lines)
  -t, --threads int         Number of concurrent threads for CNAME checks (default 30)

Setup โœ…

  • You can install the tool via go install github.com/dub-flow/subsnipe@latest
  • You can simply run this tool from source via go run .
  • You can build the tool yourself via go build
  • You can also build the docker image yourself via docker build . -t fw10/subsnipe

Run via Docker ๐Ÿณ (Only 1 Command!)

  1. Traverse into the directory where you want the output.md to be stored to
  2. Run docker run -it --rm -v "$(pwd):/app/output" fw10/subsnipe [flags]

Note that the docker version of the app is very slow at the moment (which I presume is related to network latency when doing all the DNS lookups).

Run Tests ๐Ÿงช

  • To run the tests, run go test or go test -v (for more details)

Example Output ๐Ÿ“‹

### Is Exploitable

- CNAME for blablub.test.com is: blablub.cloudapp.azure.com. (found matching fingerprint - vulnerable)
- CNAME for mail.test.com is: mail.azurewebsites.net. (found matching fingerprint - vulnerable)
- CNAME for static.test.com is: static-test.azureedge.net. (found matching fingerprint 'vulnerable') -> `Takeover Likely Possible!`

### Not Exploitable

- CNAME for *.test.com is: test-loadbalancer.us-east-1.elb.amazonaws.com. (found matching fingerprint - safe)

### Exploitability Unknown

- CNAME for map.test.com is: test-map.lync.com.

Releases ๐Ÿ”‘

  • The Releases section contains some already compiled binaries for you so that you might not have to build the tool yourself
  • For the Mac releases, your Mac may throw a warning ("cannot be opened because it is from an unidentified developer")

Bug Reports ๐Ÿž

If you find a bug, please file an Issue right here in GitHub, and I will try to resolve it in a timely manner.

subsnipe's People

Contributors

dub-flow avatar wullsnpaxbwzgydyyhwtkkspeqoayxxyhoisqhf avatar

Stargazers

Script bbygrl avatar  avatar  avatar Andrew H avatar  avatar  avatar  avatar Alex avatar Jason Stangroome avatar Tertius Stander avatar Erin McKean avatar  avatar Leo Reading avatar Jรฉrรฉmy avatar  avatar  avatar Daniel Tikamori avatar m4lwhere avatar  avatar  avatar orion120 avatar  avatar Erik Rose avatar  avatar 5H3PH3RD avatar Jacob avatar techris avatar  avatar Andrew Debnar avatar Christopher Massey avatar Arsen Darakdjian avatar Noah Halstead avatar Thomas B. avatar Nicholas Santiago avatar  avatar Achmad Adhikara avatar  avatar  avatar Daryl Galvez avatar Anuj Rawat avatar  avatar Aaditya Purani avatar  avatar Sascha Brendel avatar  avatar Ayman Zerda avatar  avatar

Watchers

 avatar  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.