Windows: Suspicious Execution of CSharp Interactive Console via PowerShell
Alerts when PowerShell launches csi.exe, indicating possible interactive .NET code execution.
- Product
- windows
- Category
- process_creation
- Author
- Michael R. (@nahamike01) (SigmaHQ), DRL 1.1
- Published
- 2020-03-08
- Updated
- 2026-07-31
ATT&CK techniques
Execution → Defense EvasionRecon
Resource Dev
Initial Access
Persistence
Priv Esc
Defense Evasion
Cred Access
Discovery
Lateral Movement
Collection
C2
Exfiltration
Impact
What it detects
This rule identifies process creation where the C# interactive console (csi.exe) is launched by PowerShell-related parent processes. Attackers may use interactive .NET/C# tooling to rapidly execute code and evade traditional scripting or deployment paths. The detection relies on Windows process creation telemetry, matching the child executable name and the parent executable path endings (PowerShell/pwsh/Powershell ISE).
Reporting behind it
Changelog
v2- v2Candidate ingested via manual entry.2026-07-31
- v1No 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.
title: "Windows: Suspicious Execution of CSharp Interactive Console via PowerShell"
id: 9d284fe3-61e4-4fb1-ba86-916d8e369815
status: test
description: This rule identifies process creation where the C# interactive console (csi.exe) is launched by PowerShell-related parent processes. Attackers may use interactive .NET/C# tooling to rapidly execute code and evade traditional scripting or deployment paths. The detection relies on Windows process creation telemetry, matching the child executable name and the parent executable path endings (PowerShell/pwsh/Powershell ISE).
references:
- https://redcanary.com/blog/detecting-attacks-leveraging-the-net-framework/
- https://github.com/SigmaHQ/sigma/blob/master/rules/windows/process_creation/proc_creation_win_csi_use_of_csharp_console.yml
author: Michael R. (@nahamike01), Huntrule Team
date: 2020-03-08
modified: 2022-07-14
tags:
- attack.execution
- attack.stealth
- attack.t1127
logsource:
category: process_creation
product: windows
detection:
selection:
Image|endswith: \csi.exe
ParentImage|endswith:
- \powershell.exe
- \pwsh.exe
- \powershell_ise.exe
OriginalFileName: csi.exe
condition: selection
falsepositives:
- Possible depending on environment. Pair with other factors such as net connections, command-line args, etc.
level: high
license: DRL-1.1
related:
- id: a9e416a8-e613-4f8b-88b8-a7d1d1af2f61
type: derived