stage-19: ThreatFox + MalwareBazaar + OTX Scoutline sources
Three new feeds — biggest near-term data-diversity win. ThreatFox brings multi-malware IOCs with threat_type signal (botnet_cc → BOTNET, payload_delivery → MALWARE, phishing → PHISHING). MalwareBazaar brings file-hash samples with signatures. OTX brings curated multi-source pulses with paragraph-form descriptions — by far the richest real-prose source. Auth: THREATFOX_AUTH_KEY (one abuse.ch key covers ThreatFox + MalwareBazaar) and OTX_API_KEY. fetch-all skips keyed feeds cleanly with where-to-get-it guidance instead of tracebacking. Proofline reliability table extended; abuse.ch sources rated B/2, OTX rated C/3 (community-driven). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -57,3 +57,26 @@ def test_classify_is_idempotent():
|
||||
first = case.classification.model_copy(deep=True)
|
||||
classify(case)
|
||||
assert case.classification == first
|
||||
|
||||
|
||||
def test_threatfox_botnet_cc_is_botnet():
|
||||
case = make_case(feed="threatfox", ips=["1.2.3.4"])
|
||||
case.source_metadata["threat_type"] = "botnet_cc"
|
||||
assert classify(case).classification.incident_type is IncidentType.BOTNET
|
||||
|
||||
|
||||
def test_threatfox_payload_delivery_is_malware():
|
||||
case = make_case(feed="threatfox", urls=["http://1.2.3.4/x.bin"])
|
||||
case.source_metadata["threat_type"] = "payload_delivery"
|
||||
assert classify(case).classification.incident_type is IncidentType.MALWARE
|
||||
|
||||
|
||||
def test_threatfox_phishing_threat_type_is_phishing():
|
||||
case = make_case(feed="threatfox", urls=["http://login.bad/example"])
|
||||
case.source_metadata["threat_type"] = "phishing"
|
||||
assert classify(case).classification.incident_type is IncidentType.PHISHING
|
||||
|
||||
|
||||
def test_malware_bazaar_is_malware():
|
||||
case = make_case(feed="malware-bazaar", hashes=["a" * 64])
|
||||
assert classify(case).classification.incident_type is IncidentType.MALWARE
|
||||
|
||||
Reference in New Issue
Block a user