How ivanbutram/zeek-anomaly-detector works
This repository contains two command-line tools for Zeek connection logs: a connection filter and an anomaly detector. The detector validates and parses JSON records, evaluates volume, connection-rate, and distinct-port thresholds, then writes JSON or Russian human-readable warnings. The filter parses records and emits those involving an optional server IP. The README gives only the project name; these workflows are supported by the sampled source. Documentation-listed capabilities are not detailed because their contents were not provided.
Main entry points: detect/main.go Detector command · main.go Filter command · output.go Report formatting
Components 11
Connection filter
- Filter command
main.go - Parse and filter
main.go
Anomaly detection
- Detector command
cmd/detect/main.go - Validate and parse
cmd/detect/main.go - Threshold detection
cmd/detect/main.go
Alert reporting
- Alert records
cmd/detect/main.go - Report formatting
cmd/detect/output.go
Other components
- CLI operator
- Zeek conn.log
- Filtered JSON records
- Report output
Connections 12
- CLI operator → Filter command: runs
main.go - Zeek conn.log → Filter command: provides log
main.go - Filter command → Parse and filter: parses and filters
main.go - Parse and filter → Filtered JSON records: encodes records
main.go - CLI operator → Detector command: runs
cmd/detect/main.go - Zeek conn.log → Detector command: provides log
cmd/detect/main.go - Detector command → Validate and parse: validates records
cmd/detect/main.go - Detector command → Threshold detection: calls detect
cmd/detect/main.go - Threshold detection → Alert records: produces alerts
cmd/detect/main.go - Detector command → Report formatting: writes report
cmd/detect/main.go - Alert records → Report formatting: formats alerts
cmd/detect/main.go - Report formatting → Report output: writes output
cmd/detect/output.go