0

I've written some custom shellcode that I want to encode using Metasploit's msfvenom. Back when msfencode was still working this is the way the command would have gone:

$ echo -ne “\x31…\x80” | sudo msfencode -a x86 -t c -e x86/jmp_call_additive

"pipe the shellcode to msfencode for architecture x86 with the output as a c array with the x86/jmp_call_additive encoder"

Now I want to do the same thing except with msfvenom, so I tried:

$ echo -ne "\x31...\x80" | sudo msfvenom -e x86/jmp_call_additive -a x86 -t c

But I get the following error message:

Attempting to read payload from STDIN...
You must select a platform for a custom payload

I thought that giving the -a flag was specifying the correct platform/architecture, I've also tried --platform in place of -a but I still get the same error message.

I'm running this on a on a virtual machine using Ubuntu 32 bit. Thanks for any help

mbigras
  • 7,664
  • 11
  • 50
  • 111

1 Answers1

0
$ echo -ne “\x31...x80" | sudo msfvenom -e x86/jmp_call_additive -a x86 -p - --platform linux -f c

“pipe the custom shellcode into msfvenom with the x86/jmp_call_additive encoder on x86 architecture with a custom payload on a linux platform with a c array output format"

mbigras
  • 7,664
  • 11
  • 50
  • 111