One Day Sec

How can I use csi.exe to execute arbitrary .NET code and bypass Windows Device Guard or UMCI?

csi.exe is a C# interactive compiler introduced in Visual Studio 2015 Update 1, and it is digitally signed by Microsoft. You can run C# code directly in its REPL, load `.csx` scripts with `#load`, or execute a script from the command line. This technique bypasses Device Guard and UMCI because csi.exe is a trusted binary. On Windows 10, you can even copy csi.exe and its dependencies (like Microsoft.CodeAnalysis.CSharp.dll) to a system without VS2015. This is similar to other application whitelisting bypass methods such as using BGInfo.
csi.exeapplication whitelisting bypassWindows Device GuardUMCI.NET execution

Browse all Q&A →