Essential Metasploit Commands for Beginners

Before using Metasploit, initialize and start the database:

msfdb reinit
msfdb start

Launch the console:

msfconsole

connect Command

Connect to a remote host on a specific port:

msf5 > connect 10.0.0.50 80

Send an HTTP GET request to review the server banner:

GET /
HTTP/1.1 200 OK
...

show Command

List all available modules:

msf5 > show all

Display only exploit modules:

msf5 > show exploits

Display payload modules:

msf5 > show payloads

Show auxiliary modules:

msf5 > show auxiliary

search Command

Search for modules by keyword. For instance, look for SMB-related modules:

msf5 > search smb

Use the name field for precise matches:

msf5 > search name:smb

Search by path:

msf5 > search path:smb

Filter by platform:

msf5 > search platform:windows

Specify module type (exploit, payload, auxiliary, etc.):

msf5 > search type:exploit

Combine filters:

msf5 > search type:exploit name:smb

Search by CVE identifier:

msf5 > search cve:2017-0143

Find Linux exploits from 2020:

msf5 > search cve:2020 name:linux
Module Field Reference
Field Decsription
Name Vulnearbility identifier
Disclosure Date Date the vulnerability was made public
Rank Impact severity rating (excellent to manual)
Check Whether the module supports a check method
Description Brief explanation of the exploit
Rank Descriptions
Rank Meaning
excellent No crash risk; highest reliability
great Works against a default target
good Works against common software versions (e.g., Windows 7, 2012)
normal Reliable but version-dependent
average Unreliable
low Poor stability; success rate below 50%
manual Unstable; requires manual interventino

use Command

Load a module for exploitation. Syntax: use <module_path>

Example: locate the EternalBlue module:

msf5 > search eternalblue
exploit/windows/smb/ms17_010_eternalblue

Load it:

msf5 > use exploit/windows/smb/ms17_010_eternalblue
[*] No payload configured, defaulting to windows/x64/meterpreter/reverse_tcp
msf5 exploit(windows/smb/ms17_010_eternalblue) >

Return to the main prompt:

msf5 exploit(windows/smb/ms17_010_eternalblue) > back
msf5 >

View module information (two methods):

msf5 > info exploit/windows/smb/ms17_010_eternalblue

Alternatively, after loading:

msf5 exploit(windows/smb/ms17_010_eternalblue) > info

Tags: Metasploit msfconsole Penetration Testing exploit development Security Tools

Posted on Tue, 19 May 2026 15:48:25 +0000 by temujinleal