Windows PowerShell script sets COR_PROFILER environment variables for .NET CLR profiling

Alerts on PowerShell script blocks that set CLR profiler environment variables (COR_ENABLE_PROFILING/COR_PROFILER/COR_PROFILER_PATH).

FreeReviewedSigma · Medium · v2
Product
windows
Category
ps_script
Author
frack113 (SigmaHQ), DRL 1.1
Published
2021-12-30
Updated
2026-07-31

ATT&CK techniques

Execution → Defense Evasion
  1. Recon

  2. Resource Dev

  3. Initial Access

  4. Defense Evasion

  5. Cred Access

  6. Discovery

  7. Lateral Movement

  8. Collection

  9. C2

  10. Exfiltration

  11. Impact

What it detects

This rule matches PowerShell script block content that includes assignments or references to the COR_ENABLE_PROFILING, COR_PROFILER, and COR_PROFILER_PATH environment variables. These variables control which unmanaged profiling DLL is loaded into .NET processes that initialize the CLR, enabling attackers to influence managed application execution. It relies on Script Block Logging telemetry where the script text is available to search for all three environment-variable tokens.

Changelog

v2
  1. v2
    Candidate ingested via manual entry.2026-07-31
  2. 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.