M e t a s p l o it Ch e at S h e e t
Fra m ewo r k c o m p o n e nt s
Metasploit Meterpreter Run as a DLL injec tion payload on a target PC providing control over the target s ystem
Metasploit msf venom Help creat St andalone pay loads as execut able, Ruby script , or shellcode
N e t wo r k i n g c o m m a n d s
ipconfig: Show net work inter face configuration
portf wd: F or ward packet s
route: View / edit net work routing table
Meterpreter commands Pr o c e s s h a n d l i n g c o m m a n d s
Command Description
Basic and file handling commands
getpid: Display the process ID
sysinfo Display system information
getuid: Display the user ID
ps List and display running processes
ps: Display running process
k i l l ( P I D) Te r m i n a t e a r u n n i n g p r o c e s s
Kill: Stop and terminate a process
getuid Display user ID
getprivs Shows multiple privileges as possible
upload or download Upload / download a file
reg Access target machine registr y
pwd or lpwd P r i n t w o r k i n g d i r e c t o r y ( l o c a l / r e m o t e)
Shell Access target machine shell
cd or lcd C h a n g e d i e r c t o r y ( l o c a l o r r e m o t e)
execute: Run a specified
cat Display file content
migrate: Move to a given destination process ID
bglist show background running scripts
bgrun make a script rin in the back ground
bgkill terminate abackground procss
background Move ac tive session to background
I nt e r fa c e / o u t p u t c o m m a n d s
edit <FILE Name> Edit a file in vi editor enumdesktops Show all available desk tops
shell Access shell on the target machine Getdesktop Display current desk top
migrate <PID> Switch to another process keyscan _ s tar t St ar t key log ger in t arget machine
idletime Display idle time of user Keyscan _ stop Stop key log ger in t arget machine
screenshot Ta k e a s c r e e n s h o t set _desktop Configure desk top
clearev Clear the system logs keyscan _ dump Dump key log ger content
? or Help Shoes all the commands
exit / quit: Exit the Meterpreter session
shutdown / reboot Restar t the system
use Ex tension load Pa s s wo r d m a n age m e nt c o m m a n d s
channel Show ac tive channels hashdump Access content of password file - Hash file
M s f ve n o m c o m m a n d o p t io n s
Switch Syntax Description
-p - p ( P a y l o a d o t i p n) Display payload standard options
-l - l ( l i s t t u p e) Lis t module t ype i.e payload, encoders
-f -f (format) output format
-e - e (e n c o d e r ) Define which encoder to use
-a -a (Architec ture or plat form Define which plat form to use
-s - s ( S p a c e) Define maximum payload capacit y
-b - b (c h a r a c t e r s) Define set of charac ters not to use
-i - i ( N u m b e r o f t i m e s) Define number of times to use encoder
Find more StationX Cheat Sheets
-x - x ( F i l e n a m e) Define a custom file to use as template here
h t t p s : // w w w . s t a t i o n x . n e t /c a t e -
g o r y /c h e a t s h e e t /
-o - o (o u t p u t ) Save a payload
-h -h Help