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.
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
) Data Sources
Required Tables
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
References (7)
- https://attack.mitre.org/techniques/T1218/004/
- https://lolbas-project.github.io/lolbas/Binaries/Installutil/
- https://msdn.microsoft.com/en-us/library/50614e95.aspx
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1218.004/T1218.004.md
- https://unit42.paloaltonetworks.com/attackers-tactics-and-techniques-in-unsecured-docker-daemons-revealed/
- https://www.cybereason.com/blog/operation-cobalt-kitty-apt
- https://www.anomali.com/blog/mustang-panda-threat-actor-targets-minority-groups-journalists-and-activists
Unlock Pro Content
Get the full detection package for T1218.004 including response playbook, investigation guide, and atomic red team tests.