Working with msfvenom

We have read about mefencode and msfpayload in Chapter 4, Client-side Exploitation and Antivirus Bypass. Let us take a small recap. msfpayload is used to generate binary from the payload, whereas msfencode is used for encoding the binary using different encoding techniques. Here we will discuss another Metasploit tool which is a combination of both. This tool can play an important role in generating exploits that can execute stealthily.

Getting ready

To start our experiment with msfvenom, launch the terminal window and pass on the msfvenom –h command.

How to do it...

Let us take a look at various available options:

root@bt:~# msfvenom -h
Usage: /opt/framework/msf3/msfvenom [options] 

Options:
 -p, --payload [payload] Payload ...

Get Metasploit Penetration Testing Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.