Giter VIP home page Giter VIP logo

regulator's Introduction

Project REGULATOR: Automated learning of regexes for DNS discovery

I had a lot of fun making this and I hope this project will change the way you see subdomain enumeration. The method explored here is highly effective and efficient.

With this said, it's not a silver bullet. Not every DNS zone performs well with this method. It fails when there are no latent text structures in the hostnames (ie. they are seemingly random) or you have limited observational data.

This project was developed primarily to showcase the power of regular language ranking via the dank (https://github.com/cramppet/dank) library. I wanted to show that the concept of ranking and using regexes as templates for fuzzing can work very well.

For more information see the blog post here: https://cramppet.github.io/regulator/index.html

Install

  1. pip3 install -r requirements.txt

Usage

  1. Run your subdomain enumeration tool of choice
  2. Supply the hostnames found to REGULATOR: python3 main.py <example.com> <hosts-file> <output-file>
  3. Use the learned rules to generate brute force guesses: make_brute_list.sh

Example

  1. python3 main.py adobe.com adobe adobe.rules
  2. make_brute_list.sh adobe.rules adobe.brute
  3. puredns resolve adobe.brute --write adobe.valid

Be advised that the discovered hosts will overlap with your original input data. You can deduplicate with:

  1. sort -u adobe.valid > 1 && mv 1 adobe.valid
  2. sort -u adobe > 1 && mv 1 adobe
  3. comm -23 adobe.valid adobe > adobe.final

regulator's People

Contributors

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