Metasploit Console

msfconsole

Launch the Metasploit console.

help or ?

Shows msfconsole help (list top-level commands).

version

Shows Metasploit framework version.

workspace -a <name> / workspace

Creates or switch workspace.

exit / quit

Exits Metasploit Framework.

Finding and Loading Modules

search <term>

Search the module database for exploit/auxiliary/payloads by keyword.

use <module/path>

Loads the module applied in the with the “use” command.

show options

List configurable options for the loaded module (RHOSTS, RPORT, Payload, etc).

set RHOSTS

Sets the target IP address.

set RPORT

Sets the target port (the port you’re targeting) - E.G. Port 22.

show targets

Show target platform/versions a module supports.

show payloads

List payloads compatible with the current exploit module.

show auxiliary / show exploit / show post / show encoders

List available modules of that type.