Record 8adc088dcc62a6350de6b584 · v1
Schema CheckedNot runtime validated
detect-malcious-use-of-msiexec
Source repository hunting query
Generation sourcesource-file · Limited verification
Attributionmicrosoft
Last updated06 Aug 2020, 12:01 PM IST
Last checked17 Oct 2026
Kusto query · 22 linesTable: DeviceProcessEvents · Microsoft Defender XDR / Sentinel
//Find possible download and execution using MsiexecDeviceProcessEvents| where Timestamp > ago(7d)//MSIExec| where FileName =~ "msiexec.exe" and //With domain in command line(ProcessCommandLine has "http" and ProcessCommandLine has "return")//Find PowerShell running files from the temp folderDeviceProcessEvents| where Timestamp > ago(7d)//Looking for PowerShell| where FileName =~ "powershell.exe"//Looking for %temp% in the command line indicating deployment and ProcessCommandLine contains "%temp%"//Find credential theft attempts using Msiexec to run Mimikatz commandsDeviceProcessEvents| where Timestamp > ago(7d)| where InitiatingProcessFileName =~ "msiexec.exe"//Mimikatz commandsand (ProcessCommandLine contains "privilege::" or ProcessCommandLine has "sekurlsa" or ProcessCommandLine contains "token::")SecOps Signal does not execute queries against private telemetry. Paste the query into Microsoft Sentinel Log Analytics or Defender advanced hunting and review it first. Passed structure and schema checks; tenant execution is not verified.
Query anatomy
Static check against a reviewed column list— This query has no final project stage to list.
“Listed” only means the column name appears in the reviewed list for that table. It does not confirm the column exists in your tenant's current schema, and per-column purposes are not recorded.
Hunting notes
MITRE ATT&CKNot mapped
Analytical purpose
Source repository hunting query
When to use
Review the source query and adapt it to your tenant before use.
Limitations
Schema checked only. This query has not been executed against a Sentinel or Defender tenant.