Suspicious C# IL Code Compilation Through Ilasm.EXE (via process_creation)
This rule detects the use of "Ilasm.EXE" to compile C# intermediate (IL) code to EXE or DLL.
SigmamediumWindowsv1
sigma
suspicious-c-il-code-compilation-through-ilasm-exe-via-process-creation
title: Suspicious C# IL Code Compilation Through Ilasm.EXE (via process_creation)
id: 19d70846-7a7f-5641-b8fb-502e55a80a59
status: stable
description: This rule detects the use of "Ilasm.EXE" to compile C# intermediate (IL) code to EXE or DLL.
references:
- https://attack.mitre.org/techniques/T1127/
- https://lolbas-project.github.io/lolbas/Binaries/Ilasm/
- https://www.echotrail.io/insights/search/ilasm.exe
author: Huntrule Team
date: 2026-07-10
tags:
- attack.execution
- attack.stealth
- attack.t1127
logsource:
product: windows
category: process_creation
detection:
selection_img:
- Image|endswith: '\ilasm.exe'
- OriginalFileName: 'ilasm.exe'
selection_cli:
CommandLine|contains:
- ' /dll'
- ' /exe'
condition: all of 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.