Last active
August 29, 2015 14:04
-
-
Save netantho/b4f5a3df008184119695 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
# Convert abuse.ch SSL Fingerprint Blacklist in CVS format to format ingestible by | |
# the Bro intelligence framework. | |
# | |
# Get the blacklist at https://sslbl.abuse.ch/blacklist/, get bro at https://bro.org | |
# | |
# Usage: | |
# ./sslbl.py > sslbl.txt | |
# | |
# In your site/local.bro add: | |
# @load policy/frameworks/intel/seen | |
# @load policy/frameworks/intel/seen/file-hashes | |
# redef Intel::read_files += { "/pathto/sslbl.txt" }; | |
import urllib | |
f = urllib.urlopen("https://sslbl.abuse.ch/blacklist/sslblacklist.csv") | |
print '#fields\tindicator\tindicator_type\tmeta.sourcet\tmeta.desc\tmeta.url' | |
for l in f.readlines(): | |
# lines starting with # are comments | |
if not l.startswith('#'): | |
(ts, hash, reason) = l.split(',') | |
print '\t'.join([hash, 'Intel::FILE_HASH', 'abuse.ch SSLBL', reason, 'https://sslbl.abuse.ch/blacklist/']) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment