2018-06-09 00:15:06 +02:00
|
|
|
---
|
2021-01-10 16:04:52 +01:00
|
|
|
Name: Msbuild.exe
|
2018-09-24 21:59:43 +02:00
|
|
|
Description: Used to compile and execute code
|
|
|
|
Author: 'Oddvar Moe'
|
2021-01-10 16:04:52 +01:00
|
|
|
Created: 2018-05-25
|
2018-06-09 00:15:06 +02:00
|
|
|
Commands:
|
|
|
|
- Command: msbuild.exe pshell.xml
|
|
|
|
Description: Build and execute a C# project stored in the target XML file.
|
2018-09-24 21:59:43 +02:00
|
|
|
Usecase: Compile and run code
|
|
|
|
Category: AWL bypass
|
|
|
|
Privileges: User
|
2021-11-05 21:06:57 +01:00
|
|
|
MitreID: T1127.001
|
2018-09-24 21:59:43 +02:00
|
|
|
OperatingSystem: Windows vista, Windows 7, Windows 8, Windows 8.1, Windows 10
|
|
|
|
- Command: msbuild.exe project.csproj
|
|
|
|
Description: Build and execute a C# project stored in the target csproj file.
|
|
|
|
Usecase: Compile and run code
|
|
|
|
Category: Execute
|
|
|
|
Privileges: User
|
2021-11-05 21:06:57 +01:00
|
|
|
MitreID: T1127.001
|
2018-09-24 21:59:43 +02:00
|
|
|
OperatingSystem: Windows vista, Windows 7, Windows 8, Windows 8.1, Windows 10
|
2021-10-26 00:17:08 +02:00
|
|
|
- Command: msbuild.exe @sample.rsp
|
2021-11-05 21:06:57 +01:00
|
|
|
Description: Executes Logger statements from rsp file
|
2021-10-26 00:17:08 +02:00
|
|
|
Usecase: Execute DLL
|
|
|
|
Category: Execute
|
|
|
|
Privileges: User
|
2021-11-05 21:06:57 +01:00
|
|
|
MitreID: T1127.001
|
2021-10-26 00:17:08 +02:00
|
|
|
OperatingSystem: Windows vista, Windows 7, Windows 8, Windows 8.1, Windows 10
|
2021-10-26 00:27:35 +02:00
|
|
|
- Command: msbuild.exe /logger:TargetLogger,C:\Loggers\TargetLogger.dll;MyParameters,Foo
|
2021-10-26 00:17:08 +02:00
|
|
|
Description: Executes generated Logger dll file with TargetLogger export
|
|
|
|
Usecase: Execute DLL
|
|
|
|
Category: Execute
|
|
|
|
Privileges: User
|
2021-11-05 21:06:57 +01:00
|
|
|
MitreID: T1127.001
|
2021-10-26 00:17:08 +02:00
|
|
|
OperatingSystem: Windows vista, Windows 7, Windows 8, Windows 8.1, Windows 10
|
2021-09-27 05:31:30 +02:00
|
|
|
- Command: msbuild.exe project.proj
|
|
|
|
Description: Execute jscript/vbscript code through XML/XSL Transformation. Requires Visual Studio MSBuild v14.0+.
|
|
|
|
Usecase: Execute project file that contains XslTransformation tag parameters
|
|
|
|
Category: Execute
|
|
|
|
Privileges: User
|
2021-11-05 21:06:57 +01:00
|
|
|
MitreID: T1127.001
|
2021-11-05 19:58:26 +01:00
|
|
|
OperatingSystem: Windows vista, Windows 7, Windows 8, Windows 8.1, Windows 10
|
2018-12-10 14:28:12 +01:00
|
|
|
Full_Path:
|
2018-09-24 21:59:43 +02:00
|
|
|
- Path: C:\Windows\Microsoft.NET\Framework\v2.0.50727\Msbuild.exe
|
|
|
|
- Path: C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Msbuild.exe
|
|
|
|
- Path: C:\Windows\Microsoft.NET\Framework\v3.5\Msbuild.exe
|
|
|
|
- Path: C:\Windows\Microsoft.NET\Framework64\v3.5\Msbuild.exe
|
|
|
|
- Path: C:\Windows\Microsoft.NET\Framework\v4.0.30319\Msbuild.exe
|
|
|
|
- Path: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Msbuild.exe
|
2021-09-27 05:31:30 +02:00
|
|
|
- Path: C:\Program Files (x86)\MSBuild\14.0\bin\MSBuild.exe
|
2021-11-05 19:58:26 +01:00
|
|
|
Code_Sample:
|
2021-10-22 14:53:09 +02:00
|
|
|
- Code:
|
2018-09-24 21:59:43 +02:00
|
|
|
Detection:
|
|
|
|
- IOC: Msbuild.exe should not normally be executed on workstations
|
2018-06-09 00:15:06 +02:00
|
|
|
Resources:
|
2018-09-24 21:59:43 +02:00
|
|
|
- Link: https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1127/T1127.md
|
|
|
|
- Link: https://github.com/Cn33liz/MSBuildShell
|
|
|
|
- Link: https://pentestlab.blog/2017/05/29/applocker-bypass-msbuild/
|
|
|
|
- Link: https://oddvar.moe/2017/12/13/applocker-case-study-how-insecure-is-it-really-part-1/
|
2021-09-27 05:31:30 +02:00
|
|
|
- Link: https://gist.github.com/bohops/4ffc43a281e87d108875f07614324191
|
2021-10-26 00:17:08 +02:00
|
|
|
- Link: https://github.com/LOLBAS-Project/LOLBAS/issues/165
|
2021-10-26 00:19:57 +02:00
|
|
|
- Link: https://www.daveaglick.com/posts/msbuild-loggers-and-logging-events
|
2018-09-24 21:59:43 +02:00
|
|
|
Acknowledgement:
|
|
|
|
- Person: Casey Smith
|
|
|
|
Handle: '@subtee'
|
|
|
|
- Person: Cn33liz
|
|
|
|
Handle: '@Cneelis'
|
2021-09-27 05:31:30 +02:00
|
|
|
- Person: Jimmy
|
|
|
|
Handle: '@bohops'
|
2021-11-05 19:58:26 +01:00
|
|
|
---
|