# -*- coding: utf-8 -*- # ------------------------------------------------------------------------------- # Name: sfp_zoneh # Purpose: Checks if a domain or IP appears on the zone-h.org defacement # archive. # # Author: steve@binarypool.com # # Created: 09/01/2014 # Copyright: (c) Steve Micallef, 2014 # Licence: MIT # ------------------------------------------------------------------------------- import re from spiderfoot import SpiderFootEvent, SpiderFootPlugin class sfp_zoneh(SpiderFootPlugin): meta = { 'name': "Zone-H Defacement Check", 'summary': "Check if a hostname/domain appears on the zone-h.org 'special defacements' RSS feed.", 'flags': [], 'useCases': ["Investigate", "Passive"], 'categories': ["Leaks, Dumps and Breaches"], 'dataSource': { 'website': "https://zone-h.org/", 'model': "FREE_NOAUTH_UNLIMITED", 'references': [ "https://www.zone-h.org/archive", "https://www.zone-h.org/archive/special=1" ], 'favIcon': "https://zone-h.org/images/logo.gif", 'logo': "https://zone-h.org/images/logo.gif", 'description': "Once a defaced website is submitted to Zone-H, it is mirrored on the Zone-H servers. " "The website is then moderated by the Zone-H staff to check if the defacement was fake. " "Sometimes, the hackers themselves submit their hacked pages to the site.\n" "It is an Internet security portal containing original IT security news, digital warfare news, " "geopolitics, proprietary and general advisories, analyses, forums, researches. " "Zone-H is the largest web intrusions archive. It is published in several languages.", } } # Default options opts = { 'checkcohosts': True, 'checkaffiliates': True } # Option descriptions optdescs = { 'checkcohosts': "Check co-hosted sites?", 'checkaffiliates': "Check affiliates?" } # Be sure to completely clear any class variables in setup() # or you run the risk of data persisting between scan runs. results = None errorState = False def setup(self, sfc, userOpts=dict()): self.sf = sfc self.results = self.tempStorage() self.errorState = False # Clear / reset any other class member variables here # or you risk them persisting between threads. for opt in list(userOpts.keys()): self.opts[opt] = userOpts[opt] # What events is this module interested in for input # * = be notified about all events. def watchedEvents(self): return ["INTERNET_NAME", "IP_ADDRESS", "IPV6_ADDRESS", "AFFILIATE_INTERNET_NAME", "AFFILIATE_IPADDR", "AFFILIATE_IPV6_ADDRESS", "CO_HOSTED_SITE"] # What events this module produces # This is to support the end user in selecting modules based on events # produced. def producedEvents(self): return ["DEFACED_INTERNET_NAME", "DEFACED_IPADDR", "DEFACED_AFFILIATE_INTERNET_NAME", "DEFACED_COHOST", "DEFACED_AFFILIATE_IPADDR"] def lookupItem(self, target, content): grps = re.findall(r"