Detection rules › Sigma

Service abuse with malicious ImagePath (service)

Status
experimental
Severity
high
Log source
category process_creation, product windows
Author
mdecrevoisier
Source
github.com/mdecrevoisier/SIGMA-detection-rules

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

Rule body

title: Service abuse with malicious ImagePath (service)
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.t1543.003
author: mdecrevoisier
status: experimental
logsource:
  product: windows
  category: process_creation
detection: # sc config <service_name> binPath="C:\windows\system32\pentestlab.exe"
  selection_process:
    NewProcessName|endswith: \sc.exe
    CommandLine|contains|all:
      - sc
      - config
      - binpath
  condition: selection
falsepositives:
- administrator reconfiguring service
level: high

Stages and Predicates

Stage 0: condition

selection

Stage 1: selection_process

selection_process:
  NewProcessName|endswith: \sc.exe
  CommandLine|contains|all:
    - sc
    - config
    - binpath

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
CommandLinematch
  • binpath corpus 6 (sigma 5, splunk 1)
  • config corpus 16 (sigma 15, splunk 1)
  • sc corpus 6 (sigma 6)
field:"CommandLine" kind:match
NewProcessNameends_with
  • \sc.exe corpus 30 (sigma 30)
field:"Image" kind:ends_with value:"\sc.exe"