Windows Process Creation: Suspicious Microsoft Csi.exe or Rcsi.exe with C# Execution Capability

Alerts on Windows executions of Microsoft’s csi.exe/rcsi.exe that can be used to run C# code from command-line.

FreeReviewedSigma · Medium · v2
Product
windows
Category
process_creation
Author
Konstantin Grishchenko, oscd.community (SigmaHQ), DRL 1.1
Published
2020-10-17
Updated
2026-07-31
title: "Windows Process Creation: Suspicious Microsoft Csi.exe or Rcsi.exe with C# Execution Capability"
id: 035d224c-aa8a-4e94-9979-05bc111b60f7
status: test
description: This rule flags process creation events where Image ends with either csi.exe or rcsi.exe and the OriginalFileName matches the same binary names. The behavior matters because these Microsoft-signed utilities can execute C# code from a file via command-line parameters, which may be abused for stealthy execution. Telemetry required is Windows process creation data including Image path and OriginalFileName, plus process metadata indicating the Company is Microsoft Corporation.
references:
  - https://lolbas-project.github.io/lolbas/OtherMSBinaries/Csi/
  - https://lolbas-project.github.io/lolbas/OtherMSBinaries/Rcsi/
  - https://enigma0x3.net/2016/11/21/bypassing-application-whitelisting-by-using-rcsi-exe/
  - https://twitter.com/Z3Jpa29z/status/1317545798981324801
  - https://github.com/SigmaHQ/sigma/blob/master/rules/windows/process_creation/proc_creation_win_csi_execution.yml
author: Konstantin Grishchenko, oscd.community, Huntrule Team
date: 2020-10-17
modified: 2022-07-11
tags:
  - attack.lateral-movement
  - attack.execution
  - attack.stealth
  - attack.t1072
  - attack.t1218
logsource:
  category: process_creation
  product: windows
detection:
  selection_img:
    - Image|endswith:
        - \csi.exe
        - \rcsi.exe
    - OriginalFileName:
        - csi.exe
        - rcsi.exe
  selection_cli:
    Company: Microsoft Corporation
  condition: all of selection*
falsepositives:
  - Legitimate usage by software developers
level: medium
license: DRL-1.1
related:
  - id: 40b95d31-1afc-469e-8d34-9a3a667d058e
    type: derived