Detection rules › Sigma

Suspicious Use of CSharp Interactive Console

Status
test
Severity
high
Log source
product windows, category process_creation
Author
Michael R. (@nahamike01)
Source
github.com/SigmaHQ/sigma

Detects the execution of CSharp interactive console by PowerShell

MITRE ATT&CK coverage

Event coverage

ProviderEventTitle
SysmonEvent ID 1Process creation

Rule body yaml

title: Suspicious Use of CSharp Interactive Console
id: a9e416a8-e613-4f8b-88b8-a7d1d1af2f61
status: test
description: Detects the execution of CSharp interactive console by PowerShell
references:
    - https://redcanary.com/blog/detecting-attacks-leveraging-the-net-framework/
author: Michael R. (@nahamike01)
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

Stages and Predicates

Stage 0: condition

selection

Stage 1: selection

selection:
    Image|endswith: '\csi.exe'
    ParentImage|endswith:
        - '\powershell.exe'
        - '\pwsh.exe'
        - '\powershell_ise.exe'
    OriginalFileName: 'csi.exe'

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
Imageends_with
  • \csi.exe corpus 2 (sigma 2)
OriginalFileNameeq
  • csi.exe corpus 2 (sigma 2)
ParentImageends_with
  • \powershell.exe corpus 24 (sigma 24)
  • \powershell_ise.exe corpus 3 (sigma 3)
  • \pwsh.exe corpus 21 (sigma 21)