Windows PowerShell Set-Service StartupType Change to Disabled or Manual

Alerts on PowerShell Set-Service commands changing a service startup type to Disabled or Manual on Windows.

FreeUnreviewedSigmamediumv1
title: Windows PowerShell Set-Service StartupType Change to Disabled or Manual
id: 3936bac1-6e3c-46c9-9e55-7658989550f1
status: test
description: This rule flags PowerShell executions of the Set-Service cmdlet where the -StartupType parameter is set to Disabled or Manual. Attackers and administrators can use this to impair defenses or alter system behavior by changing how services start. The detection relies on Windows process creation telemetry capturing the PowerShell image name and the command line containing Set-Service along with the specific startup types.
references:
  - https://www.virustotal.com/gui/file/38283b775552da8981452941ea74191aa0d203edd3f61fb2dee7b0aea3514955
  - https://github.com/SigmaHQ/sigma/blob/master/rules/windows/process_creation/proc_creation_win_powershell_set_service_disabled.yml
author: Nasreddine Bencherchali (Nextron Systems), Huntrule Team
date: 2023-03-04
tags:
  - attack.execution
  - attack.defense-impairment
  - attack.t1685
logsource:
  category: process_creation
  product: windows
detection:
  selection_img:
    - Image|endswith: \powershell.exe
    - OriginalFileName: PowerShell.EXE
  selection_cli:
    CommandLine|contains|all:
      - Set-Service
      - -StartupType
    CommandLine|contains:
      - Disabled
      - Manual
  condition: all of selection_*
falsepositives:
  - False positives may occur with troubleshooting scripts
level: medium
license: DRL-1.1
related:
  - id: 62b20d44-1546-4e61-afce-8e175eb9473c
    type: derived

What it detects

This rule flags PowerShell executions of the Set-Service cmdlet where the -StartupType parameter is set to Disabled or Manual. Attackers and administrators can use this to impair defenses or alter system behavior by changing how services start. The detection relies on Windows process creation telemetry capturing the PowerShell image name and the command line containing Set-Service along with the specific startup types.

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.