ptunnel-简易使用


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端口

 

posted @ 2021-04-10 23:39  皇帽讲绿帽带法技巧  阅读(1002)  评论(0编辑  收藏  举报