Detection rules › Sigma
Service abuse with malicious ImagePath (Reg via command)
Detects scenarios where an attacker modify the original service executable path with a malicious one.
Known false positives
- administrator reconfiguring service
MITRE ATT&CK coverage
Telemetry coverage
| Provider | Record / event type |
|---|---|
| Security-Auditing | Event ID 4688: A new process has been created. |
Rule body
title: Service abuse with malicious ImagePath (Reg via command)
description: Detects scenarios where an attacker modify the original service executable path with a malicious one.
references:
- https://github.com/mdecrevoisier/EVTX-to-MITRE-Attack/tree/master/TA0003-Persistence/T1543.003-Create%20or%20Modify%20System%20Process-Windows%20Service
- https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/cc742019(v=ws.11)
- https://pentestlab.blog/2020/01/22/persistence-modify-existing-service/
tags:
- attack.persistence
- attack.t1574.010
author: mdecrevoisier
status: experimental
logsource:
product: windows
category: process_creation
detection:
selection:
EventID: 4688
NewProcessName|endswith: \reg.exe
CommandLine|contains|all: # Full command: reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\xboxgip" /v ImagePath /t REG_SZ /d "C:\tmp\pentestlab.exe"
- REG ADD
- '\SYSTEM\CurrentControlSet\Services\'
- ImagePath
condition: selection
falsepositives:
- administrator reconfiguring service
level: high
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
EventID: 4688
NewProcessName|endswith: \reg.exe
CommandLine|contains|all:
- REG ADD
- '\SYSTEM\CurrentControlSet\Services\'
- ImagePath
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
CommandLine | match |
| field:"CommandLine" kind:match |
NewProcessName | ends_with |
| field:"Image" kind:ends_with value:"\reg.exe" |