SpiderFoot automates OSINT for threat intelligence and mapping your attack surface.
Python attacksurfacecticybersecurityfootprintinghackinginformation-gatheringinformation-securityinfosecintelligence-gatheringosintosint-frameworkosint-reconnaissanceosint-toolpentestingpythonreconsecurity-toolsthreat-intelligencethreatintel
Perform whois of affiliates and co-hosts.
Steve500ae85e4b93
diff --git a/modules/sfp_dnsresolve.py b/modules/sfp_dnsresolve.pyindex 35fecbf7..1d53b1d5 100644--- a/modules/sfp_dnsresolve.py+++ b/modules/sfp_dnsresolve.py@@ -111,7 +111,7 @@ class sfp_dnsresolve(SpiderFootPlugin):def producedEvents(self):return ["IP_ADDRESS", "INTERNET_NAME", "AFFILIATE_INTERNET_NAME","AFFILIATE_IPADDR", "DOMAIN_NAME", "IPV6_ADDRESS",- "DOMAIN_NAME_PARENT"]+ "DOMAIN_NAME_PARENT", "CO_HOSTED_SITE_DOMAIN", "AFFILIATE_DOMAIN"]# Handle events sent to this moduledef handleEvent(self, event):@@ -133,6 +133,17 @@ class sfp_dnsresolve(SpiderFootPlugin):return Noneself.events[eventDataHash] = True+ # Simply translates these to their domains+ if eventName in ["CO_HOSTED_SITE", "AFFILIATE_INTERNET_NAME"]:+ dom = self.sf.hostDomain(eventData, self.opts['_internettlds'])+ if "AFFILIATE_" in eventName:+ ev = "AFFILIATE_DOMAIN"+ else:+ ev = "CO_HOSTED_SITE_DOMAIN"+ evt = SpiderFootEvent(ev, dom, self.__name__, parentEvent)+ self.notifyListeners(evt)+ return None+# Search for IPs/hosts in raw data, but obviously nothing this module# already produces, as those things are already entities, not raw data.if eventName not in self.producedEvents():diff --git a/modules/sfp_whois.py b/modules/sfp_whois.pyindex b7e109f8..ff5e43ff 100644--- a/modules/sfp_whois.py+++ b/modules/sfp_whois.py@@ -39,13 +39,15 @@ class sfp_whois(SpiderFootPlugin):# What events is this module interested in for inputdef watchedEvents(self):- return ["DOMAIN_NAME", "DOMAIN_NAME_PARENT", "NETBLOCK_OWNER" ]+ return ["DOMAIN_NAME", "DOMAIN_NAME_PARENT", "NETBLOCK_OWNER",+ "CO_HOSTED_SITE_DOMAIN", "AFFILIATE_DOMAIN" ]# What events this module produces# This is to support the end user in selecting modules based on events# produced.def producedEvents(self):- return ["DOMAIN_WHOIS", "NETBLOCK_WHOIS", "DOMAIN_REGISTRAR"]+ return ["DOMAIN_WHOIS", "NETBLOCK_WHOIS", "DOMAIN_REGISTRAR",+ "CO_HOSTED_SITE_DOMAIN_WHOIS", "AFFILIATE_DOMAIN_WHOIS"]# Handle events sent to this moduledef handleEvent(self, event):@@ -72,8 +74,12 @@ class sfp_whois(SpiderFootPlugin):if eventName.startswith("DOMAIN_NAME"):typ = "DOMAIN_WHOIS"- else:+ if eventName.startswith("NETBLOCK"):typ = "NETBLOCK_WHOIS"+ if eventName.startswith("AFFILIATE_DOMAIN"):+ typ = "AFFILIATE_DOMAIN_WHOIS"+ if eventName.startswith("CO_HOSTED_SITE_DOMAIN"):+ typ = "CO_HOSTED_SITE_DOMAIN_WHOIS"rawevt = SpiderFootEvent(typ, data, self.__name__, event)self.notifyListeners(rawevt)diff --git a/sfdb.py b/sfdb.pyindex 1a32066b..ea6a98b1 100644--- a/sfdb.py+++ b/sfdb.py@@ -94,6 +94,8 @@ class SpiderFootDb:"INSERT INTO tbl_event_types (event, event_descr, event_raw, event_type) VALUES ('AFFILIATE_INTERNET_NAME', 'Affiliate - Internet Name', 0, 'ENTITY')","INSERT INTO tbl_event_types (event, event_descr, event_raw, event_type) VALUES ('AFFILIATE_IPADDR', 'Affiliate - IP Address', 0, 'ENTITY')","INSERT INTO tbl_event_types (event, event_descr, event_raw, event_type) VALUES ('AFFILIATE_WEB_CONTENT', 'Affiliate - Web Content', 1, 'DATA')",+ "INSERT INTO tbl_event_types (event, event_descr, event_raw, event_type) VALUES ('AFFILIATE_DOMAIN', 'Affiliate - Domain Name', 0, 'ENTITY')",+ "INSERT INTO tbl_event_types (event, event_descr, event_raw, event_type) VALUES ('AFFILIATE_DOMAIN_WHOIS', 'Affiliate - Domain Whois', 1, 'DATA')","INSERT INTO tbl_event_types (event, event_descr, event_raw, event_type) VALUES ('AFFILIATE_DESCRIPTION_CATEGORY', 'Affiliate Description - Category', 0, 'DESCRIPTOR')","INSERT INTO tbl_event_types (event, event_descr, event_raw, event_type) VALUES ('AFFILIATE_DESCRIPTION_ABSTRACT', 'Affiliate Description - Abstract', 0, 'DESCRIPTOR')","INSERT INTO tbl_event_types (event, event_descr, event_raw, event_type) VALUES ('APPSTORE_ENTRY', 'App Store Entry', 0, 'ENTITY')",@@ -109,6 +111,8 @@ class SpiderFootDb:"INSERT INTO tbl_event_types (event, event_descr, event_raw, event_type) VALUES ('BLACKLISTED_SUBNET', 'Blacklisted IP on Same Subnet', 0, 'DESCRIPTOR')","INSERT INTO tbl_event_types (event, event_descr, event_raw, event_type) VALUES ('BLACKLISTED_NETBLOCK', 'Blacklisted IP on Owned Netblock', 0, 'DESCRIPTOR')","INSERT INTO tbl_event_types (event, event_descr, event_raw, event_type) VALUES ('CO_HOSTED_SITE', 'Co-Hosted Site', 0, 'ENTITY')",+ "INSERT INTO tbl_event_types (event, event_descr, event_raw, event_type) VALUES ('CO_HOSTED_SITE_DOMAIN', 'Co-Hosted Site - Domain Name', 0, 'ENTITY')",+ "INSERT INTO tbl_event_types (event, event_descr, event_raw, event_type) VALUES ('CO_HOSTED_SITE_DOMAIN_WHOIS', 'Co-Hosted Site - Domain Whois', 1, 'DATA')","INSERT INTO tbl_event_types (event, event_descr, event_raw, event_type) VALUES ('DARKNET_MENTION_URL', 'Darknet Mention URL', 0, 'DESCRIPTOR')","INSERT INTO tbl_event_types (event, event_descr, event_raw, event_type) VALUES ('DARKNET_MENTION_CONTENT', 'Darknet Mention Web Content', 1, 'DATA')","INSERT INTO tbl_event_types (event, event_descr, event_raw, event_type) VALUES ('DEFACED_INTERNET_NAME', 'Defaced', 0, 'DESCRIPTOR')",