Documentation
¶
Overview ¶
Package threatfox adds an abuse.ch ThreatFox IOC lookup to yarad: URLs and domains pulled from a message (and from the decompressed VBA/RTF the extract package surfaces) are checked against a locally-cached feed of recent malicious indicators.
Design mirrors internal/urlhaus (same Auth-Key, same fetch/refresh/cache pattern):
- The IOC CSV is downloaded once per refresh interval (>=5 min fair-use).
- A failed refresh keeps the previous set (fail-static).
- URL and domain IOCs are stored in separate sets; a hit on either is reported with an appropriate rule name.
- Cheap defanging catches obfuscated URLs (hxxp / [.] / (dot)).
- Per-message URL count is bounded by maxURLs.
ThreatFox focuses on botnet C&C indicators (post-infection), complementing URLhaus's delivery-URL focus. The same abuse.ch Auth-Key (free account at https://auth.abuse.ch/) works for both services. When no key is supplied, New returns nil (feature disabled).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Checker ¶
type Checker struct {
// contains filtered or unexported fields
}
Checker holds the cached feed and serves lookups.
func New ¶
New builds a Checker and starts its background refresher. Returns nil when key is empty (feature disabled). refresh is clamped to the fair-use floor.
func (*Checker) Check ¶
Check extracts URLs from data (and from a cheaply-defanged copy) via urlcand.Extract, looks each up in the feed, and returns the matches. maxURLs bounds work per buffer. Delegates to CheckCandidates.
func (*Checker) CheckCandidates ¶
CheckCandidates looks up pre-extracted URL candidates in the feed. cands is produced by urlcand.Extract; maxURLs caps how many candidates are processed.