Query Details
// LLM Hunting in a MDE Environment let LLM_ModelName = ExposureGraphNodes | where NodeLabel == "baseModel" | project parse_json(NodeProperties)["rawData"]["aiModelMetadata"]["modelName"]; DeviceFileEvents | where Timestamp > ago (30d) | where InitiatingProcessVersionInfoFileDescription has_any (LLM_ModelName) or InitiatingProcessFolderPath has_any (LLM_ModelName) or InitiatingProcessFileName has_any (LLM_ModelName)
This query is designed to identify events related to specific language models in a Microsoft Defender for Endpoint (MDE) environment over the past 30 days. Here's a simple breakdown:
Identify Language Models:
ExposureGraphNodes to find nodes labeled as "baseModel".modelName from aiModelMetadata.Search for Related File Events:
DeviceFileEvents that have occurred in the last 30 days.In summary, the query is hunting for file events that are associated with specific language models by checking various attributes of the initiating process against the model names found in the environment.

Steven Lim
Released: February 11, 2025
Tables
Keywords
Operators