Threat Level: green Handler on Duty: Xavier Mertens

SANS ISC: DNS Sinkhole Scripts Fixes/Update - SANS Internet Storm Center SANS ISC InfoSec Forums

Sign Up for Free!   Forgot Password?
Log In or Sign Up for Free!
DNS Sinkhole Scripts Fixes/Update

In October 2011 [1], I released an update for the main parser script used to generate the BIND/PowerDNS configuration files. This release of the script contains some important fixes, including a rewrite of the section that parses the multiple sites into 2 separate lists: site_specific_sinkhole.conf (host web list) and entire_domain_sinkhole.conf (domain wildcard web list). The script contains new lists that were not part of the 7 July 2011 release.

The script contains a fix for parsing and loading records into PowerDNS database where sometimes it would fail indicating that a record was already loaded. It has been fixed in both the and (located in /usr/local/sbin) used in Webmin to load records from the GUI.

A new script, (/root/scripts) has been added to provide a search capability in Webmin (two files copied to /etc/webmin/dns-sinkhole) of the BIND DNS Sinkhole lists to verify if a particular host or domain is listed in the sinkhole.

The script is available on the handler's server here with the MD5 here. You can either untar the tarball in / or move the scripts in the location indicated in this diary.



Guy Bruneau IPSS Inc. gbruneau at isc dot sans dot edu


417 Posts
ISC Handler
Just a quick comment of caution - the sucuri black list has not been updated since 2011/06/06 so is stale.

I have implemented something similar to your script (though my use of sed/awk to pull the lists in to a correct format is eye watering and embarassing!). I did find some of the lists have major sites like norton and kaspersky on them which results in the AV not being able to update...i.e. reduce the security. Think malc0de still has norton.
I'm sure all readers are aware but it is always worth checking the site list prior to blocking.
One major complaint on some of the public lists is that while it is easy for a site to get on to the "block" list the sites do not seem as good at removing them once clean.


Very good point and I ran into that issue over a year ago. I addressed that issue with the addition of a file that is included in the tarball called checked_sites (located in /root/scripts that contains 70+ domains) that is used to exclude sites that you never want to see in a sinkhole. Some of the site listed may not match your policy and should be removed. Of course, you can add your own.

417 Posts Posts
ISC Handler
Is it possible to run the script under Windows to generate the list? I could use it to generate the list for our IPAM server that have DNS Blackhole capability but no management interface.

7 Posts Posts
I supposed it is possible. It might be possible with Cygwin but I haven't tried myself.

417 Posts Posts
ISC Handler

Sign Up for Free or Log In to start participating in the conversation!