Filter generation in practice: from algorithms to LLMs
Kaspersky describes automating false-positive alert filter generation using FP-Growth algorithms and LLMs, cutting false positives by 99% and improving analyst efficiency by 17%. Three approaches to automating false-positive filter generation are compared: algorithmic (FP-Growth), single-prompt LLM, and multi-agent LLM. The LLM approaches outperform the algorithmic one by eliminating dependence on alert context and handling string normalization edge cases. The single-prompt LLM was chosen because agents offer no meaningful accuracy gain while adding latency and model-access dependency.
Improve this report
Send corrections, useful missing information, or quality feedback. It is private and will not appear as a comment.
Detection / HunterZ.ai
Immediate Actions
- Adopt single-prompt LLM filter generation for high-volume false-positive triage.
- Retain algorithmic approach for environments without LLM access.
Key Takeaways
- FP-Growth builds frequent-pattern trees from alert context to rank field combinations for filters.
- Algorithmic approach succeeds in two-thirds of cases when sufficient context exists.
- LLM approach removed context dependency and handled non-standard string normalization cases.
- Multi-agent chain (Selector, Generator, Validator, Commentator) adds output validation but is slower.
- Single-prompt LLM chosen as simpler, faster alternative with equivalent accuracy to multi-agent.
Attack Chain
- Input: Alert event (~400 fields) and the triggered detection rule are ingested
- Field Selection: Algorithm selects fields relevant to the filter
- String Normalization: Paths and values are normalized for cross-system matching
- Filter Generation: LLM produces three filter candidates with explanations
- Validation: Validator checks filter validity; regenerates if needed (agent variant)
- Review: Analyst selects or edits the chosen filter before deployment
Affected Systems
- SOC alert triage platforms processing high-volume false positives
- Detection rules generating noise across Windows event logs
- EDR/XDR event logs averaging ~400 fields per event
Detection Engineering Assessment
Hunting Hypotheses
| Hypothesis | Telemetry | Stage | FP Risk |
|---|---|---|---|
| Recurring PowerShell command-line field combinations manually suppressed by analysts signal benign noise (T1059.001) | Analyst triage actions and PowerShell event fields | Execution | Medium — suppressed PowerShell noise may include real detections |
| Group Policy logon script paths repeatedly flagged as noise indicate routine SYSVOL activity (T1037.002) | File path and autorun_entry values in alert events | Persistence | Low — Group Policy logon scripts are typically benign |
Required Log Sources
- EDR/XDR event logs
- Detection rule definitions
- Alert triage records
- Filter acceptance history
Control Gaps
- Manual filter writing creates analyst bottleneck and inconsistent suppression rules.
- LLM-based generation depends on external model access, unavailable in air-gapped environments.
- Algorithmic generation fails when no alert context exists for the rule.
Recommendations
Infrastructure Hardening
- Persist accepted filters and approval metrics to track false-positive reduction.
- Strip detection-rule fields from generated filters to avoid disabling the rule.
User Protection
- Normalize file paths and replace drive letters with environment variables.
- Require analyst validation before activating any auto-generated filter.