T1218.004 Microsoft Sentinel · KQL

Detect InstallUtil in Microsoft Sentinel

Adversaries may use InstallUtil to proxy execution of code through a trusted Windows utility. InstallUtil is a command-line utility that allows for installation and uninstallation of resources by executing specific installer components specified in .NET binaries. The InstallUtil binary is digitally signed by Microsoft and located in the .NET directories. InstallUtil may also bypass application control by using the [System.ComponentModel.RunInstaller(true)] attribute decorator pattern. Known users of this technique include Mustang Panda (Beacon stager), WhisperGate (Windows Defender disable), Chaes malware, Saint Bot, and the Covenant C2 framework.

MITRE ATT&CK

Tactic
Defense Evasion
Technique
T1218 System Binary Proxy Execution
Sub-technique
T1218.004 InstallUtil
Canonical reference
https://attack.mitre.org/techniques/T1218/004/

KQL Detection Query

Microsoft Sentinel (KQL)
kusto
DeviceProcessEvents
| where Timestamp > ago(24h)
| where FileName =~ "installutil.exe"
| extend SuspiciousPath = ProcessCommandLine has_any ("Temp", "AppData", "Downloads", "Public", "ProgramData", "\\Users\\")
| extend HasLogFile = ProcessCommandLine has_any ("/logfile", "/log")
| extend Uninstall = ProcessCommandLine has_any ("/u", "/uninstall")
| extend SuspiciousParent = InitiatingProcessFileName has_any ("cmd.exe", "powershell.exe", "wscript.exe", "cscript.exe", "mshta.exe", "winword.exe", "excel.exe")
| extend NonDotNetPath = not(ProcessCommandLine has_any ("Program Files", "Program Files (x86)", "Windows\\"))
| project Timestamp, DeviceName, AccountName, ProcessCommandLine, InitiatingProcessFileName,
         InitiatingProcessCommandLine, SuspiciousPath, SuspiciousParent, Uninstall, HasLogFile, NonDotNetPath
| sort by Timestamp desc
union (
  DeviceProcessEvents
  | where Timestamp > ago(24h)
  | where InitiatingProcessFileName =~ "installutil.exe"
  | project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine,
           InitiatingProcessFileName, InitiatingProcessCommandLine
  | sort by Timestamp desc
)
high severity high confidence

Detects InstallUtil.exe abuse by identifying execution from suspicious paths (Temp, AppData), from unusual parent processes (scripting engines, Office), and any child processes spawned by InstallUtil (which should not occur during legitimate installer operations). Also flags /uninstall usage which adversaries use to trigger the Uninstall method of the RunInstaller attribute.

Data Sources

Process: Process CreationCommand: Command ExecutionMicrosoft Defender for Endpoint

Required Tables

DeviceProcessEvents

False Positives & Tuning

  • Legitimate .NET software installers that use InstallUtil.exe to register Windows services or COM components during installation
  • Software development teams running InstallUtil to install or uninstall custom .NET components during testing
  • IT deployment tools (SCCM, PDQ Deploy) using InstallUtil to deploy .NET-based applications
  • Windows Setup and update processes that invoke InstallUtil for framework component registration
Download portable Sigma rule (.yml)

Other platforms for T1218.004


Testing Methodology

Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1InstallUtil Execution from Temp Directory

    Expected signal: Sysmon Event ID 1: installutil.exe with Temp path in command line, /logfile and /logtoconsole flags. Security Event ID 4688 for the process. Sysmon Event ID 7 (Image Load) for the DLL being loaded.

  2. Test 2InstallUtil with Uninstall Flag

    Expected signal: Sysmon Event ID 1: installutil.exe with /u flag and temp path. Security Event ID 4688. The process will fail if the file doesn't exist or isn't a valid installer assembly, but the process creation event still fires.

  3. Test 3InstallUtil Invoked from PowerShell

    Expected signal: Sysmon Event ID 1: powershell.exe followed by installutil.exe with ParentImage=powershell.exe. Both SuspiciousParent and SuspiciousPath indicators fire. Security Event ID 4688 for both processes.

Unlock Pro Content

Get the full detection package for T1218.004 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections