.. / Microsoft.Workflow.Compiler.exe
Star

A utility included with .NET that is capable of compiling and executing C# or VB.net code.


Paths:


Resources:
https://twitter.com/mattifestation/status/1030445200475185154
https://posts.specterops.io/arbitrary-unsigned-code-execution-vector-in-microsoft-workflow-compiler-exe-3d9294bc5efb
https://gist.github.com/mattifestation/3e28d391adbd7fe3e0c722a107a25aba#file-workflowcompilerdetectiontests-ps1
https://gist.github.com/mattifestation/7ba8fc8f724600a9f525714c9cf767fd#file-createcompilerinputxml-ps1
https://www.forcepoint.com/blog/security-labs/using-c-post-powershell-attacks
https://www.fortynorthsecurity.com/microsoft-workflow-compiler-exe-veil-and-cobalt-strike/
https://medium.com/@Bank_Security/undetectable-c-c-reverse-shells-fab4c0ec4f15

Acknowledgement:
Matt Graeber - @mattifestation
John Bergbom - @BergbomJohn
FortyNorth Security - @FortyNorthSec
Bank Security - @Bank_Security


Detection:
Microsoft.Workflow.Compiler.exe would not normally be run on workstations.
The presence of csc.exe or vbc.exe as child processes of Microsoft.Workflow.Compiler.exe
Presence of "



Execute

Compile and execute C# or VB.net code in a XOML file referenced in the test.xml file.
Microsoft.Worflow.Compiler.exe tests.xml results.xml
Usecase:Compile and run code
Privileges required:User
OS:Windows 10S
Mitre:T1127



Compile and execute C# or VB.net code in a XOML file referenced in the test.txt file.
Microsoft.Worflow.Compiler.exe tests.txt results.txt
Usecase:Compile and run code
Privileges required:User
OS:Windows 10S
Mitre:T1127



AWL bypass

Compile and execute C# or VB.net code in a XOML file referenced in the test.txt file.
Microsoft.Worflow.Compiler.exe tests.txt results.txt
Usecase:Compile and run code
Privileges required:User
OS:Windows 10S
Mitre:T1127