Windows Service Control Manager Detects CSExecSvc Installation and Execution

Flags Windows service creation for csexecsvc with image path ending in \csexecsvc.exe via Service Control Manager (7045).

FreeReviewedSigma · Medium · v2
Product
windows
Service
system
Author
Nasreddine Bencherchali (Nextron Systems) (SigmaHQ), DRL 1.1
Published
2023-08-07
Updated
2026-07-31
title: Windows Service Control Manager Detects CSExecSvc Installation and Execution
id: 7abf8ed3-5b8c-43c4-a5ae-240f93995caa
status: test
description: This rule identifies attempts to install the CSExec Windows service by matching Service Control Manager events where the service name is csexecsvc and the ImagePath ends with \csexecsvc.exe. Service installation followed by execution is a common method for attackers to gain persistent or remote execution capabilities. It relies on Windows System telemetry from Event ID 7045, including Provider_Name, ServiceName, and ImagePath fields.
references:
  - https://github.com/malcomvetter/CSExec
  - https://github.com/SigmaHQ/sigma/blob/master/rules/windows/builtin/system/service_control_manager/win_system_service_install_csexecsvc.yml
author: Nasreddine Bencherchali (Nextron Systems), Huntrule Team
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
license: DRL-1.1
related:
  - id: a27e5fa9-c35e-4e3d-b7e0-1ce2af66ad12
    type: derived