/dnssinkholelist

dnssinkholelist is a python package focused on combining open source lists of malicious domains, dynamic dns domains, and advertisement domains that should be sinkholed/blocked.

Primary LanguagePython

dnssinkholelist

dnssinkholelist is a python package focused on combining open source lists of malicious domains, dynamic dns domains, and advertisement domains for use in a dns sinkhole on a bind server or /etc/hosts file.

Please Note

  • This is a script I used for a while for a bind server--- a lot needs cleaned up before you use it automatically to feed into bind or /etc/hosts. Consider it a work in progress. However, you can use it for a unique list of malicious/sinkhole domains from below.
  • Requires internet access for downloading domain lists listed below and Alexa database.

Requirements

  • Linux
  • Python 2.7
  • pip install -U requests[security] #Install requests security
  • pip install -U beautifulsoup4; #For HTML Parsing
  • pip install -U lxml; #For beautifulsoup4
  • pip install -U pyyaml; #For future config and whitelisting parsing
  • pip install -U argparse #For future CLI parsing
  • pip install -e git+https://github.com/neu5ron/domaininformation@master#egg=domaininformation #For download of Alexa database and filtering based on Alexa rank

Install

git clone https://github.com/neu5ron/dnssinkholelist.git

Usage

python2.7 DNSSinkholeList.py

Malware Lists

Additional lists not implemented

TODO List

  • Make unique/sorted domains into a function as a new one is added in the corresponding lists function... instead of at the end
  • Use python os commands for error checking and such
  • If anything returns no values then email or alert/log
  • Ability to choose between creating a host file or bind file..if bind then only get lowest level domain. if host file then keep as is (VIA CLI)
    • Test if bind directories exist and if not create them etc
    • Add variables for where bind files should be stored, like /use/share/bind folder thing (VIA CLI)
  • Use python logging instead of print and such
  • Option to exclude some whitelist / make it a yaml?
    • Implement WhiteList via a gist/github link that is auto updated like the other lists/feeds
    • Number each list, and add ability to disable list via the command line by specifying something like --disable-lists=1,2,3,4,5