diff --git a/yml/OtherMSBinaries/MSTest.yml b/yml/OtherMSBinaries/MSTest.yml new file mode 100644 index 00000000..0f74902e --- /dev/null +++ b/yml/OtherMSBinaries/MSTest.yml @@ -0,0 +1,40 @@ +--- +Name: MSTest.exe +Description: Legacy Test Execution Command Line Tool included with Visual Studio. Loads and executes .NET test assemblies which can contain arbitrary code. +Author: Noam Pomerantz +Created: 2026-04-03 +Commands: + - Command: MSTest.exe /testcontainer:{PATH:.dll} /resultsfile:{OUTPUT_FILE} + Description: Loads a .NET assembly as a test container and executes all methods decorated with the TestMethod attribute. The test methods run with full .NET Framework access, allowing arbitrary code execution. + Usecase: Proxy execution of arbitrary .NET code by packaging it as a unit test DLL. A test runner executing attacker-controlled assemblies is unexpected outside a development context. + Category: Execute + Privileges: User + MitreID: T1218 + OperatingSystem: Windows 10, Windows 11 +Full_Path: + - Path: C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\MSTest.exe + - Path: C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\MSTest.exe + - Path: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\MSTest.exe +Code_Sample: + - Code: |- + // Compile with: csc.exe /target:library /reference:"C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\ReferenceAssemblies\v4.0\Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll" /out:MaliciousTest.dll MaliciousTest.cs + using Microsoft.VisualStudio.TestTools.UnitTesting; + using System.Diagnostics; + [TestClass] + public class LolbasTest + { + [TestMethod] + public void Execute() + { + Process.Start("cmd.exe"); + } + } +Detection: + - IOC: MSTest.exe process execution outside of a typical Visual Studio development or CI/CD context. + - IOC: MSTest.exe loading test assemblies from unusual directories such as %TEMP% or user profile folders. + - IOC: Unexpected child processes (e.g., cmd.exe, powershell.exe) spawning directly from MSTest.exe. +Resources: + - Link: https://learn.microsoft.com/en-us/visualstudio/test/walkthrough-using-a-configuration-file-to-define-a-data-source +Acknowledgement: + - Person: Noam Pomerantz + Handle: '@pumi96' diff --git a/yml/OtherMSBinaries/Microsoft.XslDebugger.Host.yml b/yml/OtherMSBinaries/Microsoft.XslDebugger.Host.yml new file mode 100644 index 00000000..509edb40 --- /dev/null +++ b/yml/OtherMSBinaries/Microsoft.XslDebugger.Host.yml @@ -0,0 +1,61 @@ +--- +Name: Microsoft.XslDebugger.Host.exe +Description: XSLT Execution Utility included with Visual Studio for debugging XSLT transformations +Author: Noam Pomerantz +Created: 2026-04-05 +Commands: + - Command: Microsoft.XslDebugger.Host.exe {PATH_ABSOLUTE:.xml} {PATH_ABSOLUTE:.xsl} /enable:all + Description: Execute C#/JScript/VBScript code through XML/XSL Transformation. + Usecase: Execute arbitrary code and spawn processes through a Microsoft-signed XSLT debugger binary. + Category: Execute + Privileges: User + MitreID: T1220 + OperatingSystem: Windows + Tags: + - Execute: XSL +Full_Path: + - Path: C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\Xml\Microsoft.XslDebugger.Host.exe + - Path: C:\Program Files (x86)\Microsoft Visual Studio\2022\Community\Common7\IDE\Xml\Microsoft.XslDebugger.Host.exe + - Path: C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\Xml\Microsoft.XslDebugger.Host.exe + - Path: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\Xml\Microsoft.XslDebugger.Host.exe +Code_Sample: + - Code: |- + + test + + + + + + + + + + + + + + +Detection: + - IOC: Microsoft.XslDebugger.Host.exe execution outside of devenv.exe parent process + - IOC: Microsoft.XslDebugger.Host.exe with /enable:all command-line argument + - IOC: Microsoft.XslDebugger.Host.exe spawning child processes (cmd.exe, powershell.exe) + - IOC: Microsoft.XslDebugger.Host.exe making outbound HTTP/HTTPS connections +Resources: + - Link: https://learn.microsoft.com/en-us/dotnet/standard/data/xml/xslt-transformations + - Link: https://learn.microsoft.com/en-us/dotnet/standard/data/xml/script-blocks-using-msxsl-script +Acknowledgement: + - Person: Noam + Handle: '@pumi96' diff --git a/yml/OtherMSBinaries/TextTransform.yml b/yml/OtherMSBinaries/TextTransform.yml new file mode 100644 index 00000000..ae94b47b --- /dev/null +++ b/yml/OtherMSBinaries/TextTransform.yml @@ -0,0 +1,38 @@ +--- +Name: TextTransform.exe +Description: T4 Text Template transformation tool included with Visual Studio. Processes T4 template files (.tt) that can contain arbitrary C# or VB.NET code which executes during template processing. Part of the "Text Template Transformation" component (`Microsoft.VisualStudio.Component.TextTemplating`) in Visual Studio. +Author: Noam Pomerantz +Created: 2026-04-03 +Commands: + - Command: TextTransform.exe {PATH:.tt} + Description: Executes code contained in a T4 template file (.tt) as VB.net or C# (with full .NET Framework access). + Usecase: Execute arbitrary code by embedding it in a T4 template file. + Category: Execute + Privileges: User + MitreID: T1127 + OperatingSystem: Windows + Tags: + - Execute: TT +Full_Path: + - Path: C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\TextTransform.exe + - Path: C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\TextTransform.exe + - Path: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\TextTransform.exe + - Path: c:\Program Files\Microsoft Visual Studio\18\Community\Common7\IDE\TextTransform.exe + - Path: c:\Program Files\Microsoft Visual Studio\18\Professional\Common7\IDE\TextTransform.exe + - Path: c:\Program Files\Microsoft Visual Studio\18\Enterprise\Common7\IDE\TextTransform.exe +Code_Sample: + - Code: |- + <#@ template language="C#" #> + <#@ import namespace="System.Diagnostics" #> + <# + Process.Start("cmd.exe"); + #> +Detection: + - IOC: TextTransform.exe process execution outside of a typical Visual Studio development context. + - IOC: TextTransform.exe processing .tt files from unusual directories such as %TEMP% or user profile folders. + - IOC: Unexpected child processes (e.g., cmd.exe, powershell.exe) spawning directly from TextTransform.exe. +Resources: + - Link: https://learn.microsoft.com/en-us/visualstudio/modeling/code-generation-and-t4-text-templates +Acknowledgement: + - Person: Noam Pomerantz + Handle: '@pumi96' diff --git a/yml/OtherMSBinaries/TextTransformCore.yml b/yml/OtherMSBinaries/TextTransformCore.yml new file mode 100644 index 00000000..df3fae37 --- /dev/null +++ b/yml/OtherMSBinaries/TextTransformCore.yml @@ -0,0 +1,40 @@ +--- +Name: TextTransformCore.exe +Description: .NET Core T4 Text Template transformation tool included with Visual Studio. Processes T4 template files (.tt) that can contain arbitrary C# code which executes during template processing. Part of the "Text Template Transformation" component (`Microsoft.VisualStudio.Component.TextTemplating`) in Visual Studio. Requires .NET Core Runtime to be pre-installed. +Author: Noam Pomerantz +Created: 2026-04-03 +Commands: + - Command: TextTransformCore.exe {PATH:.tt} + Description: Executes code contained in a T4 template file (.tt) as VB.net or C# (with full .NET Framework access). + Usecase: Execute arbitrary code by embedding it in a T4 template file. + Category: Execute + Privileges: User + MitreID: T1127 + OperatingSystem: Windows + Tags: + - Execute: TT +Full_Path: + - Path: C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\TextTransformCore.exe + - Path: C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\TextTransformCore.exe + - Path: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\TextTransformCore.exe + - Path: C:\Program Files\Microsoft Visual Studio\18\Community\Common7\IDE\TextTransformCore.exe + - Path: C:\Program Files\Microsoft Visual Studio\18\Professional\Common7\IDE\TextTransformCore.exe + - Path: C:\Program Files\Microsoft Visual Studio\18\Enterprise\Common7\IDE\TextTransformCore.exe +Code_Sample: + - Code: |- + <#@ template language="C#" #> + <#@ assembly name="System.Diagnostics.Process" #> + <#@ assembly name="System.ComponentModel.Primitives" #> + <#@ import namespace="System.Diagnostics" #> + <# + Process.Start("cmd.exe"); + #> +Detection: + - IOC: TextTransformCore.exe process execution outside of a typical Visual Studio development context. + - IOC: TextTransformCore.exe processing .tt files from unusual directories such as %TEMP% or user profile folders. + - IOC: Unexpected child processes (e.g., cmd.exe, powershell.exe) spawning directly from TextTransformCore.exe. +Resources: + - Link: https://learn.microsoft.com/en-us/visualstudio/modeling/code-generation-and-t4-text-templates +Acknowledgement: + - Person: Noam Pomerantz + Handle: '@pumi96'