Practical Threat Hunting with Microsoft Defender XDR and KQL

Hunt for What Your Alerts Missed in Microsoft Security.

Form hypotheses and test them with KQL across endpoint, identity, email and cloud data in Defender XDR and Sentinel. Then turn what you find into better detections.

What you'll be able to do

✓Turn threat intelligence and MITRE ATT&CK into hypotheses a result can contradict, and plan each hunt with its data, scope and stop condition
✓Choose the Defender XDR and Sentinel tables that can answer a question, and say what each cannot record
✓Write hunting KQL: half-open windows on each table's own time column, stacking, rarity, peer comparison, temporal joins and dynamic fields
✓Hunt endpoint, identity, email, collaboration and cloud application telemetry for execution, persistence, credential theft, token abuse and backdoor applications
✓Correlate domains to reconstruct an intrusion on one clock, and classify every result by evidence from outside the query that found it
✓Turn hunts into detection specifications, closure reports and program measures, and write a final hunting report whose every number reruns
What students say about this course

“Really appreciate how the training broke down and showed us how to find the stuff that matters and create effective trigger points for detections. Writing KQL queries to hunt for mailbox delegation changes and persistence mechanisms gave us a massive practical experience.”

Ahmad
SEC402 | Included with Premium, from $19.99/month | 10 modules and an orientation | 24 hours at your own pace | 24 CPE credits
A hunting query in the course's browser console with its results: successful sign-ins on one day split by source, with MFA and managed-device counts
Every query runs in the page on a month of Defender XDR and Sentinel data. This one, from the Module 0 preview, splits a day's successful sign-ins by source to test a baseline.

What you'll practice and build

Each lesson is a hunt, and each ends in work you keep. By the end of the course you have:

  • A hypothesis register built from threat intelligence and MITRE ATT&CK, each hypothesis planned with its data, scope and stop condition
  • Hunting KQL for endpoint, identity, email, collaboration and cloud application telemetry, every query run on the course's month of data
  • Hunt records that state what each hunt found, what it did not, and the evidence each conclusion rests on
  • Detection specifications and closure reports that turn finished hunts into lasting coverage
  • An investigation portfolio and final hunting report on a capstone case you have not seen

Who this course is for

SOC analysts, threat hunters, incident responders and security engineers who work Microsoft security telemetry and want to find what alerts miss. Every concept is explained where it is first used.

What this course does not cover: Sentinel administration, detection engineering as a discipline, which SEC401 teaches, non-Microsoft SIEMs, and preparation for vendor certification exams.

Before you start

Prerequisites
KQL basics
Hands-on setup
None. You can complete the course without setting anything up.
Certification
Core preparation for the Ridgeline Certified Threat Hunting Specialist (RCTH): take this course and either SEC201 or SEC405.

Course Syllabus

Every module and every lesson. The first three modules are open; the rest open on a click.

Download the full syllabus (PDF)

Course Orientation

Module 0Practical Threat HuntingCourse Preview

Module 0 of Practical Threat Hunting with Microsoft Defender XDR and KQL: what threat hunting is, the course's tenant, the data the course hunts in, a first hunt, how hunts are practiced here, and what the course builds.

Show 6 lessonsHide lessons
  1. 0.10.1 What Threat Hunting Is and Why It Finds What Alerts MissPreview
  2. 0.20.2 The Tenant: the Case Every Hunt Runs OnPreview
  3. 0.30.3 The Data This Course Hunts InPreview
  4. 0.40.4 Your First HuntPreview
  5. 0.50.5 How Hunts Are Practiced HerePreview
  6. 0.60.6 What This Course BuildsPreview

Phase 1: Foundations

Module 1Introduction to Microsoft Threat Hunting

What a threat hunt is and the gap it fills, the PEAK lifecycle, the types of hunt, where Defender XDR and Sentinel keep the data and for how long, the evidence standard a hunt result is held to, and a hunt plan written before any query runs.

Show 6 lessonsHide lessons
  1. 1.11.1 Threat Hunting Fundamentals
  2. 1.21.2 The Hunting Lifecycle
  3. 1.31.3 Types of Hunts
  4. 1.41.4 The Microsoft Hunting Ecosystem
  5. 1.51.5 Methodology and Evidence Standards
  6. 1.61.6 Exercise: Plan a Hunt for a Suspicious Authentication
Module 2Threat Intelligence, MITRE ATT&CK and Hunt Hypotheses

Where hunts come from: intelligence read for behaviors, an indicator feed cut to what is worth sweeping, ATT&CK from a technique to a table, hypotheses written to be refuted, ranking on relevance, impact and data, and a register and plan that turn the top entry into a hunt.

Show 6 lessonsHide lessons
  1. 2.12.1 Intelligence for Hunters
  2. 2.22.2 ATT&CK for Hunting
  3. 2.32.3 Developing Hypotheses
  4. 2.42.4 Threat-Informed Prioritization
  5. 2.52.5 The Hunting Plan
  6. 2.62.6 Lab 01: Hypotheses from a Credential-Theft Report

Phase 2: Platform and Language

Module 3Defender XDR and Sentinel Hunting Fundamentals

Five hunts across the Defender portal: living-off-the-land tools on the laptops, where they connect, what Sentinel collects for the servers, the edges of the data around remote PowerShell, and an escalation carried across both schemas. Lab 02 builds a query-backed telemetry matrix.

Show 6 lessonsHide lessons
  1. 3.13.1 Advanced Hunting
  2. 3.23.2 Defender XDR Hunting Tables
  3. 3.33.3 Sentinel Hunting Architecture
  4. 3.43.4 Telemetry Availability and Limits
  5. 3.53.5 Cross-Platform Workflows: Sentinel Hunts and Bookmarks
  6. 3.63.6 Lab 02: Tables and Fields for Four Questions
Module 4KQL for Threat Hunting

Five hunts that teach the KQL a hunter needs beyond a first course: absolute windows and the two schemas, extraction from JSON and text, baselines and peer comparison, sequences and temporal joins, paths, cost and troubleshooting. Labs 03 and 04 find unusual PowerShell and follow it to the network, and close on a query pack graded by running.

Show 7 lessonsHide lessons
  1. 4.14.1 Time, Scope and the Two Schemas
  2. 4.24.2 Extraction from Dynamic and Text Fields
  3. 4.34.3 Baselines, Stacking, Rare Events and Peer Comparison
  4. 4.44.4 Sequences, Sessions and Temporal Joins
  5. 4.54.5 Paths, Query Cost and Troubleshooting
  6. 4.64.6 Lab 03: Unusual PowerShell
  7. 4.74.7 Lab 04: Execution, then Connection

Phase 3: Hunting Domains

Module 5Endpoint Threat Hunting with Defender for Endpoint

Five hunts that build the endpoint baselines a hunter reads an intrusion against: process lineage and ASR audits, execution, persistence, process access and Defender's health, and network and logons. Labs 05 and 06 follow two laptops through the same delivery and close on an investigation report in which every value is emitted by a query.

Show 7 lessonsHide lessons
  1. 5.15.1 Endpoint Hunting Fundamentals
  2. 5.25.2 Suspicious Execution
  3. 5.35.3 Persistence
  4. 5.45.4 Credential Access and Defense Evasion
  5. 5.55.5 Endpoint Network and Lateral Movement
  6. 5.65.6 Lab 05: PowerShell Execution Chain
  7. 5.75.7 Lab 06: The Unfamiliar Program
Module 6Identity and Privileged Access Threat Hunting

Five hunts across Entra ID and on-premises identity: the tables and their keys, what followed the month's credential attacks, sign-ins that do not fit their account, who changes roles and consents, and whether a dumped credential was used. Lab 07 follows the sync account to a backdoor app and closes on an identity report in which every value is emitted by a query.

Show 6 lessonsHide lessons
  1. 6.16.1 Identity Hunting Telemetry
  2. 6.26.2 Credential Attacks
  3. 6.36.3 Suspicious Authentication and Sessions
  4. 6.46.4 Privileged Identity and Persistence
  5. 6.56.5 Identity Investigation and Correlation
  6. 6.66.6 Lab 07: From a Sync Server to a Backdoor App
Module 7Email, Collaboration and Cloud Application Threat Hunting

Five hunts across Microsoft 365: the message tables and what delivery and clicks prove, the campaigns the filter misjudged, mailbox rules and reads, consents users granted to applications, and file activity against the alerts that watch it. Lab 08 follows an invoice lure to a replayed session, its persistence and an administrator sign-in, and closes on a report in which every value is emitted by a query.

Show 6 lessonsHide lessons
  1. 7.17.1 Email Hunting Telemetry
  2. 7.27.2 Phishing and Business Email Compromise
  3. 7.37.3 Mailbox Persistence and Abuse
  4. 7.47.4 Cloud Applications and OAuth
  5. 7.57.5 SharePoint, OneDrive and Teams Activity
  6. 7.67.6 Lab 08: The Invoice Lure

Phase 4: Correlation and Operations

Module 8Advanced Hunting, Correlation and Attack Reconstruction

Five hunts that read across domains: one account on two identity planes, network logons between machines, outbound flows nothing explains, the minutes before ransomware encrypts, and every established thread on one timeline. Lab 09 follows a service account across three hosts and closes on a Multi-Stage Timeline and Evidence Matrix in which every value is emitted by a query.

Show 6 lessonsHide lessons
  1. 8.18.1 Cross-Domain Hunting
  2. 8.28.2 Lateral Movement and Multi-Stage Intrusions
  3. 8.38.3 Hunting Data Exfiltration
  4. 8.48.4 Hunting Pre-Ransomware Activity
  5. 8.58.5 Attack Timeline Reconstruction
  6. 8.68.6 Lab 09: The Service Account Path
Module 9Operationalizing Threat Hunting and Detection Improvements

Five hunts about the hunting itself: a record anyone can rebuild, results classified into five outcomes, a hunt converted into a tested detection, rules kept under version control and review, and the program measured. Two labs specify a detection for production and validate a colleague's rule on mixed data.

Show 7 lessonsHide lessons
  1. 9.19.1 Findings and Evidence Management
  2. 9.29.2 Hunt Validation and Outcome Classification
  3. 9.39.3 Converting Hunts into Detection Rules
  4. 9.49.4 Hunt Content Management and Reusability
  5. 9.59.5 Threat Hunting Program Effectiveness
  6. 9.69.6 Lab 10: A Detection Specification
  7. 9.79.7 Lab 11: Independent Validation

Phase 5: Capstone

Module 10Capstone: End-to-End Microsoft Threat Hunting Investigation

The course's method on two cases. Five lessons work one account with twelve alarming signals to a verdict and a report; the lab follows one risky sign-in, unseen, to a compromised server and a live backdoor, and delivers the Investigation Portfolio.

Show 6 lessonsHide lessons
  1. 10.110.1 Scenario and Hunt Planning
  2. 10.210.2 Telemetry Selection and KQL Development
  3. 10.310.3 Evidence Analysis and Threat Correlation
  4. 10.410.4 Findings and Security Recommendations
  5. 10.510.5 The Final Hunting Report and Technical Assessment
  6. 10.610.6 Lab 12: The Investigation Portfolio

Phase 0: Course Resources

ResourcesCookbooks

Six threat hunting runbooks for SEC402: plan a hunt, prove a silence, classify results, trace a sign-in, rebuild a timeline, write a detection.

Show 6 lessonsHide lessons
  1. 1Planning a Hunt
  2. 2Proving a Silence
  3. 3Classifying Hunt Results
  4. 4Following a Sign-in to Its Source
  5. 5Reconstructing a Timeline
  6. 6Turning a Hunt into a Detection
ResourcesLab Setup

Running SEC402 hunts in the browser and in your own Defender XDR or Sentinel tenant, and how far each table in the course data reaches.

Show 3 lessonsHide lessons
  1. 1Hunting in the Browser
  2. 2Hunting in Your Own Tenant
  3. 3How Far the Data Reaches
ResourcesWalkthroughs

Four worked threat hunts for SEC402 on threads the course counted and never opened: two kerberoasts, a domain spray, a DCSync and DCShadow, and directory reconnaissance.

Show 4 lessonsHide lessons
  1. 1The Kerberoast That Looked Ordinary
  2. 2The Spray That Reached the Domain
  3. 3The Laptop That Became a Domain Controller
  4. 4Three Readings of the Whole Directory
ResourcesPlaybooks

Six SEC402 playbooks for the moment a hunt confirms something: risky sign-in, Office child, credential dump, backdoor app, ransomware precursors, telemetry gap.

Show 6 lessonsHide lessons
  1. 1A Confirmed Risky Sign-in
  2. 2A Malicious Office Child Process
  3. 3Credential Dumping
  4. 4A Backdoor Application or Service Principal
  5. 5Ransomware Precursors
  6. 6A Telemetry Gap
ResourcesPlayground

Where to practice threat hunting after each lesson and after the course: every course scenario, the templates and models, and the practice places that run on the same data.

Show 3 lessonsHide lessons
  1. 1Course Scenarios
  2. 2Templates and Models
  3. 3Practice Beyond the Course
ResourcesReferences

The sources behind Practical Threat Hunting with Microsoft Defender XDR and KQL, grouped by subject.

Show 1 lessonHide lessons
  1. 1Sources by Subject

Course Completion

CompletionCourse Exam

Practical Threat Hunting with Microsoft Defender XDR and KQL end-of-course exam: ten tasks, one per content module, each answered by writing KQL against the course's month and checked on the server.

Show 1 lessonHide lessons
  1. 1Course Completion. Practical Threat Hunting with Microsoft Defender XDR and KQL

Course overview

Threat hunting is the search for activity no alert reported. It is done well when every step can be checked: a hypothesis a result could contradict, tables chosen because they record what the hypothesis predicts, queries whose results are read for what they do and do not prove, and findings written at the strength the evidence supports.

Module 1 sets out the method and Module 2 turns intelligence and ATT&CK into hypotheses. Modules 3 and 4 cover the platforms and the KQL hunting depends on. Modules 5 to 7 hunt endpoints, identity, and email, collaboration and cloud applications. Module 8 correlates them into one account of an intrusion, Module 9 turns hunts into detections and a program, and Module 10 is a capstone hunt from a plan to a final report.

How this course works

Every query runs. The course hunts in a month of Defender XDR and Sentinel telemetry from a fictional firm, loaded into the page. Every query block runs in your browser and can be edited, and the result shown beside it is the one it returns. A Defender or Sentinel tenant of your own is optional, and the lab setup pages say what to change to run the same queries there.

Each lesson is a hunt. A brief sets the question, the steps run the queries, and each lesson ends with a practice tool on the same data: a hunt notebook, evidence questions or a pivot workbench, with a record of what was found and what was not.

The labs produce documents. 12 labs, from a hypothesis register to an investigation portfolio, use 11 hunting templates, each with a completed model to compare against once your own is done. The course resources add cheatsheets, runbooks, worked walkthroughs and playbooks for the moment a hunt confirms something.

What you will learn

✓ Turn threat intelligence and MITRE ATT&CK into hypotheses a result can contradict, and plan each hunt with its data, scope and stop condition
✓ Choose the Defender XDR and Sentinel tables that can answer a question, and say what each cannot record
✓ Write hunting KQL: half-open windows on each table's own time column, stacking, rarity, peer comparison, temporal joins and dynamic fields
✓ Hunt endpoint, identity, email, collaboration and cloud application telemetry for execution, persistence, credential theft, token abuse and backdoor applications
✓ Correlate domains to reconstruct an intrusion on one clock, and classify every result by evidence from outside the query that found it
✓ Turn hunts into detection specifications, closure reports and program measures, and write a final hunting report whose every number reruns

Things you need to know

What are the prerequisites?

Basic SOC operations, Windows and Microsoft 365 security fundamentals, and some familiarity with structured queries. Working KQL helps; Module 4 teaches the hunting-specific constructs, and SEC201 KQL for Security Analysts teaches the language itself.

What do I need?

A browser. Every query runs on the course's data in the page, so no tenant, license or lab is required.

What will I be able to do after this course?

You'll be able to plan and run a hunt in Defender XDR and Sentinel from a hypothesis, write the KQL that tests it, follow evidence across endpoint, identity, email and cloud data, and turn findings into detections. You finish with an investigation portfolio on a case you have not seen.

Usage rights and disclaimer

Course materials: Licensed for individual professional development. You may adapt the templates and your own queries for your organization. You may not redistribute course content or share account credentials.

Fictional environment: Northgate Engineering and everyone in it are fictional. Any resemblance to real organizations or people is coincidental. Ridgeline Cyber is not affiliated with Microsoft.

COURSE ASSESSMENT

End of Course Exam

Complete the course, then hunt: ten tasks answered by writing KQL against the course's month of telemetry, no time limit. Pass mark: 70. Earn your certificate with CPE credits.

10tasks
10modules
100points
Take End of Course Exam

Answers are checked on the server. Certificate issued on pass.