ECS powers detections
12 min · 2 ejercicio(s)
Elastic Security ships more than 1,000 prebuilt detection rules. Every one of them is written against ECS fields:
process where event.type == "start" and
process.parent.name : ("WINWORD.EXE", "EXCEL.EXE", "POWERPNT.EXE") and
process.name : ("powershell.exe", "cmd.exe", "wscript.exe", "mshta.exe")The rule doesn't care whether the process events came from Elastic Defend, Sysmon via Winlogbeat or a third-party EDR. If the source is mapped to ECS, the rule fires.
Fields the rules rely on
| Field | Used for |
|---|---|
event.category, event.type |
Selecting the right events (EQL categories) |
process.name, process.parent.name, process.command_line, process.args |
Process behaviour |
process.entity_id, process.parent.entity_id |
Reliable process trees (PIDs are reused) |
host.id, host.name |
Grouping sequences per host (sequence by host.id) |
user.name, user.id |
Account activity |
destination.ip, destination.port |
Network behaviour |
file.path, file.extension |
File activity |
Required fields
Every prebuilt rule lists its required fields in Kibana. If one of them is missing in your data, the rule can't match anything, and you don't get an error, you just get no alerts. Checking required fields against your sources is one of the first steps of a detection engineering review.
Threat fields
Alerts are enriched with threat.* fields, which map the rule to MITRE ATT&CK: threat.tactic.name, threat.technique.id. Threat intelligence indicators use threat.indicator.*. The lab's lab-threatintel index uses a simplified version of this.
🔎 Profundiza: funciones, errores habituales y práctica
Coverage, not just rules
A rule set is only as good as the data under it. A practical way to measure coverage:
- List the rules you want (for example by MITRE tactic).
- Collect their required fields and
event.categoryvalues. - Check, per data source, which of them are populated (
FROM logs-* | STATS COUNT(field) BY event.datasetin ES|QL).
Gaps show you which sources need better ECS mapping before more rules make sense.
Writing your own rules
Write custom rules against ECS fields as well, even if only one of your sources has the data today. When the next source is onboarded, the rule already covers it.