Payloads and payload options
We can tell MSFvenom is one of the most versatile and useful payload-generation tools just by looking at the available payloads; the list proves that MSFvenom can help you get a session in almost any situation.
Getting ready
To start experimenting with msfvenom
, launch a Terminal window, and use msfvenom –h
or msfvenom --help
to display the help menu.
How to do it...
- Let's take a look at the available payloads, using the
msfvenom
command with the-l
option:
root@kali:~# msfvenom -l payloads
Because the output of the command is too extensive to fit in this recipe, I will leave that for you to try out.
- To generate a payload, we always need to use at least two options,
-p
and-f
. The-p
option is used to specify which payload to generate from all those available in the Metasploit Framework, in this example a bind shell via GNU AWK:
root@kali:~# msfvenom -p cmd/unix/bind_awk -f raw No platform was selected, choosing Msf::Module::Platform::Unix from the payload No Arch selected...