Detection rules › Sigma

CSExec Service Installation

Status
test
Severity
medium
Log source
product windows, service system
Author
Nasreddine Bencherchali (Nextron Systems)
Source
github.com/SigmaHQ/sigma

Detects CSExec service installation and execution events

MITRE ATT&CK coverage

Event coverage

Rule body yaml

title: CSExec Service Installation
id: a27e5fa9-c35e-4e3d-b7e0-1ce2af66ad12
status: test
description: Detects CSExec service installation and execution events
references:
    - https://github.com/malcomvetter/CSExec
author: Nasreddine Bencherchali (Nextron Systems)
date: 2023-08-07
tags:
    - attack.execution
    - attack.t1569.002
logsource:
    product: windows
    service: system
detection:
    selection_eid:
        Provider_Name: 'Service Control Manager'
        EventID: 7045
    selection_service:
        - ServiceName: 'csexecsvc'
        - ImagePath|endswith: '\csexecsvc.exe'
    condition: all of selection_*
falsepositives:
    - Unknown
level: medium

Stages and Predicates

Stage 0: condition

all of selection_*

Stage 1: selection_eid

selection_eid:
    Provider_Name: 'Service Control Manager'
    EventID: 7045

Stage 2: selection_service

selection_service:
    - ServiceName: 'csexecsvc'
    - ImagePath|endswith: '\csexecsvc.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
ImagePathends_with
  • \csexecsvc.exe
Provider_Nameeq
  • Service Control Manager corpus 50 (sigma 50)
ServiceNameeq
  • csexecsvc