Giter VIP home page Giter VIP logo

domain-scanner's Introduction

banner

A node utility to scan a domain with various techniques.

Installation

$ npm install domain-scanner

Usage

The usage is simple, just pass to the scanner the domain you want to scan and some options, than wait for the response:

const domainScanner = require('domain-scanner');

const options = {
  deep: false,
  sections: [],
  exclude: [],
  keys: {
    hunterio: '<api-key>',
    google: '<api-key>',
    virustotal: '<api-key>'
  }
};

domainScanner('codekraft.it', options, (err, results) => {
  console.log(results);
});

Options

sections

An array with the names of the sections you want to scan, leave empty to scan all sections. Available sections are:

  • details: Will perform some system based evaluations against the domain.
  • emails: Will scan the domain looking for known emails with node-emailhunter
  • breaches: Will check the HaveIBeenPwned database against the domain
  • certificate: SSL Certificate test and verification using node-ssllabs talking with SSL Labs API
  • robots: Will scan the domain robots.txt file with robots-parse
  • subdomains: Will enumerate all hostname subdomains using subquest
  • threats: Will scan the domain using Google Safe Browsing API looking for known threats
  • virustotal: Will scan the domain using Virus Total APIv2 on domain/report endpoint
  • tld: Will scan all the other root TLDs possibilities for a given domain
  • typosquotting: Perform various typosquotting techniques and collect results
  • archived: Lookup the site using Wayback Machine API looking for archived pages
  • ctl: Find subdomains by abusing Certificate Transparency logs
  • tags: Will scan the domain's tracking code footprint with tag-recon to discover connections with other affiliated websites
const options = {
  sections: [
    'details',
    'emails',
    'breaches',
    'certificate',
    'robots',
    'subdomains',
    'threats',
    'virustotal',
    'tld',
    'typosquotting',
    'archived',
    'ctl',
    'tags'
  ]
};

exclude

An array of sections to exclude from the tasks of the scanner:

const options = {
  exclude: ['emails']
};

keys

An object with the API keys for the services involved in the scan. For example to use Hunter.io API:

const options = {
  keys: {
    hunterio: '<api-key>',
    google: '<api-key>',
    virustotal: '<api-key>',
    spyonweb: '<api-key>'
  }
};

Possible keys for now: hunterio, google, virustotal, spyonweb

deep

Perform additional tasks for the gathered results. For example test resulting emails with node-pwned for breaches, or testing nested domain details informations.

const options = {
  deep: true
};

Looking for the cli tool?

If you want to use it from the command line as a cli tool you have to download domain-scanner-cli module.

$ npm install -g domain-scanner-cli

Contributing

  1. Create an issue and describe your idea
  2. Fork the project (https://github.com/b4dnewz/domain-scanner/fork)
  3. Create your feature branch (git checkout -b my-new-task)
  4. Commit your changes (git commit -am 'Add some task')
  5. Write some test (npm run test)
  6. Publish the branch (git push origin my-new-task)
  7. Create a new Pull Request

License

MIT © b4dnewz

domain-scanner's People

Contributors

daehee avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

domain-scanner's Issues

Add a typosquatting task

Add a typosquatting with sub tasks like bitsquatting and stuff...

Test string: amazon.com

Typosquatting subtasks:

Omission: missed 1 character from typing es - amzon.com
Repetition: double hit on character es - amaazon.com
Homoglyphs are characters with different meanings, that look similar/identical to each other - like the digit '0' and the capital letter 'O' for example.
Example: A Α А Ꭺ ᗅ ᴀ ꓮ A 𐊠 𝐀 𝐴 𝑨 𝒜 𝓐 𝔄 𝔸 𝕬 𝖠 𝗔 𝘈 𝘼 𝙰 𝚨 𝛢 𝜜 𝝖 𝞐

Dinamic tasks loader

Allow the tasks (or files) to be dynamically loaded into script and used, also ensure the same arguments get passed to all functions.

Alternative email addresses gathering method

Right now the only supported method for email gathering is through Hunter.io API but this requires to be registered and have a valid API key which has usage limits and fees for non-basic use.

It could be useful to gather emails using search engines (google, bing, ...) looking for common email pattern and extracting from results, for example as it's done in m4ll0k/Infoga package which uses various free techniques to gather as much emails as possible.

This should be the default method used in email gathering task and eventually extended with Hunter.io API for more precise and reliable results.

Add domain reputation/threats check

This test will check a domain or URL for phishing and malware issues against the Google Safe Browsing and PhishTank lists. You can use this tool to verify if a domain or URL is suspected of containing malicious code, harmful programs, or is a suspected phishing site.

Safe Browsing

For every MX record found get details

The normal (dns) details scan should produce more data, for every mx record found it should perform a search and get IP (all of them) and maybe position or more data.

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.