Sample captures, Scans, tunnels and evasion

Commands tunneled in ICMP echo

Four pings whose payloads carry commands, and replies that carry the output.

Packets
8
Duration
3.034 s
Size
1000 bytes
Protocols
ICMP
License
CC0

What it shows

Echo requests from 192.0.2.10 carry cmd:whoami and similar commands in their 64-byte payloads, and the echo replies carry the output. Ordinary pings carry filler bytes.

For rules on ICMP type, payload size (dsize) and content.

Rules for this capture

Suricata 8 and 7

Try these rules
alert icmp any any -> any any (msg:"Command in an ICMP echo request"; itype:8; dsize:>32; content:"cmd:"; depth:4; sid:1000001; rev:1;)
alert icmp any any -> any any (msg:"Command output in an ICMP echo reply"; itype:0; content:"out:"; depth:4; sid:1000002; rev:1;)
alert icmp any any -> any any (msg:"Command in an ICMP echo request"; itype:8; dsize:>32; content:"cmd:", depth 4; sid:1000001; rev:1;)
alert icmp any any -> any any (msg:"Command output in an ICMP echo reply"; itype:0; content:"out:", depth 4; sid:1000002; rev:1;)

Packets

No.TimeSourceDestinationProtocolInfo
10.000192.0.2.10203.0.113.66ICMPEcho request, cmd:whoami
20.034203.0.113.66192.0.2.10ICMPEcho reply, out:corp\jsmith
31.000192.0.2.10203.0.113.66ICMPEcho request, cmd:hostname
41.034203.0.113.66192.0.2.10ICMPEcho reply, out:WIN-7Q2LK4
52.000192.0.2.10203.0.113.66ICMPEcho request, cmd:ipconfig /all
62.034203.0.113.66192.0.2.10ICMPEcho reply, out:IPv4 Address. . . : 10.0.0.24
73.000192.0.2.10203.0.113.66ICMPEcho request, cmd:exit
83.034203.0.113.66192.0.2.10ICMPEcho reply, out:bye

More Scans, tunnels and evasion samples