Query Details
// H𝗼𝘄 𝗺𝗮𝗻𝘆 𝗖𝗿𝗼𝘄𝗱𝗦𝘁𝗿𝗶𝗸𝗲 𝗰𝗹𝗶𝗲𝗻𝘁𝘀 𝗿𝘂𝗻𝗻𝗶𝗻𝗴 𝗼𝗻 𝗠𝗶𝗰𝗿𝗼𝘀𝗼𝗳𝘁 𝗔𝘇𝘂𝗿𝗲 𝗴𝗹𝗼𝗯𝗮𝗹𝗹𝘆 // Linkedin Post: https://www.linkedin.com/posts/0x534c_fileprofile-function-in-advanced-hunting-activity-7232990010898010112-G2Lg/ // While brainstorming on how to KQL detect Bring Your Own Vulnerable Driver (BYOVD) exploits in recent Zero Day CVE-2024-38193 by APT North Korean Lazarus, I was exploring the recent addition of FileProfile() enrichment function that adds the following data to files found by the query. // Advance Hunting - FileProfile() // https://learn.microsoft.com/en-us/defender-xdr/advanced-hunting-fileprofile-function DeviceFileEvents | where ActionType == "FileCreated" or ActionType == "FileModified" | where FileName endswith ".sys" | where FolderPath contains "CrowdStrike" | invoke FileProfile(SHA1,10000) | project FileName, FolderPath, GlobalPrevalence, GlobalFirstSeen, GlobalLastSeen | sort by GlobalPrevalence desc // Note: GlobalPrevalence - Number of instances of the entity observed by Microsoft globally
This KQL query is designed to identify CrowdStrike client files with a ".sys" extension that have been created or modified on devices. It specifically looks for these files within folders that contain "CrowdStrike" in their path. The query then uses the FileProfile() function to enrich the data with additional information about these files, such as how prevalent they are globally and when they were first and last seen by Microsoft. Finally, the results are sorted by the global prevalence of the files in descending order.
Here's a simplified breakdown:
FileProfile() function to get additional details about the files.This helps in understanding the distribution and timeline of CrowdStrike client files across Microsoft Azure globally.

Steven Lim
Released: August 25, 2024
Tables
Keywords
Operators