Windows cmd.exe reads redirected input from stdin using '<' operator
Flags cmd.exe invocations with '<' in the command line, indicating stdin/input redirection.
FreeUnreviewedSigmamediumv1
windows-cmd-exe-reads-redirected-input-from-stdin-using-operator-241e802a
title: Windows cmd.exe reads redirected input from stdin using '<' operator
id: 21fe1239-2ebb-4576-9b0b-b96ab7ce40f8
related:
- id: 00a4bacd-6db4-46d5-9258-a7d5ebff4003
type: obsolete
- id: 241e802a-b65e-484f-88cd-c2dc10f9206d
type: derived
status: test
description: This rule identifies process creation events where cmd.exe is launched with a command line containing the '<' operator, indicating input redirection from stdin. Attackers can use this to feed data from a file or another source into cmd.exe, enabling scripted execution patterns and evasion of direct file-loading indicators. The detection relies on Windows process creation telemetry, matching cmd.exe and the presence of '<' in the command line.
references:
- https://github.com/redcanaryco/atomic-red-team/blob/40b77d63808dd4f4eafb83949805636735a1fd15/atomics/T1059.003/T1059.003.md
- https://web.archive.org/web/20220306121156/https://www.x86matthew.com/view_post?id=ntdll_pipe
- https://github.com/SigmaHQ/sigma/blob/master/rules/windows/process_creation/proc_creation_win_cmd_stdin_redirect.yml
author: frack113, Nasreddine Bencherchali (Nextron Systems), Huntrule Team
date: 2023-03-07
tags:
- attack.execution
- attack.t1059.003
logsource:
category: process_creation
product: windows
detection:
selection_cmd:
- OriginalFileName: Cmd.Exe
- Image|endswith: \cmd.exe
selection_cli:
CommandLine|contains: <
condition: all of selection_*
falsepositives:
- Unknown
level: medium
license: DRL-1.1
What it detects
This rule identifies process creation events where cmd.exe is launched with a command line containing the '<' operator, indicating input redirection from stdin. Attackers can use this to feed data from a file or another source into cmd.exe, enabling scripted execution patterns and evasion of direct file-loading indicators. The detection relies on Windows process creation telemetry, matching cmd.exe and the presence of '<' in the command line.
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.