How threathunters-io/laurel works
Project type and purpose
• This is a Rust-based event-post-processing plugin/agent for Linux’s auditd service (“LAUREL”).
• Its goal is to consume raw auditd events, enrich them (e.g., process arguments, parent-process info, syscalls), and emit structured JSON logs for downstream security monitoring.
File structure
• Top-level Cargo.toml, src/ and src/bin/: a multi-binary Rust crate.
• src/bin/laurel: the main auditd plugin/daemon entry point.
• src/bin/laurel2audit: a companion utility for reverse-conversion or replay.
• src/lib.rs and modules (config.rs, json.rs, procfs.rs, userdb.rs, label_matcher.rs, logger.rs, rotate.rs, quote.rs): the core enrichment pipeline.
• etc/ and contrib/: deployment artifacts (SELinux/AppArmor policies, default config.toml).
• man/, INSTALL.md, performance.md: documentation and usage.
• benches/ and src/testdata/: performance benchmarks and comprehensive test vectors.
README for additional insights
• Describes how LAUREL hooks into auditd, enriches EXECVE, PPID, AVC, network events.
• Points to manual pages for config and log format, highlights performance rationale.
Detail
• Major modules from src/ (procfs.rs, userdb.rs, etc.) as sub-components of the enrichment pipeline.
• Config sources (etc/laurel/config.toml and Cargo compile-time constants).
• Test and benchmarking artifacts separately (benches/, src/testdata/) to show validation infrastructure.