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).
- Product
- windows
- Service
- system
- Author
- Nasreddine Bencherchali (Nextron Systems) (SigmaHQ), DRL 1.1
- Published
- 2023-08-07
- Updated
- 2026-07-31
ATT&CK techniques
ExecutionRecon
Resource Dev
Initial Access
Execution
Persistence
Priv Esc
Defense Evasion
Cred Access
Discovery
Lateral Movement
Collection
C2
Exfiltration
Impact
What it detects
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.
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 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