Exploits are Metasploit Framework modules that attempt to trigger a
vulnerability in a target system and implant payload code.
Let's look at how exploits in Metasploit operate. In Metasploit,
there are currently more than 2000 exploit modules.
They're organized by operating system and the
service which has the vulnerability.
The framework has search options to find them.
Like other modules, they have configurable options, such as RHOSTS, target,
which defines the type, version, or configuration of the target system,
and payload, which defines a payload code to inject.
Of course, there are other options as well.
Exploit modules have a naming scheme.
They are organized by platform, service, and a unique name.
The platform can be a simplified name.
Note that Firefox is a client‑side target, and multi refers to a
module that can be used on multiple target types.
The service is also a simplified name of the target service.
Each exploit has a unique name.
Some may be based on security notification identifier, like
this Microsoft one, or a specific software package or
vulnerable component, like this one.
The Metasploit Framework console has a few commands to find exploit modules.
This show command will list all of the exploit modules.
Searching can be based on specific parameters.
The ‑h option will show those parameters. And the info command lists
the available information about the specific exploit.
Once the exploit module has been determined, it must be configured.
Select the module using its full path.
Look at the available options it has.
Configure those options. At a bare minimum, the RHOST
option must be set for the target.
If the exploit module has a specific target ID, select the most appropriate one.
Once the exploit module is configured, it's time for action.
Some modules implement a check function. When available, it can see if the
target system is vulnerable without exploiting the vulnerability.
If everything is ready, start the exploit with the exploit command.