cso-hunting-query

Guides learners through writing KQL threat-hunting queries for LOLBin abuse in Microsoft Sentinel.

2|Updated Jun 1, 2026
One-click install
npx skills add https://github.com/jay-steenbergen/MSSAMentorAgent --skill cso-hunting-query-jay-steenbergen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cso-hunting-query
Source: https://github.com/jay-steenbergen/MSSAMentorAgent/tree/main/.github/skills/tracks/cybersecurity-ops/cso-hunting-query
Command: npx skills add https://github.com/jay-steenbergen/MSSAMentorAgent --skill cso-hunting-query-jay-steenbergen

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Security learners often know detection rules but lack hands-on experience with proactive threat hunting. This Skill teaches the full hunt loop — writing a KQL query against DeviceProcessEvents, saving it as a Sentinel Hunt, bookmarking suspicious results, and iterating — using LOLBins (Living Off The Land Binaries) as the concrete target. ## Core Features & Use Cases - LOLBin Hunt Query Construction: Build KQL queries against DeviceProcessEvents targeting rundll32, regsvr32, mshta, certutil, bitsadmin, wscript, and cscript with suspicious command-line patterns like remote downloads and base64 decoding. - Sentinel Hunt Management: Save queries as Sentinel Hunts with MITRE ATT&CK tactic and technique tagging (T1218, T1059), entity mapping, and bookmark promotion to incidents. - Iterative Refinement: Add exclusions for known-good processes, new LOLBin patterns, and joins with DeviceNetworkEvents to reconstruct attack chains. - Use Case: A cybersecurity student runs a hunt, finds a suspicious certutil download spawned from winword.exe, bookmarks it, and promotes it to an incident — practicing the exact workflow a SOC analyst uses. ## Quick Start Ask the Mentor to start the cso-hunting-query project and walk you through writing a LOLBin hunt query in Sentinel.

Frequently Asked Questions about cso-hunting-query

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write a threat hunting query in Microsoft Sentinel?

Write a KQL query against DeviceProcessEvents filtering for suspicious process names and command-line patterns, then save it under Sentinel Hunting as a new query. Add entity mappings and MITRE tactic and technique tags so the hunt is discoverable and shareable.

What are LOLBins and how do I detect them with KQL?

LOLBins are legitimate Microsoft-signed Windows binaries like rundll32, certutil, and mshta that attackers abuse for execution and downloads. Detect them by filtering DeviceProcessEvents for these file names combined with command-line indicators such as http URLs, urlcache, or base64 decoding flags.

What is the difference between threat hunting and detection rules in Sentinel?

A hunt is a saved query run on-demand by an analyst to proactively search for threats, while a detection rule runs automatically on a schedule and fires alerts. Hunts that repeatedly find the same malicious pattern are candidates for promotion into scheduled analytics rules.

How do I bookmark hunt results in Microsoft Sentinel?

Run the hunt, right-click a suspicious row in the results pane, and select Add bookmark with a descriptive name and notes. Bookmarks preserve a snapshot of the row even after data retention expires and can be promoted to a new incident or attached to an existing one.

Why does my KQL hunt query return zero results?

Zero results usually mean no telemetry is flowing from your VM or no matching activity occurred. Verify data ingestion with DeviceProcessEvents summarized by DeviceName, or generate test activity by running a simulated attack in your lab environment.

When should I use has_any instead of multiple or conditions in KQL?

Use has_any when matching any of several substrings in a field like ProcessCommandLine, because KQL optimizes it into a single token scan. It is faster and more readable than chaining multiple or has clauses for the same column.