T1218.004

InstallUtil

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.

Microsoft Sentinel / Defender
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

Data Sources

Process: Process Creation Command: Command Execution Microsoft Defender for Endpoint

Required Tables

DeviceProcessEvents

False Positives

  • 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

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