Giter VIP home page Giter VIP logo

dnsmap's Introduction

ABOUT

Pydnsmap analyzes relations (mappings) between queried FQDN and IP addresses hosting them for detecting malicious Internet activity. It uses DNS data as input and produces as output (i) a list of suspicious mappings and (ii) a graph of suspicious communities of FQDNs and IP addresses.

The definition of 'suspicious mapping' depends on the configuration of the first analysis stage (see config.py). The definition of 'suspicious community' depends on the analysis parameters set via the (simple) analysis GUI (see dnsmapGUI.py).

INSTALL

NOTE: these tools have been exclusively tested on Linux using Python 2.7.

The following python modules are required: numpy, scipy, netaddr, python-levenshtein

Download the latest AsNum database (GeoIPAЅNum.dat) from http://www.maxmind.com/en/asnum and save it to the /data directory.

RUNNING

  1. Adapt config.py (see inline comments).

By default, pydnsmap reads DNS data from a FIFO. Create a FIFO using 'mkfifo my_fifo'. Then, write your data to this FIFO. Pydnsmap expects lines of text following this format:

Note: the client ID is currently not used, just add arbitrary placeholder instead.

  1. Run 'python pydnsmap.py'. This should create a subdirectory (as specified in config.py) where the following files are written: (i) a log file (by default, it's called pydnsmap.log); (ii) a file called 'suspicious.txt', containing all suspicious domain-ip mappings that were found; (iii) a file that contains the final DNSMap in Python's pickle format. this is written just before the tool terminates, unless this has been deactivated in config.py

  2. Run 'python dnsmapGUI.py'. This allows you to load suspicious.txt, filter the records therein, explore the resulting mapping graph, and export the final list of malicious domains and IPs to a text file.

Note: the whitelist entries are regular expressions. Directly edit whitelist.txt (or use the GUI) to modify the whitelist.

The results can be exported to a graph in GEXF format. Gephi (www.gephi.org) is recommended for viewing/manipulating the graph.

dnsmap's People

Contributors

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