.. /Csc.exe
Star

Compile

Binary file used by .NET Framework to compile C# code

Paths:

Resources:

Detections:

Compile

  1. Use csc.exe to compile C# code, targeting the .NET Framework, stored in File.cs and output the compiled version to Output.exe.

    csc.exe -out:Output.exe File.cs
    Use case
    Compile attacker code on system. Bypass defensive counter measures.
    Privileges required
    User
    Operating systems
    Windows vista, Windows 7, Windows 8, Windows 8.1, Windows 10, Windows 11
    ATT&CK® technique
    T1127
  2. Use csc.exe to compile C# code, targeting the .NET Framework, stored in File.cs and output the compiled version to a DLL file.

    csc -target:library File.cs
    Use case
    Compile attacker code on system. Bypass defensive counter measures.
    Privileges required
    User
    Operating systems
    Windows vista, Windows 7, Windows 8, Windows 8.1, Windows 10, Windows 11
    ATT&CK® technique
    T1127