Query Details
// https://www.varonis.com/blog/cookie-bite
// https://www.bleepingcomputer.com/news/security/cookie-bite-attack-poc-uses-chrome-extension-to-steal-session-tokens/
let EPwithNewExt =
DeviceFileEvents
| where ActionType == "FileCreated"
| where FileName endswith ".crx"
| distinct DeviceName;
DeviceProcessEvents
| where FileName =~ "powershell.exe" or InitiatingProcessFileName =~"powershell.exe"
| where ProcessCommandLine has_any ("load-extension")
| where DeviceName has_any(EPwithNewExt)
This KQL (Kusto Query Language) query is designed to identify potential security threats related to the installation of Chrome extensions and the use of PowerShell on devices. Here's a simplified breakdown of what the query does:
Identify Devices with New Chrome Extensions:
let EPwithNewExt = ...) looks at DeviceFileEvents to find instances where a file with the extension ".crx" (which is a Chrome extension file) has been created.DeviceName) where these new Chrome extensions have been added.Detect PowerShell Usage Related to Extensions:
DeviceProcessEvents ...) examines DeviceProcessEvents to find processes where either the FileName or InitiatingProcessFileName is "powershell.exe".ProcessCommandLine includes the term "load-extension", indicating that PowerShell is being used to load a Chrome extension.In summary, this query is used to detect suspicious activity where new Chrome extensions are installed, and PowerShell is used to load these extensions, potentially indicating malicious behavior or a security threat.

Steven Lim
Released: April 24, 2025
Tables
Keywords
Operators