Detection rules › Sigma
PSexec service installation
Detects scenarios where an attacker installs PSexec service.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Persistence | T1543.003 Create or Modify System Process: Windows Service |
| Privilege Escalation | T1543.003 Create or Modify System Process: Windows Service |
Event coverage
| Provider | Event | Title |
|---|---|---|
| Security-Auditing | Event ID 4674 | An operation was attempted on a privileged object. |
| Security-Auditing | Event ID 4697 | A service was installed in the system. |
| Service-Control-Manager | Event ID 7045 | Event ID 7045 |
Rule body yaml
title: PSexec service installation
description: Detects scenarios where an attacker installs PSexec service.
references:
- https://github.com/mdecrevoisier/EVTX-to-MITRE-Attack/tree/master/TA0003-Persistence/T1543.003-Create%20or%20Modify%20System%20Process-Windows%20Service
- https://attack.mitre.org/software/S0029/
- https://pentera.io/blog/135-is-the-new-145/
- https://nv2lt.github.io/windows/smb-psexec-smbexec-winexe-how-to/
- https://www.synacktiv.com/publications/traces-of-windows-remote-command-execution.html
tags:
- attack.privilege_execution
- attack.t1543.003
author: mdecrevoisier
status: experimental
logsource:
product: windows
service:
- system
- security
detection:
selection_service_install:
EventID:
- 4697 # SECURITY logs: new service
- 7045 # SYSTEM logs: new service
ServiceName|contains: PSEXESVC
selection_service_privilege:
EventID: 4674
ObjectServer: 'SC Manager'
ProcessName|endswith: '\services.exe' # full path 'C:\Windows\System32\services.exe'
ObjectName: PSEXESVC
condition: selection_service_install or selection_service_privilege
falsepositives:
- Administrator activity
level: medium
Stages and Predicates
Stage 0: condition
selection_service_install or selection_service_privilegeStage 1: selection_service_install
selection_service_install:
EventID:
- 4697
- 7045
ServiceName|contains: PSEXESVC
Stage 2: selection_service_privilege
selection_service_privilege:
EventID: 4674
ObjectServer: 'SC Manager'
ProcessName|endswith: '\services.exe'
ObjectName: PSEXESVC
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.
| Field | Kind | Values |
|---|---|---|
ObjectName | eq |
|
ObjectServer | eq |
|
ProcessName | ends_with |
|
ServiceName | match |
|