Windows Service Creation Executing program.exe via Unquoted File Path

Flags creation of C:\program.exe that can be used to hijack unquoted Windows service binary paths.

FreeUnreviewedSigmahighv1
title: Windows Service Creation Executing program.exe via Unquoted File Path
id: 45bd4b2f-e632-4450-a3c2-de0c9d84ba01
status: test
description: This rule matches Windows file creation of C:\program.exe, which corresponds to placing an executable in a path position commonly abused by unquoted service binary paths. Attackers can leverage unquoted paths by placing a malicious executable earlier in the path so Windows launches the attacker-controlled file instead of the intended target. The detection relies on Windows file event telemetry capturing the created filename at the specified path.
references:
  - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1574.009/T1574.009.md
  - https://github.com/SigmaHQ/sigma/blob/master/rules/windows/file/file_event/file_event_win_creation_unquoted_service_path.yml
author: frack113, Huntrule Team
date: 2021-12-30
tags:
  - attack.privilege-escalation
  - attack.persistence
  - attack.t1547.009
logsource:
  product: windows
  category: file_event
detection:
  selection:
    TargetFilename: C:\program.exe
  condition: selection
falsepositives:
  - Unknown
level: high
license: DRL-1.1
related:
  - id: 8c3c76ca-8f8b-4b1d-aaf3-81aebcd367c9
    type: derived

What it detects

This rule matches Windows file creation of C:\program.exe, which corresponds to placing an executable in a path position commonly abused by unquoted service binary paths. Attackers can leverage unquoted paths by placing a malicious executable earlier in the path so Windows launches the attacker-controlled file instead of the intended target. The detection relies on Windows file event telemetry capturing the created filename at the specified path.

Known false positives

  • Unknown

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