Windows sc.exe Service StartupType Change to Disabled or Demand

Flags sc.exe commands that change a Windows service startup type to disabled or demand.

FreeUnreviewedSigmamediumv1
title: Windows sc.exe Service StartupType Change to Disabled or Demand
id: 209c5e19-b022-4b45-b263-816f10fd1bb0
status: test
description: This rule identifies cases where sc.exe is used with “config” and “start” to set a Windows service startup type to either “disabled” or “demand.” Attackers can use service configuration changes to impair defenses or disrupt recovery by preventing services from starting as expected. The detection relies on Windows process creation telemetry, matching the sc.exe process image/original filename and specific command-line arguments indicating the startup type change.
references:
  - https://www.virustotal.com/gui/file/38283b775552da8981452941ea74191aa0d203edd3f61fb2dee7b0aea3514955
  - https://github.com/SigmaHQ/sigma/blob/master/rules/windows/process_creation/proc_creation_win_sc_disable_service.yml
author: Nasreddine Bencherchali (Nextron Systems), Huntrule Team
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
license: DRL-1.1
related:
  - id: 85c312b7-f44d-4a51-a024-d671c40b49fc
    type: derived

What it detects

This rule identifies cases where sc.exe is used with “config” and “start” to set a Windows service startup type to either “disabled” or “demand.” Attackers can use service configuration changes to impair defenses or disrupt recovery by preventing services from starting as expected. The detection relies on Windows process creation telemetry, matching the sc.exe process image/original filename and specific command-line arguments indicating the startup type change.

Known false positives

  • False positives may occur with troubleshooting scripts

Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.