Windows Process Creation: One-liner cmd.exe CommandLine with ping and copy

Alerts when cmd.exe runs a one-liner that includes both ping and copy with expected options.

FreeReviewedSigma · Medium · v2
Product
windows
Category
process_creation
Author
X__Junior (Nextron Systems) (SigmaHQ), DRL 1.1
Published
2023-07-18
Updated
2026-07-31
title: "Windows Process Creation: One-liner cmd.exe CommandLine with ping and copy"
id: c7890a80-4580-4762-9c29-db5b3fdaa07e
status: test
description: This rule flags Windows command shells (cmd.exe via Sysmon-style Image endswith \cmd.exe and Cmd.Exe original filename) executing a one-line CommandLine that contains both "ping" and "copy ". Attackers and malware commonly combine commands to blend network checks with file staging or transfer in a single command execution. The detection relies on process creation telemetry with cmd.exe image/original filename and full CommandLine content.
references:
  - Internal Research
  - https://github.com/SigmaHQ/sigma/blob/master/rules/windows/process_creation/proc_creation_win_cmd_ping_copy_combined_execution.yml
author: X__Junior (Nextron Systems), Huntrule Team
date: 2023-07-18
modified: 2024-03-06
tags:
  - attack.stealth
  - attack.t1070.004
logsource:
  category: process_creation
  product: windows
detection:
  selection_cmd:
    - Image|endswith: \cmd.exe
    - OriginalFileName: Cmd.Exe
  selection_action:
    CommandLine|contains|all:
      - ping
      - "copy "
  selection_cli_1:
    CommandLine|contains|windash: " -n "
  selection_cli_2:
    CommandLine|contains|windash: " -y "
  condition: all of selection_*
falsepositives:
  - Unknown
level: medium
license: DRL-1.1
related:
  - id: ded2b07a-d12f-4284-9b76-653e37b6c8b0
    type: derived