Windows Process Creation: csc.exe Used for Dynamic .NET Compilation

Flags Windows runs of csc.exe with /noconfig /fullpaths and an @-file, consistent with dynamic .NET compilation.

FreeReviewedSigma · Medium · v5
Product
windows
Category
process_creation
Author
Nasreddine Bencherchali (Nextron Systems) (SigmaHQ), DRL 1.1
Published
2023-08-02
Updated
2026-07-31

ATT&CK techniques

Defense Evasion
  1. Recon

  2. Resource Dev

  3. Initial Access

  4. Execution

  5. Persistence

  6. Priv Esc

  7. Cred Access

  8. Discovery

  9. Lateral Movement

  10. Collection

  11. C2

  12. Exfiltration

  13. Impact

What it detects

This rule flags Windows process creation events where csc.exe is executed with command-line arguments consistent with compiling code dynamically (including /noconfig /fullpaths and an @-file parameter). Attackers may use the Microsoft C# compiler to compile payload components at runtime to support later execution stages. It relies on process creation telemetry, matching the process image ending in csc.exe and specific command-line contents.

Related detections5 linkedT1027.004 — drag to rearrange
Windows Dynamic C# Compilation Generates .cmdline Artifact
Windows Visual Basic vbc.exe Compiles to .obj via cvtres.exe Resource Converter
Windows: Process Creation of Dnx.EXE May Indicate Application Whitelisting Bypass
Windows: Alert on csc.exe Executing from User-Writable or Suspicious Paths
Windows: Alert on suspicious parent process spawning csc.exe
Windows Process Creation: csc.exe Used for Dynamic .NET Compilation
Pivot detection · T1027.004 · 5 related

Changelog

v5
  1. v5
    Candidate ingested via manual entry.2026-07-31
  2. v4
    Candidate ingested via manual entry.2026-07-31
  3. v3
    Candidate ingested via manual entry.2026-07-31
  4. v2
    Candidate ingested via manual entry.2026-07-31
  5. v1
    No changelog recorded for this version.2026-07-30

Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.