Detection rules › Sigma

Service StartupType Change Via Sc.EXE

Status
test
Severity
medium
Log source
category process_creation, product windows
Author
Nasreddine Bencherchali (Nextron Systems)
Source
github.com/SigmaHQ/sigma

Detect the use of "sc.exe" to change the startup type of a service to "disabled" or "demand"

Known false positives

  • False positives may occur with troubleshooting scripts

MITRE ATT&CK coverage

TacticTechniques
Defense Impairment

Telemetry coverage

ProviderRecord / event type
SysmonEvent ID 1: Process creation

Rule body

title: Service StartupType Change Via Sc.EXE
id: 85c312b7-f44d-4a51-a024-d671c40b49fc
status: test
description: Detect the use of "sc.exe" to change the startup type of a service to "disabled" or "demand"
references:
    - https://www.virustotal.com/gui/file/38283b775552da8981452941ea74191aa0d203edd3f61fb2dee7b0aea3514955
author: Nasreddine Bencherchali (Nextron Systems)
date: 2022-08-01
modified: 2023-03-04
tags:
    - attack.execution
    - attack.defense-impairment
    - attack.t1685
logsource:
    category: process_creation
    product: windows
detection:
    selection_img:
        - Image|endswith: '\sc.exe'
        - OriginalFileName: 'sc.exe'
    selection_cli:
        CommandLine|contains|all:
            - ' config '
            - 'start'
        CommandLine|contains:
            - 'disabled'
            - 'demand'
    condition: all of selection_*
falsepositives:
    - False positives may occur with troubleshooting scripts
level: medium

Stages and Predicates

Stage 0: condition

all of selection_*

Stage 1: selection_img

selection_img:
    - Image|endswith: '\sc.exe'
    - OriginalFileName: 'sc.exe'

Stage 2: selection_cli

selection_cli:
    CommandLine|contains|all:
        - ' config '
        - 'start'
    CommandLine|contains:
        - 'disabled'
        - 'demand'

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
CommandLinematch
  • config
  • demand
  • disabled corpus 7 (sigma 5, elastic 1, splunk 1)
  • start corpus 13 (sigma 11, splunk 2)
field:"CommandLine" kind:match
Imageends_with
  • \sc.exe corpus 30 (sigma 30)
field:"Image" kind:ends_with value:"\sc.exe"
OriginalFileNameeq
  • sc.exe corpus 30 (sigma 12, splunk 10, elastic 8)
field:"OriginalFileName" kind:eq value:"sc.exe"