Elastic Demonstrates LLM-Augmented Alert Triage with ES|QL COMPLETION

· Original article ↗

Summary

Elastic describes using ES|QL COMPLETION to add LLM reasoning to security-alert triage, with workflows for correlating alerts, structuring context, parsing verdicts, and filtering results before alerting.

Key points

  • ES|QL COMPLETION embeds LLM inference in query execution so detection logic can assess the context of related alerts.
  • The workflow aggregates alerts by host or user, builds structured context, requests a verdict, parses the response, and filters by verdict and confidence.
  • Examples show triage distinguishing SCCM, Citrix, and Nessus activity from a certutil download-and-execute sequence and an LSASS memory dump.
  • Elastic describes prebuilt rules for host-based attack-chain triage and user-based compromise triage.
  • COMPLETION supports Elastic Cloud models and connectors for Azure OpenAI, Amazon Bedrock, OpenAI, and Google Vertex.
  • The article notes a 100-row per-execution limit, recommends LIMIT and thresholds to manage cost and scale, and suggests testing prompts with ROW before deployment.

Article Details

Defense Focus
Use LLM reasoning within ES|QL to triage correlated security alerts, distinguishing likely attack chains from benign activity and prioritizing suspicious cases for analysts.
Detection Methods
  • Correlate alerts by host or user and assemble relevant event context, including process lineage and command lines, before requesting an LLM verdict.
  • Parse the LLM response into verdict, confidence, and summary fields; surface true-positive or suspicious verdicts above a confidence threshold.
  • Use host- and user-centric triage rules to assess related alerts across hosts and data sources.
Data Sources
  • Security alert records, including rule names, risk scores, timestamps, and recorded tactics and techniques
  • Endpoint process executables, command lines, and parent-process details
  • File paths, DLL paths, registry paths and values, and DNS query names
  • Host and user identifiers and names
  • Authentication alerts and source IP patterns for user-centric investigations
Rule Types
  • ES|QL queries using the COMPLETION command for inline LLM inference
  • ES|QL DISSECT parsing of structured LLM responses
  • ES|QL ROW-based prompt tests using known examples
Platforms
  • Elastic Security
  • Elastic Cloud
Defensive Actions
  • Correlate multiple alerts by host or user and include relevant context in a structured prompt.
  • Limit the number of records sent for LLM analysis; use LIMIT and thresholds to control cost and scale.
  • Filter results to true-positive or suspicious verdicts with confidence above the selected threshold before alerting.
  • Test prompt wording and structured response parsing with known examples using ROW before production deployment.
  • Treat command-line strings as attacker-controlled input when constructing prompts.

Indicators of compromise

TypeIndicatorContext
URLhxxp[:]//10[.]100[.]100[.]10:9090/revershell.exeURL used in the article's true-positive example for downloading a payload with certutil before executing it.
URLhxxp[:]//192[.]168[.]1[.]100/payload.exePayload URL in an ES|QL test example modeling a certutil download-and-execute attack chain.

MITRE ATT&CK

Vendors

Products

Related Articles