Security operations with Microsoft Defender · Refine

Hunt for threats and build custom detections

Regular hunting in advanced hunting, with the best queries turned into custom detections.

Duration
Ongoing
Effort
A few hours a week
Complexity
Medium
Beyond E5
Nothing beyond Microsoft 365 E5

Who's in the room: Security analysts with hunting skills (owners), security operations lead

On this page

Overview

Advanced hunting is a query-based tool for exploring up to 30 days of raw Defender data across devices, email, identities and cloud apps, in a guided mode or with Kusto Query Language. A query that finds something worth knowing can become a custom detection rule, which runs on a schedule, creates alerts and can take response actions.

Technically, analysts use advanced hunting's guided or advanced mode, save queries, and create custom detection rules with a frequency, alert details, response actions and a scope. Permissions follow the data each rule queries.

You'll end up with: A hunting rhythm, a library of saved queries, and custom detections for the techniques that matter to the organization.

If you skip it: Without hunting, the team only sees what the built-in detections were designed to catch.

Before you start

  • Run incident response in Microsoft Defender: The incident queue worked daily: owners, investigation across the attack story, response actions and classified resolutions.
  • Have analysts with the right access
    How to do it

    Hunting needs read access to the tables analysts will query, and managing custom detections needs manage permissions for every data source the rule uses.

    Who: Defender administratorProduces: Hunting and detection permissions

Trial to adoption

3 phases
  1. Hunt on a scheduleWeekly

    Set aside time each week to hunt, starting from threat analytics, recent incidents or techniques in the use case registry.

    Who: Security analystsProduces: Saved queries and findings

    Move on when Each hunt records what was looked for, what was found and whether a detection is needed.

    How to do it

    Use guided mode if you're not yet familiar with KQL, and advanced mode to write queries from scratch. Advanced hunting covers up to 30 days of raw data by default; longer periods depend on licences or a connected Microsoft Sentinel workspace.

    Watch out for (1)
    • If you: Hunt without writing down what you looked for

      What tends to happen: The same hunt is repeated, and findings are lost

      A better approach:

      Record every hunt's question, query and result, even when nothing was found

  2. Turn findings into detectionsAs needed

    Create a custom detection rule from a query worth running again, with clear alert details, a frequency and, where safe, a response action.

    Who: Security analysts with the security operations leadProduces: Custom detection rules

    Move on when Each rule has been tested in advanced hunting and its alerts reach the queue as expected.

    How to do it

    Available frequencies are every 24, 12, 3 or 1 hours, or Continuous (near real time). A new rule checks the past 30 days of data when saved. Continuous rules must query a single table without joins or unions.

    Watch out for (1)
    • If you: Add an automatic response action to a new rule straight away

      What tends to happen: A noisy rule isolates devices or quarantines files that were fine

      A better approach:

      Run a new rule without response actions until its results are trusted

  3. Review rulesQuarterly

    Review custom detections: alerts produced, false positives and whether each is still needed.

    Who: Security operations leadProduces: A reviewed rule set

    Move on when Every rule has an owner and produced useful alerts, or has been changed or removed.

Alongside every phase:

Share hunting results with the threat intelligence and engineering owners, so a finding can also become a configuration change rather than only a detection.

What keeps it in place:

Custom detection rules run automatically at their frequency, and their alerts join incidents like any other.

How you'll know it's working

2 measures

Capture a baseline before you start, or you won't be able to show the change.

Measures, where you see them, and the direction that means success
MeasureWhere you see itGood direction
Hunts recorded per monthHunting log Steady
Custom detections with true positive alertsDefender incident queue Up

Take it with you

plan, gate checks, 1 template

Plan outline: phases and when to move on

  1. Hunt on a schedule (Weekly). Move on when: Each hunt records what was looked for, what was found and whether a detection is needed.
  2. Turn findings into detections (As needed). Move on when: Each rule has been tested in advanced hunting and its alerts reach the queue as expected.
  3. Review rules (Quarterly). Move on when: Every rule has an owner and produced useful alerts, or has been changed or removed.

Gate checks: questions to answer before each phase ends

Before leaving Hunt on a schedule

  • Was each hunt recorded?

Before leaving Turn findings into detections

  • Was each rule's query run in advanced hunting before saving?

Before leaving Review rules

  • Does every custom detection have an owner?

Hunt record

Question: [what we looked for]. Source: [threat analytics / incident / use case]. Query: [saved query name]. Result: [findings]. Follow-up: [detection, configuration change, none].

Microsoft Learn

3 links

Contributor

Compare notes or suggest an improvement

Your message goes straight to Sev Derghazarian.

What would you like to do?

Subject:

The send button is enabled once the spam check below completes.

Changelog

Changelog (1 version)
Published versions of this playbook
VersionDateByChange
1Sev DerghazarianFirst draft.