Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Adversaries may use InstallUtil to proxy execution of code through a trusted Windows utility.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-02 | ✗→✓ | ▲ Improved | 100% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 109% | 0% |
| case-12 | ✗→✓ | ▲ Improved | 72% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 186% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 11% | 0% |
> Sub-technique of: T1218
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 may also be digitally signed by Microsoft and located in the .NET directories on a Windows system: <code>C:\Windows\Microsoft.NET\Framework\v<version>\InstallUtil.exe</code> and <code>C:\Windows\Microsoft.NET\Framework64\v<version>\InstallUtil.exe</code>.
InstallUtil may also be used to bypass application control through use of attributes within the binary that execute the class decorated with the attribute <code>System.ComponentModel.RunInstaller(true)]</code>.
Platforms: Windows
The following tests are from Atomic Red Team and provide actionable ways to test this technique:
Executes the CheckIfInstallable class constructor runner instead of executing InstallUtil. Upon execution, the InstallUtil test harness will be executed. If no output is displayed the test executed successfuly.
Supported Platforms: windows
powershell# Import the required test harness function, Invoke-BuildAndInvokeInstallUtilAssembly . "#{test_harness}" $InstallerAssemblyDir = "#{assembly_dir}" $InstallerAssemblyFileName = "#{assembly_filename}" $InstallerAssemblyFullPath = Join-Path -Path $InstallerAssemblyDir -ChildPath $InstallerAssemblyFileName $ExpectedOutput = 'Constructor_' $TestArgs = @{ OutputAssemblyDirectory = $InstallerAssemblyDir OutputAssemblyFileName = $InstallerAssemblyFileName InvocationMethod = '#{invocation_method}' } $ActualOutput = Invoke-BuildAndInvokeInstallUtilAssembly @TestArgs -MinimumViableAssembly if ($ActualOutput -ne $ExpectedOutput) { throw @" CheckIfInstallable method execution test failure. Installer assembly execution output did not match the expected output. Expected: $ExpectedOutput Actual: $ActualOutput "@ }
Dependencies:
Executes the InstallHelper class constructor runner instead of executing InstallUtil. Upon execution, no output will be displayed if the test executed successfuly.
Supported Platforms: windows
powershell# Import the required test harness function, Invoke-BuildAndInvokeInstallUtilAssembly . "#{test_harness}" $InstallerAssemblyDir = "#{assembly_dir}" $InstallerAssemblyFileName = "#{assembly_filename}" $InstallerAssemblyFullPath = Join-Path -Path $InstallerAssemblyDir -ChildPath $InstallerAssemblyFileName $CommandLine = "/logfile= /logtoconsole=false `"$InstallerAssemblyFullPath`"" $ExpectedOutput = 'Constructor_' $TestArgs = @{ OutputAssemblyDirectory = $InstallerAssemblyDir OutputAssemblyFileName = $InstallerAssemblyFileName InvocationMethod = '#{invocation_method}' CommandLine = $CommandLine } $ActualOutput = Invoke-BuildAndInvokeInstallUtilAssembly @TestArgs -MinimumViableAssembly if ($ActualOutput -ne $ExpectedOutput) { throw @" InstallHelper method execution test failure. Installer assembly execution output did not match the expected output. Expected: $ExpectedOutput Actual: $ActualOutput "@ }
Dependencies:
Executes the installer assembly class constructor. Upon execution, version information will be displayed the .NET framework install utility.
Supported Platforms: windows
powershell# Import the required test harness function, Invoke-BuildAndInvokeInstallUtilAssembly . "#{test_harness}" $InstallerAssemblyDir = "#{assembly_dir}" $InstallerAssemblyFileName = "#{assembly_filename}" $InstallerAssemblyFullPath = Join-Path -Path $InstallerAssemblyDir -ChildPath $InstallerAssemblyFileName $CommandLine = "/logfile= /logtoconsole=false `"$InstallerAssemblyFullPath`"" $ExpectedOutput = 'Constructor_' $TestArgs = @{ OutputAssemblyDirectory = $InstallerAssemblyDir OutputAssemblyFileName = $InstallerAssemblyFileName InvocationMethod = '#{invocation_method}' CommandLine = $CommandLine } $ActualOutput = Invoke-BuildAndInvokeInstallUtilAssembly @TestArgs -MinimumViableAssembly if ($ActualOutput -ne $ExpectedOutput) { throw @" InstallUtil class constructor execution test failure. Installer assembly execution output did not match the expected output. Expected: $ExpectedOutput Actual: $ActualOutput "@ }
Dependencies:
Executes the Install Method. Upon execution, version information will be displayed the .NET framework install utility.
Supported Platforms: windows
powershell# Import the required test harness function, Invoke-BuildAndInvokeInstallUtilAssembly . "#{test_harness}" $InstallerAssemblyDir = "#{assembly_dir}" $InstallerAssemblyFileName = "#{assembly_filename}" $InstallerAssemblyFullPath = Join-Path -Path $InstallerAssemblyDir -ChildPath $InstallerAssemblyFileName $CommandLine = "/logfile= /logtoconsole=false /installtype=notransaction /action=install `"$InstallerAssemblyFullPath`"" $ExpectedOutput = 'Constructor_Install_' $TestArgs = @{ OutputAssemblyDirectory = $InstallerAssemblyDir OutputAssemblyFileName = $InstallerAssemblyFileName InvocationMethod = '#{invocation_method}' CommandLine = $CommandLine } $ActualOutput = Invoke-BuildAndInvokeInstallUtilAssembly @TestArgs if ($ActualOutput -ne $ExpectedOutput) { throw @" InstallUtil Install method execution test failure. Installer assembly execution output did not match the expected output. Expected: $ExpectedOutput Actual: $ActualOutput "@ }
Dependencies:
Executes the Uninstall Method. Upon execution, version information will be displayed the .NET framework install utility.
Supported Platforms: windows
powershell# Import the required test harness function, Invoke-BuildAndInvokeInstallUtilAssembly . "#{test_harness}" $InstallerAssemblyDir = "#{assembly_dir}" $InstallerAssemblyFileName = "#{assembly_filename}" $InstallerAssemblyFullPath = Join-Path -Path $InstallerAssemblyDir -ChildPath $InstallerAssemblyFileName $CommandLine = "/logfile= /logtoconsole=false /U `"$InstallerAssemblyFullPath`"" $ExpectedOutput = 'Constructor_Uninstall_' $TestArgs = @{ OutputAssemblyDirectory = $InstallerAssemblyDir OutputAssemblyFileName = $InstallerAssemblyFileName InvocationMethod = '#{invocation_method}' CommandLine = $CommandLine } $ActualOutput = Invoke-BuildAndInvokeInstallUtilAssembly @TestArgs if ($ActualOutput -ne $ExpectedOutput) { throw @" InstallUtil Uninstall method execution test failure. Installer assembly execution output did not match the expected output. Expected: $ExpectedOutput Actual: $ActualOutput "@ }
Dependencies:
If Atomic Red Team tests are not applicable, manually verify the technique by:
Use application control configured to block execution of InstallUtil.exe if it is not required for a given system or network to prevent potential misuse by adversaries.
InstallUtil may not be necessary within a given environment.
| Finding | Severity | Impact | | -------------------------------- | -------- | --------------- | | InstallUtil technique applicable | Medium | Defense Evasion |
| CWE ID | Title | | ------- | ---------------------------- | | CWE-693 | Protection Mechanism Failure |
Other measured skills in the registry, with their headline benchmark lift.