Suspicious Execution of AspNetCompiler (via process_creation)
This rule detects execution of "aspnet_compiler.exe" that can be misused to compile and execute C# code.
SigmamediumWindowsv1
sigma
suspicious-execution-of-aspnetcompiler-via-process-creation
title: Suspicious Execution of AspNetCompiler (via process_creation)
id: 85073367-325a-5abb-8c7b-a29f38f979aa
status: stable
description: This rule detects execution of "aspnet_compiler.exe" that can be misused to compile and execute C# code.
references:
- https://attack.mitre.org/techniques/T1127/
- https://lolbas-project.github.io/lolbas/Binaries/Aspnet_Compiler/
- https://ijustwannared.team/2020/08/01/the-curious-case-of-aspnet_compiler-exe/
author: Huntrule Team
date: 2026-03-13
tags:
- attack.execution
- attack.stealth
- attack.t1127
logsource:
category: process_creation
product: windows
detection:
selection:
Image|contains:
- ':\Windows\Microsoft.NET\Framework\'
- ':\Windows\Microsoft.NET\Framework64\'
- ':\Windows\Microsoft.NET\FrameworkArm\'
- ':\Windows\Microsoft.NET\FrameworkArm64\'
Image|endswith: '\aspnet_compiler.exe'
condition: selection
falsepositives:
- Unknown
level: medium
Known false positives
- Unknown
Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.