BASIC USAGE
INITIALIZATION
root@oco:~$ msfconsole -q
* This launches the Metasploit Framework console and initializes its modules and
services. Modern Metasploit packages include a PostgreSQL database for storing
workspace data, so you normally don’t need to start PostgreSQL manually. If the
database becomes disconnected or corrupted, use "msfdb reinit" to recreate and
reconnect the DB. You can also check the DB status with msfdb status.
* the -q flag is optional and disables the metasploit banner to include the following:
=[ metasploit v6.1.9-dev ]
+ -- --=[ 2169 exploits - 1149 auxiliary - 398 post ]
+ -- --=[ 592 payloads - 45 encoders - 10 nops ]
+ -- --=[ 9 evasion ]SEARCHING FOR MODULES/CAPABILITY
msf6 > help search
Usage: search [<options>] [<keywords>:<value>]
OPTIONS:
-h Show this help information
-o <file> Send output to a file in csv format
-S <string> Regex pattern used to filter search results
-u Use module if there is one result
-s <search_column> Sort the research results based on <search_column> in ascending order
-r Reverse the search results order to descending order
...
GENERAL
SPECIFIC
BY TYPE
BY CVE
SELECTING MODULES/EXPLOIT
DISPLAYING OPTIONS
BASIC VIEW
ADVANCED VIEW
DESCRIPTION VIEW
DISPLAYING PAYLOADS
Before choosing a payload, define exactly what you MUST accomplish on the target system. Attack objectives drive payload selection. For example, if you require durable access and rich post-exploit capabilities (persistence, credential harvesting, lateral movement), a staged Meterpreter payload is often appropriate because it provides in-memory execution, dynamic plugin/script loading, and many built-in post-exploitation primitives. Meterpreter can be augmented with plugins (for example, GentilKiwi’s Mimikatz plugin - https://github.com/gentilkiwi/mimikatz) to collect credentials and perform advanced actions, but remember these tools are powerful and dual-use: only deploy them with explicit authorization and within your rules of engagement.
STAGED
ALL TYPES
SPECIFIC PAYLOAD SEARCHING
PAYLOAD SELECTION
SETTING OPTIONS
TARGET SPECIFICATION: TEMPORARY
TARGET SPECIFICATION: SESSION DURATION
The "setg" cmd specifies options selected as permanent until the program is restarted. This cmd is used to set the IP address once until a different focus IP address is required
LOCAL HOST SPECIFICATION
FAILSAFE
LAUNCHING ATTACK
TARGET INTERACTION
Last updated