ptunnle
Ping tunnel ICMP隧道
常用的參數命令
-p 指定服務器端IP地址
-lp 偵聽本地端口
-da 訪問目標的IP地址
-dp 訪問目標的端口
-x 連接密碼
使用很簡單,啟動代理設置個密碼,啟動這個命令需要root權限
服務端執行下面的命令,啟動后不偵聽端口,進程起來了
sudo ptunnel -x cntf
Centos7下的安裝步驟
#安裝libpcap的依賴環境
yum -y install byacc
yum -y install flex bison
#安裝libpcap依賴庫
wget http://www.tcpdump.org/release/libpcap-1.9.0.tar.gz
tar -xzvf libpcap-1.9.0.tar.gz
cd libpcap-1.9.0
./configure
make && make install
#安裝PingTunnel
wget http://www.cs.uit.no/~daniels/PingTunnel/PingTunnel-0.72.tar.gz
tar -xzvf PingTunnel-0.72.tar.gz
cd PingTunnel
make && make install
安裝完成之后直接可以執行命令
服務端執行命令
sudo ptunnel -x cntf
客戶端執行命令
ptunnel -p 10.0.1.92 -lp 8686 -da 10.0.1.85 -dp 80 -x cntf
ptunnel -p 10.0.1.92 -lp 8686 -da 10.0.1.92 -dp 22 -x cntf
ssh動態端口轉發
ssh -CfNg -D 7000 kali@127.0.0.1 -p 8686
ptunnel 目標最新版本還是存在拒絕服務漏洞
相關參考:
https://github.com/esrrhs/pingtunnel
https://my.oschina.net/u/4149042/blog/4418363
https://www.jianshu.com/p/f8e1c9a421fc
http://notes.getshell.net/Notes/42.html
https://github.com/lnslbrty/ptunnel-ng
服務端啟動
客戶端執行命令將目標服務端作為代理,通過本地偵聽的端口8686訪問10.0.1.85的80端口,連接密碼是cntf
客戶端執行命令將目標服務端作為代理,通過本地偵聽的端口8686訪問10.0.1.92的22端口,連接密碼是cntf
通過ssh動態端口轉發嵌入ptunnel隧道
也可以不通過隧道直接連接ssh端口