ICMP Tunneling hides traffic within ICMP packets containing echo request and resoonses.
ICMP tunneling will work if ping responses are permitted within a firewalled network.
Scenario:
Attacker → Ubuntu → Windows
We will use ptunnel-ng to create a tunnel between Attacker host and Ubuntu server.
Ptunnel-ng
Installation
ptunnel-ng Server
On Ubuntu PivotHost, let’s start ptunnel-ng server:
-r
IP address is used to accept connections and in this case, Ubuntu’s IP address that is reachable from attacker host is being used.
ptunnel-ng Client
Now on attacker host, let’s connect to Ubuntu’s server:
We have to use local port 2222 for this because this allows us to send traffic through the ICMP tunnel.
Tunneling
Now we can connect to the target using SSH through local port 2222.
With Dynamic Port Forwarding