CatalogLOLBAS

LOL · Binary

Csc.exe

2 techniquesWindowsLOLBASGPL-3.0

Compile

CompileWindows

Use csc.exe to compile C# code, targeting the .NET Framework, stored in the specified .cs file and output the compiled version to the specified .exe path.

Use Compile attacker code on system. Bypass defensive counter measures.

csc.exe -out:{PATH:.exe} {PATH:.cs}
Evidence
Upstream reference
Environment
Local host
Context
user
Native
Compile
MITRE
T1127

Compile

CompileWindows

Use csc.exe to compile C# code, targeting the .NET Framework, stored in the specified .cs file and output the compiled version to a DLL file with the same name.

Use Compile attacker code on system. Bypass defensive counter measures.

csc -target:library {PATH:.cs}
Evidence
Upstream reference
Environment
Local host
Context
user
Native
Compile
MITRE
T1127