Name:Ping Sleep Batch Command id:ce058d6c-79f2-11ec-b476-acde48001122 version:17 date:None 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:*", "*>*", "*>*", "*||*" ) )
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/ drilldown_searches: name:'View the detection results for - "$user$" and "$dest$"' search:'%original_detection_search% | search user = "$user$" dest = "$dest$"' earliest_offset:'$info_min_time$' latest_offset:'$info_max_time$' name:'View risk events for the last 7 days for - "$user$" and "$dest$"' search:'| from datamodel Risk.All_Risk | search normalized_risk_object IN ("$user$", "$dest$") | stats count min(_time) as firstTime max(_time) as lastTime values(search_name) as "Search Name" values(risk_message) as "Risk Message" values(analyticstories) as "Analytic Stories" values(annotations._all) as "Annotations" values(annotations.mitre_attack.mitre_tactic) as "ATT&CK Tactics" by normalized_risk_object | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`' earliest_offset:'7d' latest_offset:'0' analytic_story:['Warzone RAT', 'Quasar RAT', 'Data Destruction', 'Meduza Stealer', 'WhisperGate', 'BlackByte Ransomware', 'Void Manticore', 'Gh0st RAT']