Identifier / Programs / Windows
msbuild.exe
The Microsoft build tool for Visual Studio project solutions. tldr-pages
LOLBAS AWL Bypass, Execute 6 Sigma rules name it 1 ATT&CK technique 5 documented commands 2 known copies with hashes
How msbuild.exe is abused
AWL Bypass T1127.001 Trusted Developer Utilities Proxy Execution: MSBuild
Execute T1127.001 Trusted Developer Utilities Proxy Execution: MSBuild
Execute T1127.001 Trusted Developer Utilities Proxy Execution: MSBuild
-loggerEach abuse is LOLBAS's category and the options and words it uses; the full write-up is on LOLBAS's page for msbuild.exe.
5 documented commands
AWL Bypass T1127.001 Trusted Developer Utilities Proxy Execution: MSBuild User privileges
Build and execute a C# project stored in the target XML file.
msbuild.exe {PATH:.xml}IdentifyExecute T1127.001 Trusted Developer Utilities Proxy Execution: MSBuild User privileges
Build and execute a C# project stored in the target csproj file.
msbuild.exe {PATH:.csproj}IdentifyExecute T1127.001 Trusted Developer Utilities Proxy Execution: MSBuild User privileges
Executes generated Logger DLL file with TargetLogger export.
msbuild.exe /logger:TargetLogger,{PATH_ABSOLUTE:.dll};MyParameters,FooIdentifyExecute T1127.001 Trusted Developer Utilities Proxy Execution: MSBuild User privileges
Execute JScript/VBScript code through XML/XSL Transformation. Requires Visual Studio MSBuild v14.0+.
msbuild.exe {PATH:.proj}IdentifyExecute T1036 Masquerading User privileges
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.
msbuild.exe @{PATH:.rsp}IdentifyNone of the 5 commands the identifier reads trips a Sigma process-creation rule. These commands and their descriptions are from LOLBAS’s entry for msbuild.exe, by Oddvar Moe, at commit 2056cb766250 of 2026-09-26, under the GPL-3.0 and LOLBAS’s notice, with no warranty. Changed: Markdown is shown formatted. The source is in lolbas-gtfobins-commands.json.gz, and the full entry is on LOLBAS’s page for msbuild.exe. The identifier reads each with LOLBAS’s placeholders filled in: a URL as https://example.com/file, a share as \\192.0.2.10\share\file, a path as C:\Data\file and a command as calc.exe.
What detects it
Is it the real msbuild.exe?
C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\2 known copies
4.8.4161.0 built by: NET48REL1 · C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe · signed by Microsoft Windows
0da56bd07a486818b7735761001cc1d3ca5af645f369a3c206bcb6719fefff064.8.4161.0 built by: NET48REL1 · C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe · signed by Microsoft Windows
b25346ac48099606de4bd7f72a4e76876587aadf5734eaa83b81b9e79437acabFrom the file’s version info and the copies recorded by xCyclopedia (MIT). A copy in another folder, signed by someone else or with another hash is not necessarily malicious, but it is worth a closer look. In Ceplin, "<sha256>".whatis() says which known copy a hash is.
Everyday use
Build the first project file in the current directory
msbuildIdentifyBuild a specific project file
msbuild path/to/project_fileIdentifySpecify one or more semicolon-separated targets to build
msbuild path/to/project_file /target:targetsIdentifyNone of the 3 examples the identifier reads matches LOLBAS abuse or trips a Sigma process-creation rule.