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

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
| Type | Indicator | Context |
|---|---|---|
| URL | hxxp[:]//10[.]100[.]100[.]10:9090/revershell.exe | URL used in the article's true-positive example for downloading a payload with certutil before executing it. |
| URL | hxxp[:]//192[.]168[.]1[.]100/payload.exe | Payload URL in an ES|QL test example modeling a certutil download-and-execute attack chain. |
MITRE ATT&CK
T1003.001 · LSASS MemoryThe LSASS example uses rundll32.exe with comsvcs.dll MiniDump behavior to dump LSASS memory.T1046 · Network Service DiscoveryThe article identifies arp -a as network enumeration in its detection examples.T1059 · Command and Scripting InterpreterThe examples use cmd.exe and PowerShell commands to run scripts and downloaded executables.T1059.001 · PowerShellPowerShell execution appears in the alert examples, including a command that runs a script from a temporary directory.T1105 · Ingress Tool TransferThe true-positive example uses certutil to download revershell.exe from a network URL.T1218.011 · Rundll32The LSASS example invokes comsvcs.dll through rundll32.exe.
Vendors
Products
Amazon BedrockCOMPLETION supports both Elastic Cloud models and connectors to Azure OpenAI, Amazon Bedrock, OpenAI, and Google Vertex, with configuration via the LLM connector documentation.Attack Discoverydirectly into the query pipeline, this new detection engineering technique can work in tandem with Attack Discovery to provide a more holistic AI-driven defense.Azure OpenAICOMPLETION supports both Elastic Cloud models and connectors to Azure OpenAI, Amazon Bedrock, OpenAI, and Google Vertex, with configuration via the LLM connector documentation.Elastic CloudCOMPLETION supports both Elastic Cloud models and connectors to Azure OpenAI, Amazon Bedrock, OpenAI, and Google Vertex, with configuration via the LLM connector documentation.Elastic SecurityWith the Elastic rule customization feature previously shared in Elastic Security simplifies customization of prebuilt SIEM detection rules, you can enable and customize these rules to fit your environment with your LLM.Google VertexCOMPLETION supports both Elastic Cloud models and connectors to Azure OpenAI, Amazon Bedrock, OpenAI, and Google Vertex, with configuration via the LLM connector documentation.OpenAICOMPLETION supports both Elastic Cloud models and connectors to Azure OpenAI, Amazon Bedrock, OpenAI, and Google Vertex, with configuration via the LLM connector documentation.
