Pentest Tools


Metasploit Cheatsheet

How to Install Metasploit

Metasploit installation:

Installation
username@machine_name:~$ sudo apt install metasploit-framework

Useful Commands for Metasploit


msfconsole: Start the Metasploit Framework console
search [name]: Search for an exploit/module
use [exploit/module]: Select an exploit/module
show options: Show available options for the selected exploit/module
set [option] [value]: Set a specific option value
exploit: Run the selected exploit
sessions -l: List active sessions
sessions -i [ID]: Interact with a specific session

Examples of Metasploit Commands

Start Metasploit console:

Start Console
username@machine_name:~$ msfconsole

Search for an exploit:

Search Exploit
msf:> search [name]

Select an exploit:

Select Exploit
msf:> use [exploit/module]

Show exploit options:

Show Options
msf:> show options

Set an option value:

Set Option
msf:> set [option] [value]

Run the exploit:

Run Exploit
msf:> exploit

List active sessions:

List Sessions
msf:> sessions -l

Interact with a session:

Interact Session
msf:> sessions -i [ID]