heroui logo

Dynamic CSharp Compile Artefact

Sigma Rules

View Source
Summary
This detection rule monitors for the dynamic compilation of C# code by observing the creation of files with a .cmdline extension. The dynamic compilation of C# can occur under certain processes that are not typically associated with this activity, and such compilation can happen without writing anything to disk. This behavior can be indicative of a malicious actor attempting to unpack a payload for execution. By detecting the .cmdline file generation, security teams can identify potential attempts to evade defenses and execute unauthorized code on Windows systems. The rule is designed to alert on instances where these files are created, which could signal an attack that utilizes dynamic C# compilation as part of their tactics.
Categories
  • Windows
  • Endpoint
Data Sources
  • File
ATT&CK Techniques
  • T1027.004
Created: 2022-01-09