Metasploit owned by Rapid7 is an open-source exploit platform that is used for exploiting vulnerabilities and perform penetration testing on the target system.
Metasploit Architecture
Metasploit is a huge framework written in Ruby with number of components and modules.
MSFconsole is the main CLI console through which we can access Metasploit and perform activities like reconnaissance, vulnerability scanning, exploits etc.
Modules
Exploit Module execute the commands on the target system exploiting the vulnerabilities like buffer overflow, code injection etc.
Auxiliary Module performs arbitrary actions which is not directly related to exploitation or executing the payload like scanning, DoS, fuzzing etc.
Payload Module establishes the connection with the target and encapsulates the shell code (arbitrary code) that runs after a successful exploitation of the target.
Post Exploitation does further actions (the actual objective of the attack) on the exploited target like collecting information, gathering data and enumeration.
NOP generator produces a series of random bytes that you can use to bypass security controls like firewall and IPS/IDS.
Encoder modules encode the payloads to avoid detection by anti virus, intrusion detection systems (IDS), Firewalls etc.
Evasion modules modify the characteristics of the payloads to avoid detection by anti virus, intrusion detection system, firewalls etc.