Pcornel
Browse topics
Options
Recent
Favorites
Security · Technical reference

Detection Rule

Direct answer

A detection rule is logic that searches telemetry for a specific suspicious condition and raises an alert, with a description, severity, MITRE ATT&CK mapping, data source and tested response steps.

When to use this

Use this when writing a single detection rule with logic, data source, ATT&CK mapping and response.

First 30 seconds

1. A detection rule needs logic, data source, severity, ATT&CK mapping, triage guide, test.

2. Keep logic readable.

3. Test positives and negatives.

4. Version control.

5. Document false positives.

Operational verification

data → rule → alert with guidance

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Security monitoring, detection and operations
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformSecurity monitoring, detection and operations
Scope / prerequisiteUse this when writing a single detection rule with logic, data source, ATT&CK mapping and response.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

1 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Common mistakes Narrow the fault
  • Rules without test data or owner.
Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Key points
  • Document purpose, data source, logic and response.
  • Map the rule to MITRE ATT&CK.
  • Test before deploying.
Key checks
  • Rule metadata: ATT&CK ID, data source, severity, triage steps — quality
  • sigma check <rule.yml> — validate Sigma
  • Unit test with sample events — expected hit
ReferenceWhy it matters1 section · depth on demand

Anatomy of a good rule

PartExample
Name and description"LSASS memory access by non-system process"
Data sourceSysmon event 10 / EDR process access
LogicTargetImage ends with lsass.exe and GrantedAccess includes 0x10
Severity and ATT&CK mappingHigh, T1003.001
ExclusionsKnown security and backup tools
Response stepsIsolate host, collect memory, reset credentials

Write rules in a portable format (Sigma) where possible, test them against real attack simulations (Atomic Red Team) and track false-positive rates.

ReferenceImportant terms & boundaries1 section · depth on demand

In depth

A detection rule defines conditions in telemetry that indicate malicious or suspicious activity, producing an alert when matched. Good rules target attacker behaviour, are tested, documented and maintained like code.

Rule anatomy:

PartExample
Data sourceWindows process creation (Sysmon 1 / 4688)
LogicOffice application spawning PowerShell with encoded command
Severity and confidenceHigh / medium
ATT&CK mappingT1059.001
False positivesKnown add-ins
ResponseIsolate host if confirmed

Write rules in a portable format (Sigma) where possible, store them in Git, test them against sample data in CI, and track their performance.

ReferenceConfiguration & state1 section · depth on demand

Example (Sigma)

title: Suspicious Encoded PowerShell
logsource: { product: windows, category: process_creation }
detection:
  selection:
    Image|endswith: '\powershell.exe'
    CommandLine|contains: [' -enc ', ' -EncodedCommand ']
  condition: selection
falsepositives: [ 'Some management tools' ]
level: medium
tags: [ attack.execution, attack.t1059.001 ]

Documented example, not captured output.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docSecurity monitoring, detection and operations current

Authoritative/upstream documentation reviewed for bounded claims in Detection Engineering → Detection Rule. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://sigmahq.io/docs/basics/rules.html · confidence 94%
Confirmation

Confirm action

Continue?