Windows Service ImagePath Set to Non-Admin Controlled Directory

Alerts when a Windows service’s ImagePath is changed to a binary path under AppData or ProgramData.

FreeReviewedSigma · Medium · v5
Product
windows
Category
registry_set
Author
Nasreddine Bencherchali (Nextron Systems), Florian Roth (Nextron Systems) (SigmaHQ), DRL 1.1
Published
2022-05-02
Updated
2026-07-31
title: Windows Service ImagePath Set to Non-Admin Controlled Directory
id: 24513b7a-c9d9-467f-abc4-71ec691bd0bb
related:
  - id: c625c4c2-515d-407f-8bb6-456f65955669
    type: obsolete
  - id: 277dc340-0540-42e7-8efb-5ff460045e07
    type: derived
status: test
description: This rule identifies registry changes where a Windows service’s ImagePath is set to a location within ProgramData or AppData-style user-controlled directories. Such paths can support staging, persistence, or privilege escalation if an attacker can influence or replace the referenced binaries. It relies on Windows registry set telemetry for TargetObject and Details fields containing ControlSet service ImagePath values pointing into those directories, while excluding several known benign services and well-known Defender/Zoom/MBAM installer patterns.
references:
  - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1562.001/T1562.001.md
  - https://github.com/SigmaHQ/sigma/blob/master/rules-threat-hunting/windows/registry/registry_set/registry_set_service_image_path_user_controlled_folder.yml
author: Nasreddine Bencherchali (Nextron Systems), Florian Roth (Nextron Systems), Huntrule Team
date: 2022-05-02
modified: 2024-03-25
tags:
  - attack.persistence
  - attack.defense-impairment
  - attack.t1112
  - detection.threat-hunting
logsource:
  category: registry_set
  product: windows
detection:
  selection:
    TargetObject|contains|all:
      - ControlSet
      - \Services\
    TargetObject|endswith: \ImagePath
    Details|contains:
      - :\ProgramData\
      - \AppData\Local\
      - \AppData\Roaming\
  filter_optional_zoom:
    TargetObject|contains: \Services\ZoomCptService
    Details|contains: C:\Program Files\Common Files\Zoom\Support\CptService.exe
  filter_optional_mbami:
    TargetObject|contains: \Services\MBAMInstallerService
    Details|contains|all:
      - C:\Users\
      - AppData\Local\Temp\MBAMInstallerService.exe
  filter_main_windefend:
    TargetObject|contains:
      - \Services\WinDefend\
      - \Services\MpKs
    Details|contains: C:\ProgramData\Microsoft\Windows Defender\
  condition: selection and not 1 of filter_main_* and not 1 of filter_optional_*
falsepositives:
  - Unknown
level: medium
license: DRL-1.1