csc.exe

by Microsoft
Development ToolLOLBinhigh risk

Summary

C# command-line compiler from the .NET Framework - compiles C# source code to executables or DLLs at runtime.

csc.exe is the 296th most commonly executed Windows program in EchoTrail's dataset, observed 34,572 times across enterprise environments. It typically runs from C:\Program Files\Unity\Hub\Editor\2019.1.5f1\Editor\Data\Tools\Roslyn and it is most often launched by cmd.exe.

296th
most commonly executed Windows program
34,572
observed executions
medium
statistical confidence

Behavior

Top Paths

  • C:\Program Files\Unity\Hub\Editor\2019.1.5f1\Editor\Data\Tools\Roslyn28.32%
  • C:\Windows\Microsoft.NET\Framework\v2.0.5072725.98%
  • C:\Windows\Microsoft.NET\Framework64\v4.0.3031923.37%
  • C:\Windows\Microsoft.NET\Framework64\v2.0.5072714.12%
  • C:\Windows\Microsoft.NET\Framework\v4.0.303195.86%
  • C:\Program Files\Unity\Editor\Data\Tools\Roslyn1.15%
  • C:\...1.12%
  • C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\Roslyn0.05%
  • D:\Program Files\Microsoft Team Foundation Server 2018\Application Tier\Web Services\bin\roslyn0.01%

Top Hashes (SHA256)

  • 19ecbf28d46f5ee18b3eca595ce0279525f92402f866849f3d1b215c49f8252730.9%
  • 4a6d0864e19c0368a47217c129b075dddf61a6a262388f9d21045d82f3423ed79.57%
  • d47e49cd44eec75c2b01b99ec6edc1897157e661934c55693f95d0cb8e180e577%
  • 4240a12e0b246c9d69af1f697488fe7da1b497df20f4a6f95135b4d5fe180a576.12%
  • c0fb6bcfe41c592ed25a88bea22fdb41fddd5f26dfe0b77cce45e40e5c390ddb5.61%
  • 6e24b58a16510e2135eabcf181b43b0cbf215451aca9ba8f8cb9a5b87c2319084.88%
  • 9cacfdaa88da159ea4429fdbc2c3cf99b635e84bc882307be0920567963370883.85%
  • 38c407dbf41e99396b78d00dd796930d8838dcb4af77c3f23ba0e800d1213ebe3.74%
  • 594a9cdfbadbcb0d4cef326eda82597ed23bb8648b0d833232f1cd30e25f09a73.59%
  • e05f505851d83a31ea1e8771029149092363921b82b5828adb871fda79d63da72.52%

Process Ancestry

Top Grandparents

Top Parents

Top Children

Rare or environment-specific process names are omitted from ancestry tables. Percentages are of all observed relationships.

Security Analysis

What does csc.exe normally do?

Used during .NET development and by applications that perform dynamic code compilation (ASP.NET, PowerShell Add-Type).

When is csc.exe suspicious?

Compiling code in temp directories. Called from unusual parents like cmd.exe or powershell.exe outside development contexts. Compiling code on production servers.

How do attackers abuse csc.exe?

Attackers use csc.exe to compile malicious C# code on-the-fly, evading detection since source code is harder to detect than pre-compiled binaries. PowerShell Add-Type invokes csc.exe to compile inline C# code. Living-off-the-land technique.

Detection guidance

Monitor csc.exe invocations on non-developer machines. Alert on compilation in temp directories or invocation from scripting engines on production systems.

False positive notes

Developers, build servers, and ASP.NET applications legitimately use csc.exe. Some .NET applications compile code at runtime.

MITRE ATT&CK techniques

References

Related Processes

Ask Rocky about csc.exe

Rocky answers questions about csc.exe grounded in this same dataset — free, no account needed.

Need this data programmatically? The Rocky API includes 500 free lookups a month. Or just ask Rocky.

Data from EchoTrail's dataset of ~346M Windows process executions. Last extracted 2026-08-04.