1. Elastic Security #
SIEM and protection.
Scope #
Elastic Security combines a SIEM (detection and investigation on logs), endpoint protection (Elastic Defend, an Elastic Agent integration) and cloud security. Everything relies on ECS data: that is what lets one rule work on Windows, Linux or a firewall.
| Source | Integration |
|---|---|
| Linux authentications | System, Auditd Manager |
| Windows events | Windows, Elastic Defend |
| Network | firewall, Zeek, Suricata |
| Cloud | AWS CloudTrail, Azure, GCP |
Licence #
| Licence | What is available |
|---|---|
| Basic (free) | SIEM: detection rules (query, threshold, EQL, ES|QL, indicator match, new terms), prebuilt rules, alerts, timelines, cases; Elastic Defend basic protection |
| Higher subscriptions | machine learning rules, third-party connectors for actions (Slack, Jira, ServiceNow…), advanced Elastic Defend response actions, AI Assistant |
Good to know: With the Basic licence, rule actions are limited to the Server log and Index connectors: alerts stay visible in Kibana, but notifying an external tool requires a subscription.
2. Detection rules #
Six families.
Rule types #
| Type | Detects | Example |
|---|---|---|
| Custom query | a KQL / Lucene query | mimikatz.exe execution |
| Threshold | a count of events per field | more than 10 failed logins per IP |
| EQL | an ordered sequence of events | failures then success for the same account |
| ES|QL | an ES|QL aggregation | abnormal volume per user |
| Indicator match | a match with threat intelligence | IP known as malicious |
| New terms | a never-seen value | first access of a user to a server |
| Machine learning | an ML job anomaly | rare process on a host |
sequence by source.ip, user.name with maxspan=10m
[authentication where event.outcome == "failure"]
[authentication where event.outcome == "success"]FROM logs-*
| WHERE event.category == "authentication" AND event.outcome == "failure"
| STATS echecs = COUNT(*) BY source.ip
| WHERE echecs > 20Prebuilt rules #
Elastic maintains more than a thousand rules, mapped to MITRE ATT&CK tactics and techniques. Install them from Security › Rules, enable those matching the collected data, then add exceptions for legitimate noise.
Common mistake: Enabling every rule at once: most fail for lack of data or drown the team in false positives. Enable per data source, observe for a week, then tune.
Good to know: Each rule runs at a regular interval (interval) over a slightly wider window (from) so nothing is missed between runs.
3. Investigating #
Alerts, timelines, cases.
The handling cycle #
- Triage alerts by severity and risk score; group by host or user.
- Investigate in a timeline: events around the alert, process tree, EQL queries.
- Track in a case: comments, attachments, export to a ticketing tool (connector).
- Respond: isolate a host with Elastic Defend, add an exception, close the alert.
Depending on the version: the AI Assistant and Attack Discovery (grouping alerts into attacks) depend on version and licence; they require a connector to a language model.
My progress
Sign in to track your progress and take notes. Sign in
💬 Questions about this lesson
No questions yet: be the first to ask for help or share your configuration.
Recommended Articles
Machine learning in Elastic: anomaly detection and AIOps
Automatically detect abnormal behaviour: anomaly detection jobs, datafeeds, detectors, influencer...
Alerts, connectors and SLOs in Kibana
Create alert rules in Kibana (Elasticsearch query, ES|QL, custom threshold, logs), configure conn...
Security with Datadog: Cloud SIEM, Cloud Security and application protection
Discover Datadog's security products: Cloud SIEM and detection rules, Cloud Security (posture, vu...
Elastic path project: centralising and using logs
The validation project of the "Elastic Stack mastery" path: Elastic Agent and Fleet, Logstash, El...
Kibana and Elastic Observability best practices
Checklist for running Kibana in production: versions, security, spaces and roles, versioned dashb...
Transforms and enrich: summarising and enriching data in Elasticsearch
Build entity-centric indices with pivot and latest transforms, and enrich documents at ingest tim...
Kibana Maps and Canvas: geographic maps and presentations
Build maps with Kibana Maps (document, aggregation and choropleth layers, ES|QL) and dynamic pres...
Logstash in production: persistent queues, DLQ and multiple pipelines
Make Logstash reliable in production: persistent queue, dead letter queue, multiple pipelines and...
Logstash: enrich, test, monitor and deploy on Kubernetes
Enrich with translate, geoip and elasticsearch, consume Kafka, test pipelines, monitor Logstash a...