Giter Club home page Giter Club logo

nowildcards's Introduction

nowildcards

So you've got a big list of FQDNs from your passive dns, subdomain discovery, and certificate mining efforts, but 99% of them are from wildcard resolution?

Yes they could all be amazingly useful, but sometimes you really want to trim anything from wildcard resolution away.

This script does that for you.

Usage

python3 nowildcard.py -h
usage: nowildcard.py [-h] [-v] [-t THREADS] [-c CHUNKSIZE] -o OUTPUT [-i ITERATIONS] [-T TIMEOUT] dnslist

positional arguments:
  dnslist               A text file containing a newline separated list of domain names

options:
  -h, --help            show this help message and exit
  -v, --verbose         use -v for normal verbosity, -vv for more verbosity, up to -vvvv
  -t THREADS, --threads THREADS
                        Number of threads
  -c CHUNKSIZE, --chunksize CHUNKSIZE
                        Work chunk size (the number of FQDNs allocated to each thread)
  -o OUTPUT, --output OUTPUT
                        Output file path
  -i ITERATIONS, --iterations ITERATIONS
                        Number of times to check each FQDN
  -T TIMEOUT, --timeout TIMEOUT
                        Timeout for DNS resolution in seconds

Approach

For each FQDN in the input file

  • Do not process FQDNs with invalid characters
  • Do not process FQDNs with less than a single .
  • Intelligently handle the TLD portion of the FQDN
  • query (A and AAAA, follow CNAMES) the FQDN
  • query (A and AAAA, follow CNAMES) an unlikely to resolve sibling FQDN
  • compare result
  • if they match, consider it a wildcard and ignore it
  • if they don't match, consider it a standard resolution and output it

Features

  • Threading
  • Exception handling
  • Caching

Limitations

Due to things like round-robin DNS and the occasional failure there will be false positives, that is, some wildcard FQDNs will make it into the output. It is recommended to re-run the process a few times on the output to clean up the false positives. Repeat until you are satisfied.

nowildcards's People

Stargazers

dimey avatar Matt Watson 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.