Before starting with how to create a payload, we will discuss some keywords that often come up in the day-to-day lives of IT security personnel.
Vulnerability can be defined as a weakness or flaw in the computer software architecture or in the implementation which allows a hacker to use the weakness and compromise the machine based on the vulnerability.
A program or piece of code that allows the attacker to compromise a machine based on its vulnerability is called an exploit.
This is a software program or malware sent along with the exploit to be executed on the vulnerable machine. Let's look at some examples of the different types of payload that are offered in Metasploit Framework.