Metasploit Cheat Sheet Page 2

ADVERTISEMENT

Metasploit Console Basics (msfconsole)
Metasploit Meterpreter (contd)
Managing Sessions
Search for module:
Process Commands:
Multiple Exploitation:
msf > search [regex]
getpid: Display the process ID that Meterpreter is
running inside
Run the exploit expecting a single session that is
Specify and exploit to use:
getuid: Display the user ID that Meterpreter is
immediately backgrounded:
running with
msf > exploit -z
msf > use exploit/[ExploitPath]
ps: Display process list
Run the exploit in the background expecting one or
Specify a Payload to use:
kill: Terminate a process given its process ID
execute: Run a given program with the privileges
more sessions that are immediately backgrounded:
msf > set PAYLOAD [PayloadPath]
of the process the Meterpreter is loaded in
msf > exploit –j
Show options for the current modules:
migrate: Jump to a given destination process ID
List all current jobs (usually exploit listeners):
msf > show options
- Target process must have same or lesser privileges
- Target process may be a more stable process
msf > jobs –l
Set options:
- When inside a process, can access any files that
Kill a job:
process has a lock on
msf > set [Option] [Value]
msf > jobs –k [JobID]
Start exploit:
Network Commands:
ipconfig: Show network interface information
Multiple Sessions:
msf > exploit
portfwd: Forward packets through TCP session
route: Manage/view the system's routing table
List all backgrounded sessions:
Metasploit Meterpreter
msf > sessions -l
Misc Commands:
Base Commands:
idletime: Display the duration that the GUI of the
Interact with a backgrounded session:
? / help: Display a summary of commands
target machine has been idle
msf > session -i [SessionID]
exit / quit: Exit the Meterpreter session
uictl [enable/disable] [keyboard/
sysinfo: Show the system name and OS type
Background the current interactive session:
mouse]: Enable/disable either the mouse or
shutdown / reboot: Self-explanatory
keyboard of the target machine
meterpreter > <Ctrl+Z>
or
screenshot: Save as an image a screenshot of
File System Commands:
the target machine
meterpreter > background
cd: Change directory
lcd: Change directory on local (attacker's) machine
Additional Modules:
Routing Through Sessions:
pwd / getwd: Display current working directory
use [module]: Load the specified module
ls: Show the contents of the directory
Example:
All modules (exploits/post/aux) against the target
cat: Display the contents of a file on screen
use priv: Load the priv module
subnet mask will be pivoted through this session.
download / upload: Move files to/from the target
hashdump: Dump the hashes from the box
msf > route add [Subnet to Route To]
machine
timestomp:Alter NTFS file timestamps
[Subnet Netmask] [SessionID]
mkdir / rmdir: Make / remove directory
edit: Open a file in the default editor (typically vi)

ADVERTISEMENT

00 votes

Related Articles

Related forms

Related Categories

Parent category: Education
Go
Page of 2