Skip to content
LessIT

Microsoft Sentinel

Build KQL Analytics Rules & Threat Detection

Master KQL query language for security analytics, build scheduled and near-real-time (NRT) detection rules, configure Fusion correlation, and implement MITRE ATT&CK-mapped detections for identity, endpoint, and cloud threats.

Intermediate 90 min 12 steps

Where it fits: lab 1 of 5

Detect, hunt and respond in Microsoft Sentinel. Write detections, automate response, hunt by MITRE technique, then go deep on analytics rules, watchlists and playbooks.

  1. Build KQL Analytics Rules & Threat Detection 90 min
  2. Automate Incident Response with Playbooks 90 min
  3. Enterprise Threat Hunting with MITRE ATT&CK 120 min
  4. Threat Detection with Analytics Rules, Watchlists and the Rule KQL API 5.3 h
  5. Automate Threat Response with Playbooks 2.5 h

What this lab covers

This lab deepens your Sentinel skills by building production-grade analytics rules using KQL. You will create detections for real-world attack scenarios including password spray, impossible travel, and MFA fatigue. Each detection is mapped to the MITRE ATT&CK framework and tuned with watchlists and threat intelligence to minimize false positives while maximizing coverage across identity, endpoint, and cloud attack surfaces.

The enterprise scenario

A healthcare organization with 5,000 employees experiences credential stuffing, impossible travel, and suspicious mailbox access. Their Security Operations Center (SOC) team needs automated detections mapped to MITRE ATT&CK to identify and respond to these identity-based attacks in real time. Regulatory requirements (HIPAA, HITRUST) demand documented detection rationale and coverage mapping. The SOC must reduce mean time to detect (MTTD) from days to minutes while maintaining a manageable false positive rate across a 24/7 operation.

What you will learn

  • Write advanced KQL queries with joins, time windows, and statistical functions
  • Create scheduled analytics rules with proper entity mapping
  • Deploy near-real-time (NRT) rules for critical detections
  • Configure Fusion rules for multi-stage attack detection
  • Map rules to MITRE ATT&CK framework tactics and techniques
  • Tune alert thresholds to reduce false positives
  • Build detections for impossible travel, password spray, and MFA fatigue
  • Use watchlists and threat intelligence indicators in analytics rules

Before you start

  • Completed Lab 1 . Microsoft Sentinel deployed with the Microsoft Entra ID data connector configured and active ( Sentinel Lab 01 )
  • Microsoft Sentinel Contributor role . Required to create and manage analytics rules, watchlists, and threat intelligence indicators
  • Data flowing in SigninLogs and AuditLogs tables . Verify that sign-in and audit events are actively being ingested (at least 24 hours of data recommended)
  • Basic KQL knowledge . You should be comfortable with where , summarize , project , and extend operators
  • Microsoft Entra ID P1 or P2 license . Required for sign-in log availability and conditional access data

The 12 steps

  1. Review Ingested Data Sources
  2. Write a Password Spray Detection Query
  3. Build an Impossible Travel Detection
  4. Detect MFA Fatigue Attacks
  5. Create a Scheduled Analytics Rule (Password Spray)
  6. Create a Near-Real-Time (NRT) Rule
  7. Configure Fusion Rules
  8. Import Threat Intelligence Indicators
  9. Create Watchlists for Allowlisting
  10. Map Detections to MITRE ATT&CK
  11. Tune and Test Your Rules
  12. Review & Document Detection Library

Related labs