Skip to content

SpiderFoot automates OSINT for threat intelligence and mapping your attack surface.

Threat intel modules should not just provide the entity in the result data.

smicallef69814b806a8b
diff --git a/modules/sfp_alienvault.py b/modules/sfp_alienvault.py
index 715d1129..fbb058b5 100644
--- a/modules/sfp_alienvault.py
+++ b/modules/sfp_alienvault.py
@@ -46,12 +46,12 @@ class sfp_alienvault(SpiderFootPlugin):
# Be sure to completely clear any class variables in setup()
# or you run the risk of data persisting between scan runs.
- results = dict()
+ results = None
errorState = False
def setup(self, sfc, userOpts=dict()):
self.sf = sfc
- self.results = dict()
+ self.results = self.tempStorage()
# Clear / reset any other class member variables here
# or you risk them persisting between threads.
@@ -102,7 +102,6 @@ class sfp_alienvault(SpiderFootPlugin):
try:
info = json.loads(res['content'])
except Exception as e:
- print(str(res['content']))
self.sf.error("Error processing JSON response from AlienVault OTX.", False)
return None
@@ -201,7 +200,7 @@ class sfp_alienvault(SpiderFootPlugin):
rec_history = rec['reputation'].get("activities", list())
if rec['reputation']['threat_score'] < self.opts['threat_score_min']:
continue
- descr = "Threat Score: " + str(rec['reputation']['threat_score']) + ":"
+ descr = "AlienVault Threat Score: " + str(rec['reputation']['threat_score']) + ":"
for result in rec_history:
descr += "\n - " + result.get("name", "")
diff --git a/modules/sfp_botscout.py b/modules/sfp_botscout.py
index d1a8e139..5979df28 100644
--- a/modules/sfp_botscout.py
+++ b/modules/sfp_botscout.py
@@ -25,12 +25,12 @@ class sfp_botscout(SpiderFootPlugin):
optdescs = {
"api_key": "Botscout.com API key. Without this you will be limited to 50 look-ups per day."
}
- results = dict()
+ results = None
errorState = False
def setup(self, sfc, userOpts=dict()):
self.sf = sfc
- self.results = dict()
+ self.results = self.tempStorage()
for opt in userOpts.keys():
self.opts[opt] = userOpts[opt]
@@ -87,7 +87,7 @@ class sfp_botscout(SpiderFootPlugin):
else:
t = "MALICIOUS_EMAILADDR"
- evt = SpiderFootEvent(t, eventData, self.__name__, event)
+ evt = SpiderFootEvent(t, "Botscout [" + eventData + "]", self.__name__, event)
self.notifyListeners(evt)
return None
diff --git a/modules/sfp_circllu.py b/modules/sfp_circllu.py
index 3c06da9c..675fc796 100644
--- a/modules/sfp_circllu.py
+++ b/modules/sfp_circllu.py
@@ -44,13 +44,13 @@ class sfp_circllu(SpiderFootPlugin):
# Be sure to completely clear any class variables in setup()
# or you run the risk of data persisting between scan runs.
- results = dict()
+ results = None
errorState = False
cohostcount = 0
def setup(self, sfc, userOpts=dict()):
self.sf = sfc
- self.results = dict()
+ self.results = self.tempStorage()
self.cohostcount = 0
# Clear / reset any other class member variables here
@@ -218,7 +218,7 @@ class sfp_circllu(SpiderFootPlugin):
for co in cohosts:
if eventName == "IP_ADDRESS" and (self.opts['verify'] and not self.validateIP(co, eventData)):
- self.sf.debug("Host " + co + " no longer resolves to " + eventData)
+ self.sf.debug("Host no longer resolves to our IP.")
continue
if not self.opts['cohostsamedomain']:
diff --git a/modules/sfp_fraudguard.py b/modules/sfp_fraudguard.py
index 8c5c562f..c6d0ea6e 100644
--- a/modules/sfp_fraudguard.py
+++ b/modules/sfp_fraudguard.py
@@ -42,12 +42,12 @@ class sfp_fraudguard(SpiderFootPlugin):
# Be sure to completely clear any class variables in setup()
# or you run the risk of data persisting between scan runs.
- results = dict()
+ results = None
errorState = False
def setup(self, sfc, userOpts=dict()):
self.sf = sfc
- self.results = dict()
+ self.results = self.tempStorage()
# Clear / reset any other class member variables here
# or you risk them persisting between threads.
@@ -87,7 +87,7 @@ class sfp_fraudguard(SpiderFootPlugin):
self.sf.error("Error processing JSON response from Fraudguard.io.", False)
return None
- #print(str(info))
+ #print str(info)
return info
@@ -155,7 +155,7 @@ class sfp_fraudguard(SpiderFootPlugin):
self.notifyListeners(e)
if rec.get('threat') != "unknown":
- dat = rec['threat'] + " (risk level: " + rec['risk_level'] + ")"
+ dat = rec['threat'] + " (risk level: " + rec['risk_level'] + ") [" + eventData + "]"
e = SpiderFootEvent("MALICIOUS_" + rtype, dat, self.__name__, event)
self.notifyListeners(e)
diff --git a/modules/sfp_greynoise.py b/modules/sfp_greynoise.py
index d93a4303..128af318 100644
--- a/modules/sfp_greynoise.py
+++ b/modules/sfp_greynoise.py
@@ -46,12 +46,12 @@ class sfp_greynoise(SpiderFootPlugin):
# Be sure to completely clear any class variables in setup()
# or you run the risk of data persisting between scan runs.
- results = dict()
+ results = None
errorState = False
def setup(self, sfc, userOpts=dict()):
self.sf = sfc
- self.results = dict()
+ self.results = self.tempStorage()
# Clear / reset any other class member variables here
# or you risk them persisting between threads.
@@ -87,7 +87,6 @@ class sfp_greynoise(SpiderFootPlugin):
try:
info = json.loads(res['content'])
except Exception as e:
- print(str(res['content']))
self.sf.error("Error processing JSON response from Greynoise.", False)
return None
@@ -190,7 +189,7 @@ class sfp_greynoise(SpiderFootPlugin):
self.notifyListeners(e)
if rec.get("classification"):
- descr = addr + "\n - Classification: " + rec.get("classification")
+ descr = "Greynoise [" + addr + "]\n - Classification: " + rec.get("classification")
if rec.get("tags"):
descr += ", Tags: " + ", ".join(rec.get("tags"))
else:
diff --git a/modules/sfp_malwarepatrol.py b/modules/sfp_malwarepatrol.py
index 03d7196e..46ab965c 100644
--- a/modules/sfp_malwarepatrol.py
+++ b/modules/sfp_malwarepatrol.py
@@ -25,12 +25,12 @@ class sfp_malwarepatrol(SpiderFootPlugin):
optdescs = {
"api_key": "Malwarepatrol.com 'receipt' ID, provided once signing up for their open-source feed. Without this you cannot obtain their feed."
}
- results = dict()
+ results = None
errorState = False
def setup(self, sfc, userOpts=dict()):
self.sf = sfc
- self.results = dict()
+ self.results = self.tempStorage()
for opt in userOpts.keys():
self.opts[opt] = userOpts[opt]
@@ -112,7 +112,7 @@ class sfp_malwarepatrol(SpiderFootPlugin):
evtType = 'MALICIOUS_COHOST'
if self.queryAddr(eventData):
- evt = SpiderFootEvent(evtType, eventData, self.__name__, event)
+ evt = SpiderFootEvent(evtType, "MalwarePatrol [" + eventData + "]", self.__name__, event)
self.notifyListeners(evt)
# End of sfp_malwarepatrol class
diff --git a/modules/sfp_neutrinoapi.py b/modules/sfp_neutrinoapi.py
index 2ab4c8e5..42c95e03 100644
--- a/modules/sfp_neutrinoapi.py
+++ b/modules/sfp_neutrinoapi.py
@@ -175,7 +175,7 @@ class sfp_neutrinoapi(SpiderFootPlugin):
self.sf.debug("No IP blocklist results found for " + eventData)
else:
if data.get('is-listed'):
- evt = SpiderFootEvent("MALICIOUS_IPADDR", eventData, self.__name__, event)
+ evt = SpiderFootEvent("MALICIOUS_IPADDR", "NeutrinoAPI [" + eventData + "]", self.__name__, event)
self.notifyListeners(evt)
evt = SpiderFootEvent("RAW_RIR_DATA", str(data), self.__name__, event)
self.notifyListeners(evt)
@@ -186,7 +186,7 @@ class sfp_neutrinoapi(SpiderFootPlugin):
self.sf.debug("No host reputation results found for " + eventData)
else:
if data.get('is-listed'):
- evt = SpiderFootEvent("MALICIOUS_IPADDR", eventData, self.__name__, event)
+ evt = SpiderFootEvent("MALICIOUS_IPADDR", "NeutrinoAPI [" + eventData + "]", self.__name__, event)
self.notifyListeners(evt)
evt = SpiderFootEvent("RAW_RIR_DATA", str(data), self.__name__, event)
self.notifyListeners(evt)
diff --git a/modules/sfp_riskiq.py b/modules/sfp_riskiq.py
index c3f6b9f9..987a756c 100644
--- a/modules/sfp_riskiq.py
+++ b/modules/sfp_riskiq.py
@@ -43,13 +43,13 @@ class sfp_riskiq(SpiderFootPlugin):
# Be sure to completely clear any class variables in setup()
# or you run the risk of data persisting between scan runs.
- results = dict()
+ results = None
errorState = False
cohostcount = 0
def setup(self, sfc, userOpts=dict()):
self.sf = sfc
- self.results = dict()
+ self.results = self.tempStorage()
self.cohostcount = 0
# Clear / reset any other class member variables here
diff --git a/modules/sfp_virustotal.py b/modules/sfp_virustotal.py
index d2c1cdfc..58121488 100644
--- a/modules/sfp_virustotal.py
+++ b/modules/sfp_virustotal.py
@@ -50,12 +50,12 @@ class sfp_virustotal(SpiderFootPlugin):
# Be sure to completely clear any class variables in setup()
# or you run the risk of data persisting between scan runs.
- results = dict()
+ results = None
errorState = False
def setup(self, sfc, userOpts=dict()):
self.sf = sfc
- self.results = dict()
+ self.results = self.tempStorage()
# Clear / reset any other class member variables here
# or you risk them persisting between threads.
diff --git a/modules/sfp_xforce.py b/modules/sfp_xforce.py
index cdc4dffd..70362fea 100644
--- a/modules/sfp_xforce.py
+++ b/modules/sfp_xforce.py
@@ -48,13 +48,13 @@ class sfp_xforce(SpiderFootPlugin):
# Be sure to completely clear any class variables in setup()
# or you run the risk of data persisting between scan runs.
- results = dict()
+ results = None
errorState = False
cohostcount = 0
def setup(self, sfc, userOpts=dict()):
self.sf = sfc
- self.results = dict()
+ self.results = self.tempStorage()
self.cohostcount = 0
# Clear / reset any other class member variables here
diff --git a/sflib.py b/sflib.py
index 633787ae..2fdfec40 100644
--- a/sflib.py
+++ b/sflib.py
@@ -1433,6 +1433,10 @@ class SpiderFootPlugin(object):
def setOutputFilter(self, types):
self.__outputFilter__ = types
+ # For SpiderFoot HX compatability of modules
+ def tempStorage(self):
+ return dict()
+
# Call the handleEvent() method of every other plug-in listening for
# events from this plug-in. Remember that those plug-ins will be called
# within the same execution context of this thread, not on their own.