Skip to content
LessIT

Security Copilot

Copilot in Defender: Threat Hunting Agent Best Practices

Use the Security Copilot threat hunting agent in advanced hunting: conversational hunting, natural language to KQL, reading results, smart follow-up actions and prompting best practices.

Intermediate 2.5 h 12 steps

Where it fits: lab 3 of 6

Investigate and automate with Security Copilot. Enable Security Copilot, build promptbooks, hunt with the agent, generate playbooks with AI and deploy it across the Microsoft security stack.

  1. Enable Security Copilot & First Investigation 60 min
  2. Build Custom Promptbooks for Incident Triage 90 min
  3. Copilot in Defender: Threat Hunting Agent Best Practices 2.5 h
  4. Generate Playbooks Using AI in Microsoft Sentinel 90 min
  5. Embedded Experiences & Zero Trust Deployment 120 min
  6. Security Copilot: Provisioning, RBAC and Vulnerability Management Agent 3 h

What this lab covers

The Microsoft Security Copilot Threat Hunting Agent is an AI-powered agent built into the advanced hunting experience in the Microsoft Defender portal. Unlike the Query assistant mode (which generates KQL from natural language), the Threat Hunting Agent delivers a complete, conversational threat hunting experience . It generates KQL queries, runs them automatically, interprets results with natural language observations and charts, surfaces contextual insights from related data sources, and recommends smart follow-up questions and remediation actions - all within a single conversational session.

This lab provides a comprehensive, hands-on walkthrough of the Threat Hunting Agent. You will practice real-world hunting scenarios - investigating alerts, tracking indicators of compromise, validating threat intelligence reports, and proactively testing security hypotheses - while applying prompting best practices that maximize accuracy and efficiency.

The enterprise scenario

Scenario: A mid-size enterprise SOC receives a threat intelligence report indicating that a nation-state actor is targeting organizations in their industry using Living-off-the-Land (LOL) techniques, compromised VPN credentials, and lateral movement through RDP. The SOC has 5 analysts with varying KQL expertise - from Tier 1 analysts who have never written a KQL query to a Tier 3 lead who builds custom detection rules.

The Solution: The Threat Hunting Agent enables every analyst - regardless of KQL expertise - to hunt threats conversationally. Tier 1 analysts ask natural language questions and receive direct answers with auto-generated charts. The Tier 3 lead uses the agent to accelerate complex multi-step hunts, reviewing the generated KQL for accuracy while leveraging smart suggestions to drive the investigation forward. The entire team hunts faster, more accurately, and with greater confidence.

What you will learn

  • Understand the difference between the Threat Hunting Agent and the Query assistant
  • Enable and configure the Threat Hunting Agent in the Defender portal
  • Craft effective natural language prompts using goal, context, expectations, and source
  • Investigate alerts and incidents using conversational hunting
  • Hunt for indicators of compromise (IOCs) with follow-up pivots
  • Validate threat intelligence reports against your environment's data
  • Proactively test security hypotheses with the agent
  • Interpret observations, charts, and contextual insights

Before you start

  • Microsoft Security Copilot access - provisioned capacity (SCU) and assigned Copilot Contributor or Copilot Owner role
  • Microsoft Defender XDR license - Microsoft 365 E5 or Microsoft Defender P2 to access advanced hunting
  • Defender portal access at security.microsoft.com with at least Security Reader role
  • Advanced hunting data - at least 30 days of data across endpoint, identity, email, and cloud app tables for meaningful hunting exercises
  • Recommended: Complete the Security Copilot Fundamentals lab (Lab 01) before starting this lab

The 12 steps

  1. Verify Access and Enable the Threat Hunting Agent
  2. Master Prompting Best Practices
  3. Your First Threat Hunt
  4. Investigate an Alert or Incident
  5. Hunt for Indicators of Compromise (IOCs)
  6. Validate a Threat Intelligence Report
  7. Proactive Hypothesis-Driven Hunting
  8. Work with Observations and Charts
  9. Modify Generated Queries and Use Advanced Hunting Features
  10. Create Detection Rules from Successful Hunts
  11. Supported Tables and Scope Reference
  12. Session Management and Feedback