As we've mentioned several times,
the Metasploit Framework provides its functionality for testing through modules.
When you find the module you need, you have to configure it for use.
Let's talk a little bit about how that's accomplished.
Each module has a set of configurable options.
You could select the module with a use command with a path to the module.
The MSF console supports file name completion with a tab so
you can find what you need with less typing.
Once the module is selected and loaded,
typing info will show the information you can see on the left.
In addition to the details about the module,
you can see the basic options listed in the middle.
You can also see the same information without loading the module
using the info command with the path to the module.
To see only the options available and their current values, use
the show options command. The values of the module options can be
configured using two related commands.
The set command configures values for the current module. For example,
you can set the value of RHOSTS this way.
There is a setg command, which configures a value globally for all modules.
Once set,
that value will be configured across any future modules that are loaded.
The command works the same as the set command.
Remote options apply to the target system or systems for testing.
There is the RHOSTS option, which specifies the targets.
It could be a single target,
specified as a single IP address or hostname, or multiple
targets that are specified using CIDR notation,
an IP address range,
a comma or a space‑separated list of IPs, or a file
containing a list of targets.
There are also local options.
These refer to the localhost on which you are using the Metasploit Framework.
The LHOST option generally specifies the local IP address where a
listener is configured to wait for payload code to connect with.
The LPORT option is the network service port where the listener
is open for connections.
There are also other options that auxiliary, exploit, and post
modules may need when they are configured for use.
Payload options are generally set when configuring exploit modules.
Some exploits specify the payloads that must be used.
These options include the LHOST and LPORT options we discussed.
Other features of the payload may include the exit
function or extensions to be loaded.
There are also advanced options for some exploits.