# 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. InstallUtil is digitally signed by Microsoft and located in the .NET directories on a Windows system C:\Windows\Microsoft.NET\Framework\v\InstallUtil.exe and C:\Windows\Microsoft.NET\Framewrok64\v\installUtil.exe

InstallUtil amy also be used to bypass application control through use of attributes within the binary that execute the class decorated with the attribute \[System.ComponentModel.RunInstaller(true)].

**Example**

In the following example I created a C# binary that will execute calc after looking at some examples (penteslab) mainly it says that it will execute binaries in C# code, so by this I compiled it and use IntallUtil to execute the binary itself

This seems to be true if you don't compile it correctly

![](https://315180959-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MRh03Vwd4nuiUi3Oje7%2F-MRkXo9bYjZTkug_Y2Bv%2F-MRkXuFZ43FvU_Oucl06%2Fimage.png?alt=media\&token=9fdabe6c-17f0-49fa-a7a9-f920e6d21581)

Demo

![](https://315180959-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MRh03Vwd4nuiUi3Oje7%2F-MRkXo9bYjZTkug_Y2Bv%2F-MRkXuuUKqyn_-N94cil%2Fimage.png?alt=media\&token=4829aa1d-3dd7-4e79-b7b0-f28ce7ee9ace)

References:

<https://pentestlab.blog/2017/05/08/applocker-bypass-installutil/>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://dmcxblue.gitbook.io/red-team-notes-2-0/red-team-techniques/defense-evasion/t1218-signed-binary-proxy-execution/untitled-7.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
