How vishnugovindu23-cmd/cloud-anomaly-detection works
This is a command-line AWS behavioural anomaly detector. The main workflow loads CloudTrail and VPC Flow Logs, builds identity-hour and host-hour features against a clean training baseline, scores them with a hybrid detector, groups alerts into incidents, detects periodic beacons, and writes reports and exports. The CLI also offers synthetic attack-data generation and ground-truth evaluation. Relationships are based on the sampled CLI calls, source excerpts, and README workflow; unsampled implementation details are not inferred.
Main entry points: cli.py Detection runner · model.py CloudTrail detector · beacon.py Beacon detector · incidents.py Incident grouping
Components 19
Log ingestion
- CloudTrail parser
loaders.py - Flow log parser
loaders.py
Behaviour analysis
- Identity-hour features
features.py - Host-hour features
features.py - CloudTrail detector
model.py - Flow detector
model.py - Beacon detector
beacon.py
Alert triage
- Hourly alerts
model.py - ATT&CK mapping
mitre.py - Incident grouping
incidents.py - Ground-truth evaluation
incidents.py
CLI and outputs
- Detection runner
cli.py - Markdown and chart
report.py - Reports and CSVs
Synthetic data
- Attack-data generator
generate.py - Synthetic logs and labels
Other components
- Operator
- CloudTrail logs
- VPC Flow Logs
Connections 29
- Operator → Detection runner: runs
README.md - CloudTrail logs → CloudTrail parser: parsed by
loaders.py - VPC Flow Logs → Flow log parser: parsed by
loaders.py - Detection runner → CloudTrail parser: loads
cli.py - Detection runner → Flow log parser: loads
cli.py - Detection runner → Identity-hour features: builds features
cli.py - Detection runner → Host-hour features: builds features
cli.py - Detection runner → CloudTrail detector: fits and scores
cli.py - Detection runner → Flow detector: fits and scores
cli.py - Identity-hour features → CloudTrail detector: feature data
cli.py - Host-hour features → Flow detector: feature data
cli.py - CloudTrail detector → Hourly alerts: produces
model.py - Flow detector → Hourly alerts: produces
model.py - CloudTrail detector → ATT&CK mapping: maps reasons
model.py - Flow detector → ATT&CK mapping: maps reasons
model.py - Detection runner → Incident grouping: groups alerts
cli.py - Hourly alerts → Incident grouping: grouped into
cli.py - Detection runner → Beacon detector: detects beacons
cli.py - Flow log parser → Beacon detector: flow records
cli.py - Detection runner → Ground-truth evaluation: evaluates results
cli.py - Incident grouping → Ground-truth evaluation: incident results
incidents.py - Beacon detector → Ground-truth evaluation: beacon results
incidents.py - Detection runner → Markdown and chart: renders outputs
cli.py - Incident grouping → Markdown and chart: incident data
- Beacon detector → Markdown and chart: beacon data
- Markdown and chart → Reports and CSVs: writes report and chart
- Operator → Attack-data generator: generates demo data
README.md - Attack-data generator → Synthetic logs and labels: creates logs and labels
generate.py - Synthetic logs and labels → Detection runner: demo input
cli.py