csc.exe
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.
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
- explorer.exe39.34%
- services.exe28.93%
- svchost.exe10.09%
- runonce.exe6.58%
- Unity.exe3.74%
- setup.exe2.77%
- cmd.exe2.09%
- powershell.exe1.46%
- IAStorIconLaunch.exe0.73%
- rdpinit.exe0.39%
Top Parents
- cmd.exe29.31%
- powershell.exe22.77%
- VpxClient.exe6.23%
- DeliveryService.exe3.01%
- w3wp.exe2.55%
- sdiagnhost.exe2.26%
- hppusg.exe1.82%
- Unity.exe1.15%
Top Children
- cvtres.exe61.68%
- conhost.exe35.44%
- VBCSCompiler.exe2.87%
- WerFault.exe0.01%
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.
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.