For the complete documentation index, see llms.txt. This page is also available as Markdown.

Ptunnel-ng

Encapsulates traffic within ICMP echo request/response packets. Only works when ping (ICMP) is permitted through the firewall.

Installation

git clone https://github.com/utoni/ptunnel-ng.git

Build:

sudo ./autogen.sh

Static Binary Build

sudo apt install automake autoconf -y
cd ptunnel-ng/
sed -i '$s/.*/LDFLAGS=-static "${NEW_WD}\/configure" --enable-static $@ \&\& make clean \&\& make -j${BUILDJOBS:-4} all/' autogen.sh
./autogen.sh

Transfer to Pivot Host

scp -r ptunnel-ng ubuntu@10.129.202.64:~/

Usage

Start Server on Pivot Host

  • -r — IP to accept connections on

  • -R22 — forward to SSH port 22

Connect Client from Attack Host

  • -p — ptunnel-ng server IP

  • -l2222 — local listening port

  • -r — destination IP

  • -R22 — remote port

SSH Through ICMP Tunnel

Dynamic Port Forwarding Over ICMP

Then use proxychains as normal to route traffic through the ICMP tunnel.

Last updated