Metasploit
Metasploit Framework is a widely used penetration testing tool for discovering and exploiting known vulnerabilities in target systems. Its main interface, msfconsole, allows users to search for exploit modules, configure attack parameters, and manage active sessions after a successful exploit.
Core & Navigation
help
Description
Displays the list of available commands.
banner
Description
Displays the Metasploit banner.
history
Description
Shows previously executed commands.
back
Description
Returns to the main console from the current module.
exit
Description
Exits the console.
Module Discovery
search
Description
Searches for modules by name or keyword.
use
Description
Selects a module to work with.
info
Description
Displays details, author, and requirements of the selected module.
show <type>
Description
Displays modules of a given type (e.g. show options, show payloads, show targets).
Configuration
set
Description
Sets a value for a parameter (e.g. set RHOSTS 192.168.1.10).
unset
Description
Removes a previously set value.
check
Description
Tests whether the target is vulnerable, without launching the exploit.
Common Parameters
RHOSTS
Description
The target system's IP address.
RPORT
Description
The target port number.
LHOST
Description
Your (attacker's) IP address, used for reverse connections.
LPORT
Description
The port you're listening on for incoming connections.
PAYLOAD
Description
The payload (shell type) to be delivered.
TARGET
Description
Selects a specific target variant when the exploit offers multiple system/version options (via show targets).
Execution & Sessions
exploit / run
Description
Launches the configured attack.
handler
Description
Starts a payload handler (listener) as a background job.
kill
Description
Stops a running job.
sessions
Description
Lists active sessions.
sessions -i [id]
Description
Connects to and takes control of a specific session.
Example Usage
Below is a real-world exploitation example using Metasploit — see the full attack walkthrough here.