Windows Service Installation with PowerShell Download and Hidden Execution

Alerts on Windows service creation (7045) with ImagePath patterns indicating hidden/staged command execution.

FreeReviewedSigma · High · v2
Product
windows
Service
system
Author
pH-T (Nextron Systems), Florian Roth (Nextron Systems) (SigmaHQ), DRL 1.1
Published
2022-03-18
Updated
2026-07-31
title: Windows Service Installation with PowerShell Download and Hidden Execution
id: 7cf04358-f500-4da6-b418-3507234eb9c8
related:
  - id: ca83e9f3-657a-45d0-88d6-c1ac280caf53
    type: obsolete
  - id: 26481afe-db26-4228-b264-25a29fe6efc7
    type: similar
  - id: 1d61f71d-59d2-479e-9562-4ff5f4ead16b
    type: derived
status: test
description: This rule flags Windows Service Control Manager events where a newly installed service is associated with suspicious ImagePath content. It looks for common PowerShell download patterns (downloadfile/downloadstring), execution modifiers such as nop and hidden, and telltale path usage like Temp, ADMIN$, or Perflogs. Attackers may use service installation to establish persistence and run code with elevated or concealed execution, so the rule relies on Windows system service creation telemetry (Event ID 7045) and the service ImagePath string.
references:
  - Internal Research
  - https://github.com/SigmaHQ/sigma/blob/master/rules/windows/builtin/system/service_control_manager/win_system_service_install_susp.yml
author: pH-T (Nextron Systems), Florian Roth (Nextron Systems), Huntrule Team
date: 2022-03-18
modified: 2023-12-04
tags:
  - attack.persistence
  - attack.privilege-escalation
  - car.2013-09-005
  - attack.t1543.003
logsource:
  product: windows
  service: system
detection:
  selection:
    Provider_Name: Service Control Manager
    EventID: 7045
    ImagePath|contains:
      - " -nop "
      - " -sta "
      - " -w hidden "
      - :\Temp\
      - .downloadfile(
      - .downloadstring(
      - \ADMIN$\
      - \Perflogs\
      - "&&"
  condition: selection
falsepositives:
  - Unknown
level: high
license: DRL-1.1