Windows Process Creation: Possible Path Traversal in cmd.exe Command Line
Alerts on Windows cmd.exe executions with "../.." path traversal indicators in parent/child command lines.
- Product
- windows
- Category
- process_creation
- Author
- xknow @xknow_infosec, Tim Shelton (SigmaHQ), DRL 1.1
- Published
- 2020-06-11
- Updated
- 2026-07-31
ATT&CK techniques
ExecutionRecon
Resource Dev
Initial Access
Execution
Persistence
Priv Esc
Defense Evasion
Cred Access
Discovery
Lateral Movement
Collection
C2
Exfiltration
Impact
What it detects
This rule flags Windows process creation events where cmd.exe is launched or executed with command-line flags (/c, /k, /r) and includes a parent path traversal sequence ('/../../'). Attackers may use path traversal to confuse command-line parsing, manipulate file paths, or redirect execution flow. It relies on process creation telemetry, specifically ParentImage/Image fields and the ParentCommandLine/CommandLine content.
Reporting behind it
- hackingiscool.plhttps://hackingiscool.pl/cmdhijack-command-argument-confusion-with-path-traversal-in-cmd-exe/
- twitter.comhttps://twitter.com/Oddvarmoe/status/1270633613449723905
- github.comhttps://github.com/SigmaHQ/sigma/blob/master/rules/windows/process_creation/proc_creation_win_cmd_path_traversal.yml
Changelog
v2- v2Candidate ingested via manual entry.2026-07-31
- v1No changelog recorded for this version.2026-07-30
Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.
title: "Windows Process Creation: Possible Path Traversal in cmd.exe Command Line"
id: 6a344de0-1ff8-4b41-b21d-f52c8e2fa2d7
status: test
description: This rule flags Windows process creation events where cmd.exe is launched or executed with command-line flags (/c, /k, /r) and includes a parent path traversal sequence ('/../../'). Attackers may use path traversal to confuse command-line parsing, manipulate file paths, or redirect execution flow. It relies on process creation telemetry, specifically ParentImage/Image fields and the ParentCommandLine/CommandLine content.
references:
- https://hackingiscool.pl/cmdhijack-command-argument-confusion-with-path-traversal-in-cmd-exe/
- https://twitter.com/Oddvarmoe/status/1270633613449723905
- https://github.com/SigmaHQ/sigma/blob/master/rules/windows/process_creation/proc_creation_win_cmd_path_traversal.yml
author: xknow @xknow_infosec, Tim Shelton, Huntrule Team
date: 2020-06-11
modified: 2023-03-06
tags:
- attack.execution
- attack.t1059.003
logsource:
category: process_creation
product: windows
detection:
selection_img:
- ParentImage|endswith: \cmd.exe
- Image|endswith: \cmd.exe
- OriginalFileName: cmd.exe
selection_flags:
- ParentCommandLine|contains:
- /c
- /k
- /r
- CommandLine|contains:
- /c
- /k
- /r
selection_path_traversal:
- ParentCommandLine: /../../
- CommandLine|contains: /../../
filter_java:
CommandLine|contains: \Tasktop\keycloak\bin\/../../jre\bin\java
condition: all of selection_* and not 1 of filter_*
falsepositives:
- Java tools are known to produce false-positive when loading libraries
level: high
license: DRL-1.1
related:
- id: 087790e3-3287-436c-bccf-cbd0184a7db1
type: derived