Documentation
¶
Overview ¶
Package feodo adds an abuse.ch Feodo Tracker IP-blocklist check to yarad. Feodo Tracker tracks botnet C&C servers (Emotet, TrickBot, AgentTesla, …); the blocklist is a CSV of known-malicious IP:port pairs.
Design mirrors internal/urlhaus (same fetch/refresh/cache pattern) but with one simplification: Feodo is a public feed (no Auth-Key required) and stores only IP addresses. A URL whose host is a raw IP listed in the blocklist is a strong signal — botnet C&C payloads often hardcode IP:port rather than a domain to avoid DNS-based blocking.
The feed URL (https://feodotracker.abuse.ch/downloads/ipblocklist.csv) is public. A key is not required; New accepts an empty key and still starts the refresher. Callers that supply a non-empty abuse.ch key get it attached as an Auth-Key header for potential future access controls on the feed.
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 blocklist and serves lookups.
func New ¶
func New(enabled bool, key string, refresh time.Duration, cacheDir string, logf func(string, ...any)) *Checker
New builds a Checker and starts its background refresher. The feed is public; key may be empty. enabled must be true to start (allows callers to gate on a config flag without the nil-check pattern used for key-gated feeds).
func (*Checker) Check ¶
Check extracts URLs from data (and a defanged copy) via urlcand.Extract, and reports any whose host is a raw IP address in the Feodo blocklist. maxURLs bounds work. Delegates to CheckCandidates.
func (*Checker) CheckCandidates ¶
CheckCandidates reports Feodo hits for pre-extracted URL candidates. cands is produced by urlcand.Extract; maxURLs caps how many are processed.