Detection rules › Splunk
Ping Sleep Batch Command
The following analytic identifies the use of ping commands as a delay or sleep mechanism within batch-style command execution. It leverages process creation telemetry from Endpoint Detection and Response (EDR) agents and examines process and parent process command-line fields for ping commands that specify a count and are chained with additional commands using command separators or redirection operators. While execution of the command may generate individual process creation events, such as a separate ping.exe process, this analytic specifically focuses on the original command string passed to a command interpreter, such as cmd.exe /c, that combines the ping-based delay with subsequent command execution. Adversaries may use ping as an alternative to explicit sleep or timeout commands to introduce execution delays, potentially evading automated analysis, sandboxing, or behavior-based detection. Because ping is commonly used for legitimate network troubleshooting, findings should be reviewed in the context of the complete command line, parent process, user, and commands executed before or after the delay.
Known false positives
- Administrators, network operators, scripts, and software installers may legitimately use ping commands as a simple delay mechanism between commands or operations. Review the full command line, parent process, user context, and surrounding activity to determine whether the execution is expected. Update the filter macro to exclude known legitimate command patterns or processes in your environment.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Stealth | |
| Discovery |
Telemetry coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
Rule body
name: Ping Sleep Batch Command
id: ce058d6c-79f2-11ec-b476-acde48001122
version: 17
creation_date: '2022-01-20'
modification_date: '2026-08-11'
author: Teoderick Contreras, Splunk
status: production
type: Anomaly
description: |-
The following analytic identifies the use of ping commands as a delay or sleep mechanism within batch-style command execution.
It leverages process creation telemetry from Endpoint Detection and Response (EDR) agents and examines process and parent process command-line fields for ping commands that specify a count and are chained with additional commands using command separators or redirection operators.
While execution of the command may generate individual process creation events, such as a separate ping.exe process, this analytic specifically focuses on the original command string passed to a command interpreter, such as cmd.exe /c, that combines the ping-based delay with subsequent command execution.
Adversaries may use ping as an alternative to explicit sleep or timeout commands to introduce execution delays, potentially evading automated analysis, sandboxing, or behavior-based detection.
Because ping is commonly used for legitimate network troubleshooting, findings should be reviewed in the context of the complete command line, parent process, user, and commands executed before or after the delay.
data_source:
- Sysmon EventID 1
- CrowdStrike ProcessRollup2
search: |-
| tstats `security_content_summariesonly`
count min(_time) as firstTime
max(_time) as lastTime
FROM datamodel=Endpoint.Processes WHERE
(
Processes.parent_process= "*ping*"
Processes.parent_process IN (
"*-n*",
"*/n*"
)
Processes.parent_process IN (
"*& *",
"*&*",
"*&C:*",
"*>*",
"*>*",
"*||*"
)
)
OR
(
(
Processes.process_name= "ping.exe"
OR
Processes.original_file_name= "ping.exe"
)
Processes.process IN (
"*-n*",
"*/n*"
)
Processes.process IN (
"*& *",
"*&*",
"*&C:*",
"*>*",
"*>*",
"*||*"
)
)
BY Processes.action Processes.dest Processes.original_file_name
Processes.parent_process Processes.parent_process_exec
Processes.parent_process_guid Processes.parent_process_id
Processes.parent_process_name Processes.parent_process_path
Processes.process Processes.process_exec Processes.process_guid
Processes.process_hash Processes.process_id Processes.process_integrity_level
Processes.process_name Processes.process_path Processes.user
Processes.user_id Processes.vendor_product
| `drop_dm_object_name("Processes")`
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `ping_sleep_batch_command_filter`
how_to_implement: |-
The detection is based on data that originates from Endpoint Detection and Response (EDR) agents.
These agents are designed to provide security-related telemetry from the endpoints where the agent is installed. To implement this search, you must ingest logs that contain the process GUID, process name, and parent process.
Additionally, you must ingest complete command-line executions.
These logs must be processed using the appropriate Splunk Technology Add-ons that are specific to the EDR product. The logs must also be mapped to the `Processes` node of the `Endpoint` data model.
Use the Splunk Common Information Model (CIM) to normalize the field names and speed up the data modeling process.
known_false_positives: |-
Administrators, network operators, scripts, and software installers may legitimately use ping commands as a simple delay mechanism between commands or operations.
Review the full command line, parent process, user context, and surrounding activity to determine whether the execution is expected.
Update the filter macro to exclude known legitimate command patterns or processes in your environment.
references:
- https://www.microsoft.com/security/blog/2022/01/15/destructive-malware-targeting-ukrainian-organizations/
intermediate_findings:
entities:
- field: user
type: user
score: 20
message: Potential ping-based execution delay detected on [$dest$] by [$user$] via [$process$]
- field: dest
type: system
score: 20
message: Potential ping-based execution delay detected on [$dest$] by [$user$] via [$process$]
threat_objects:
- field: process
type: process
- field: parent_process
type: parent_process
analytic_story:
- Warzone RAT
- Quasar RAT
- Data Destruction
- Meduza Stealer
- WhisperGate
- BlackByte Ransomware
- Void Manticore
- Gh0st RAT
asset_type: Endpoint
mitre_attack_id:
- T1497.003
product:
- Splunk Enterprise
- Splunk Enterprise Security
- Splunk Cloud
category: endpoint
security_domain: endpoint
Stages and Predicates
Stage 1: tstats
| tstats `security_content_summariesonly`
count min(_time) as firstTime
max(_time) as lastTime
FROM datamodel=Endpoint.Processes WHERE
(
Processes.parent_process= "*ping*"
Processes.parent_process IN (
"*-n*",
"*/n*"
)
Processes.parent_process IN (
"*& *",
"*&*",
"*&C:*",
"*>*",
"*>*",
"*||*"
)
)
OR
(
(
Processes.process_name= "ping.exe"
OR
Processes.original_file_name= "ping.exe"
)
Processes.process IN (
"*-n*",
"*/n*"
)
Processes.process IN (
"*& *",
"*&*",
"*&C:*",
"*>*",
"*>*",
"*||*"
)
)
BY Processes.action Processes.dest Processes.original_file_name
Processes.parent_process Processes.parent_process_exec
Processes.parent_process_guid Processes.parent_process_id
Processes.parent_process_name Processes.parent_process_path
Processes.process Processes.process_exec Processes.process_guid
Processes.process_hash Processes.process_id Processes.process_integrity_level
Processes.process_name Processes.process_path Processes.user
Processes.user_id Processes.vendor_product
Stage 2: search
| `drop_dm_object_name("Processes")`
Stage 3: search
| `security_content_ctime(firstTime)`
Stage 4: search
| `security_content_ctime(lastTime)`
Stage 5: search
| `ping_sleep_batch_command_filter`
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
Processes.original_file_name | eq |
| field:"OriginalFileName" kind:eq |
Processes.parent_process | eq |
| field:"ParentCommandLine" kind:eq |
Processes.parent_process | in |
| field:"ParentCommandLine" kind:in |
Processes.process | in |
| field:"CommandLine" kind:in |
Processes.process_name | eq |
| field:"process_name" kind:eq |