CatalogLOLBAS

LOL · Binary

Msbuild.exe

5 techniquesWindowsLOLBASGPL-3.0

AWL Bypass

AWL / Policy BypassWindows

Build and execute a C# project stored in the target XML file.

Use Compile and run code

msbuild.exe {PATH:.xml}
Evidence
Upstream reference
Environment
Local host
Context
user
Native
AWL Bypass
Detection
IOC: Msbuild.exe should not normally be executed on workstations

Execute

ExecutionWindows

Build and execute a C# project stored in the target csproj file.

Use Compile and run code

msbuild.exe {PATH:.csproj}
Evidence
Upstream reference
Environment
Local host
Context
user
Native
Execute
Detection
IOC: Msbuild.exe should not normally be executed on workstations

Execute

ExecutionWindows

Executes generated Logger DLL file with TargetLogger export.

Use Execute DLL

msbuild.exe /logger:TargetLogger,{PATH_ABSOLUTE:.dll};MyParameters,Foo
Evidence
Upstream reference
Environment
Local host
Context
user
Native
Execute
Detection
IOC: Msbuild.exe should not normally be executed on workstations

Execute

ExecutionWindows

Execute JScript/VBScript code through XML/XSL Transformation. Requires Visual Studio MSBuild v14.0+.

Use Execute project file that contains XslTransformation tag parameters

msbuild.exe {PATH:.proj}
Evidence
Upstream reference
Environment
Local host
Context
user
Native
Execute
Detection
IOC: Msbuild.exe should not normally be executed on workstations

Execute

ExecutionWindows

By putting any valid msbuild.exe command-line options in an RSP file and calling it as above will interpret the options as if they were passed on the command line.

Use Bypass command-line based detections

msbuild.exe @{PATH:.rsp}
Evidence
Upstream reference
Environment
Local host
Context
user
Native
Execute
MITRE
T1036
Detection
IOC: Msbuild.exe should not normally be executed on workstations