LOLBAS/OSBinaries/Msbuild.md

41 lines
1.0 KiB
Markdown

## Msbuild.exe
* Functions: Execute
```
msbuild.exe pshell.xml
msbuild.exe Msbuild.csproj
```
Acknowledgements:
* Casey Smith - @subtee
* Cn33liz - @Cneelis
Code sample:
* [Msbuild.csproj](https://raw.githubusercontent.com/api0cradle/LOLBAS/master/OSBinaries/Payloads/Msbuild.csproj)
Resources:
* https://github.com/redcanaryco/atomic-red-team/blob/master/Windows/Execution/Trusted_Developer_Utilities.md
* https://github.com/Cn33liz/MSBuildShell
* https://pentestlab.blog/2017/05/29/applocker-bypass-msbuild/
* https://oddvar.moe/2017/12/13/applocker-case-study-how-insecure-is-it-really-part-1/
Full path:
```
C:\Windows\Microsoft.NET\Framework\v2.0.50727\Msbuild.exe
C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Msbuild.exe
C:\Windows\Microsoft.NET\Framework\v3.5\Msbuild.exe
C:\Windows\Microsoft.NET\Framework64\v3.5\Msbuild.exe
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Msbuild.exe
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Msbuild.exe
```
Notes:
Example code borrowed from Red Canary - Atomic Red Team.