Meterpreter Cheat Sheet
3 minute read
Core Commands
?
: help menubackground
: moves the current session to the backgroundbgkill
: kills a background meterpreter scriptbglist
: provides a list of all running background scriptsbgrun
: runs a script as a background threadchannel
: displays active channelsclose
: closes a channelexit
: terminates a meterpreter sessionhelp
: help menuinteract
: interacts with a channelirb
: go into Ruby scripting modemigrate
: moves the active process to a designated PIDquit
: terminates the meterpreter sessionread
: reads the data from a channelrun
: executes the meterpreter script designated after ituse
: loads a meterpreter extensionwrite
: writes data to a channel
File System Commands
cat
: read and output to stdout the contents of a filecd
: change directory on the victimdel
: delete a file on the victimdownload
: download a file from the victim system to the attacker systemedit
: edit a file with vimgetlwd
: print the local directorygetwd
: print working directorylcd
: change local directorylpwd
: print local directoryls
: list files in current directorymkdir
: make a directory on the victim systempwd
: print working directoryrm
: delete a filermdir
: remove directory on the victim systemupload
: upload a file from the attacker system to the victim
System Commands
clearav
: clears the event logs on the victim’s computerdrop_token
: drops a stolen tokenexecute
: executes a commandgetpid
: gets the current process ID (PID)getprivs
: gets as many privileges as possiblegetuid
: get the user that the server is running askill
: terminate the process designated by the PIDps
: list running processesreboot
: reboots the victim computerreg
: interact with the victim’s registryrev2self
: calls RevertToSelf() on the victim machineshell
: opens a command shell on the victim machineshutdown
: shuts down the victim’s computersteal_token
: attempts to steal the token of a specified (PID) processsysinfo
: gets the details about the victim computer such as OS and name
User Interface Commands
enumdesktops
: lists all accessible desktopsgetdesktop
: get the current meterpreter desktopidletime
: checks to see how long since the victim system has been idlekeyscan_dump
: dumps the contents of the software keyloggerkeyscan_start
: starts the software keylogger when associated with a process such as Word or browserkeyscan_stop
: stops the software keyloggerscreenshot
: grabs a screenshot of the meterpreter desktopset_desktop
: changes the meterpreter desktopuictl
: enables control of some of the user interface components
Privilege Escalation Commands
getsystem
: uses 15 built-in methods to gain sysadmin privileges
Password Dump Commands
hashdump
: grabs the hashes in the password (SAM) file
Note that hashdump will often trip AV software, but there are now two scripts that are more stealthy, “run hashdump” and “run smart_hashdump”. Look for more on those on my upcoming meterpreter script cheat sheet.
Timestomp Commands
timestomp
: manipulates the modify, access, and create attributes of a file
I feedback.
Let me know what you think of this article on twitter @cpardue09 or leave a comment below!
Let me know what you think of this article on twitter @cpardue09 or leave a comment below!
comments powered by Disqus