Module 16 · SIEM and Log Management · Lesson 48 of 75

Detection engineering and threat hunting

Write portable detections with Sigma, test and tune them, measure coverage against MITRE ATT&CK, and hunt for attackers the alerts missed.

In this lesson · about 40 minutes

  • Read and adapt a Sigma rule
  • Tune a noisy rule without blinding it
  • Run a hypothesis-driven threat hunt

Sigma: detections you can share

Sigma is an open, YAML-based rule format that converts to SPL, KQL, Elastic and others.

title: Office Application Spawning a Shell
id: 7c1d2b9e-1f0a-4a9b-9b1c-2a6d0f3e4b51
status: stable
logsource:
  product: windows
  category: process_creation
detection:
  parent:
    ParentImage|endswith:
      - '\winword.exe'
      - '\excel.exe'
      - '\powerpnt.exe'
  child:
    Image|endswith:
      - '\powershell.exe'
      - '\cmd.exe'
      - '\wscript.exe'
      - '\mshta.exe'
  condition: parent and child
falsepositives:
  - Rare legitimate add-ins
level: high
tags:
  - attack.execution
  - attack.t1204.002

The detection lifecycle

  1. Hypothesis from threat intel or ATT&CK: "attackers use encoded PowerShell".
  2. Data: do we collect the needed logs (command-line logging, Sysmon)?
  3. Write the rule; test it by safely simulating the behaviour (Atomic Red Team tests are built for this) and by running it over 30 days of history to see the false-positive rate.
  4. Deploy with a runbook: what the analyst should check.
  5. Tune: exclude specific, verified benign cases (one signed IT tool on one server group), never broad ones (all of PowerShell).
  6. Review regularly; map coverage on the ATT&CK matrix to find gaps.

Threat hunting

  • Hypothesis-driven: "If an attacker used scheduled tasks for persistence, we'd see new tasks created by non-admin processes."
  • Stacking / frequency analysis: list all autoruns or services across 3,000 machines and look at the ones that appear on only one or two.
  • IOC sweeps: search all history for indicators from a new threat report (Module 19).
  • Every successful hunt should end with a new detection, so the same thing is caught automatically next time.

Decision scenario

Tune the noisy rule

You own the rule 'PowerShell with encoded command'. It fires 400 times a day.

Investigation shows 390 of the daily hits come from the software deployment tool C:\Program Files\DeployCo\agent.exe on all workstations, running the same signed script. The other 10 vary.

What do you recommend?

0 of 3 options explored. Try the others to see how each would play out.

Flashcards

Module 16 flashcards

0 of 10 known

Say the answer out loud, flip the card, then be honest: cards you miss come back at the end.

10 left in the deck

Practice exam

Module 16 checkpoint

10 questions, 12 minutes.

  • 10 questions · 12 minutes
  • No feedback until you submit. Flag questions to come back to them.
  • Aim for 85% or better before you move on. The real exam's 750 out of 900 is roughly 80–83%.

Written by Noviq Academy in its own words. All labs are simulations: no real systems are touched, and every name, address, password and hash is made up. The offensive techniques taught here are for defending systems and for authorised testing only; never scan, access or test a system without the owner's written permission. Tool and product names belong to their owners, and command output may differ slightly from yours. Read-aloud uses your device's built-in voices.