metasploit_msfconsole_commands
Core Commands
Command Description
------- -----------
? Help menu
banner Display an awesome metasploit banner
cd Change the current working directory
color Toggle color
connect Communicate with a host
exit Exit the console
get Gets the value of a context-specific variable
getg Gets the value of a global variable
grep Grep the output of another command
help Help menu
history Show command history
load Load a framework plugin
quit Exit the console
repeat Repeat a list of commands
route Route traffic through a session
save Saves the active datastores
sessions Dump session listings and display information about sessions
set Sets a context-specific variable to a value
setg Sets a global variable to a value
sleep Do nothing for the specified number of seconds
spool Write console output into a file as well the screen
threads View and manipulate background threads
unload Unload a framework plugin
unset Unsets one or more context-specific variables
unsetg Unsets one or more global variables
version Show the framework and console library version numbersModule Commands
Job Commands
Resource Script Commands
Developer Commands
Database Backend Commands
Credentials Backend Commands
Help for core commands
msf > help get Usage: get var1 [var2 ...]
The get command is used to get the value of one or more variables.
msf > help getg Usage: getg var1 [var2 ...]
Exactly like get -g, get global variables
msf > help history Usage: history [options]
Shows the command history.
If -n is not set, only the last 100 commands will be shown. If -c is specified, the command history and history file will be cleared.
OPTIONS:
msf > help load Usage: load [var=val var=val ...]
Loads a plugin from the supplied path. For a list of built-in plugins, do: load -l The optional var=val options are custom parameters that can be passed to plugins.
msf > load -l [*] Available Framework plugins:
ffautoregen
session_notifier
auto_add_route
wiki
komand
lab
event_tester
nessus
beholder
session_tagger
sample
nexpose
msgrpc
wmap
token_adduser
request
openvas
db_credcollect
pcap_log
aggregator
sqlmap
db_tracker
rssfeed
sounds
libnotify
alias
thread
token_hunter
ips_filter
socket_logger
msfd
msf > help repeat Usage: repeat [OPTIONS] COMMAND... Repeat (loop) a ;-separated list of msfconsole commands indefinitely, or for a number of iterations or a certain amount of time.
msf > help route Route traffic destined to a given subnet through a supplied session.
Usage: route [add/remove] subnet netmask [comm/sid] route [add/remove] cidr [comm/sid] route [get] route [flush] route [print]
Subcommands: add - make a new route remove - delete a route; 'del' is an alias flush - remove all routes get - display the route for a given target print - show all active routes
Examples: Add a route for all hosts from 192.168.0.0 to 192.168.0.255 through session 1 route add 192.168.0.0 255.255.255.0 1 route add 192.168.0.0/24 1
Delete the above route route remove 192.168.0.0/24 1 route del 192.168.0.0 255.255.255.0 1
Display the route that would be used for the given host or network route get 192.168.0.11
msf > help save Usage: save
Save the active datastore contents to disk for automatic use across restarts of the console
The configuration is stored in /Users/jpinkham/.msf4/config
msf > help sessions Usage: sessions [options] or sessions [id]
Active session manipulation and interaction.
OPTIONS:
Many options allow specifying session ranges using commas and dashes. For example: sessions -s checkvm -i 1,3-5 or sessions -k 1-2,5,6
msf > help spool Usage: spool |
Example: spool /tmp/console.log
msf > help threads Usage: threads [options]
Background thread management.
OPTIONS:
msf > help unload Usage: unload
Unloads a plugin by its symbolic name. Use 'show plugins' to see a list of currently loaded plugins.
msf > help advanced Usage: advanced [mod1 mod2 ...]
Queries the supplied module or modules for advanced options. If no module is given, show advanced options for the currently active module.
Last updated