Windows PowerShell ICMP Exfiltration via Ping and Socket Send

Alerts on PowerShell that instantiates System.Net.NetworkInformation.Ping and calls .Send, consistent with ICMP-based exfiltration.

FreeReviewedSigma · Medium · v2
Product
windows
Category
ps_script
Author
Bartlomiej Czyz @bczyz1, oscd.community (SigmaHQ), DRL 1.1
Published
2020-10-10
Updated
2026-07-31
title: Windows PowerShell ICMP Exfiltration via Ping and Socket Send
id: 56b77a90-eb44-4834-a531-5194ffe74573
status: test
description: This rule identifies PowerShell script content that instantiates System.Net.NetworkInformation.Ping and then performs a network send operation, consistent with attempting data exfiltration over ICMP or ICMP-adjacent activity. Attackers may use alternative, unencrypted protocols to bypass controls that focus on expected command-and-control or data paths. Telemetry relies on PowerShell Script Block Logging capturing ScriptBlockText that includes the relevant class and send method usage.
references:
  - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1048.003/T1048.003.md#atomic-test-2---exfiltration-over-alternative-protocol---icmp
  - https://github.com/SigmaHQ/sigma/blob/master/rules/windows/powershell/powershell_script/posh_ps_icmp_exfiltration.yml
author: Bartlomiej Czyz @bczyz1, oscd.community, Huntrule Team
date: 2020-10-10
modified: 2022-12-25
tags:
  - attack.exfiltration
  - attack.t1048.003
logsource:
  product: windows
  category: ps_script
  definition: "Requirements: Script Block Logging must be enabled"
detection:
  selection:
    ScriptBlockText|contains|all:
      - New-Object
      - System.Net.NetworkInformation.Ping
      - .Send(
  condition: selection
falsepositives:
  - Legitimate usage of System.Net.NetworkInformation.Ping class
level: medium
license: DRL-1.1
related:
  - id: 4c4af3cd-2115-479c-8193-6b8bfce9001c
    type: derived