Metasploit Cheatsheet – Codelivly
$ 0.00
This Metasploit Cheatsheet gives you a quick, organized reference for all essential commands — from basic setup to post-exploitation.
Description
Master Exploitation with Ease – Your Quick Guide to msfconsole
Mastering the Metasploit Framework is a non-negotiable skill for any ethical hacker or penetration tester. This Metasploit Cheatsheet provides a curated, organized reference for the most essential commands—moving from your initial database setup to advanced post-exploitation tradecraft.
Whether you are a beginner learning the ropes or a pro looking for a faster workflow, keep this guide by your side for smarter pentesting.
1. Core System & Database Commands
Before launching an attack, ensure your framework and database are correctly initialized to track your results.
- Start Metasploit:
msfconsole. - Initialize Database:
msfdb init(Run in terminal before msfconsole). - Check DB Status:
db_status(Ensures PostgreSQL is connected). - Update Framework:
msfupdate.
2. Finding & Loading Modules
Metasploit’s power lies in its modularity. Use these commands to navigate its thousands of exploits and scanners.
- Search for Modules:
search [name/cve/platform]. - Load a Module:
use [path/to/module]. - Get Module Info:
info. - Go Back:
back(Unloads the current module).
3. Configuring Options & Payloads
Every exploit requires specific parameters to be set before execution.
- Show Options:
show options(Lists required variables like RHOSTS). - Set Target IP:
set RHOSTS [target_ip]. - Set Local IP:
set LHOST [your_ip](Crucial for reverse shells). - List Payloads:
show payloads. - Set Payload:
set PAYLOAD [payload_name].
4. Running & Sessions Management
Once configured, use these commands to launch your attack and manage active connections.
- Launch Exploit:
exploitorrun. - Check Vulnerability:
check(Tests if a target is vulnerable without exploiting). - List Active Sessions:
sessions -l. - Interact with Session:
sessions -i [id].
5. Post-Exploitation & Meterpreter Tips
After gaining access, use the Meterpreter shell to maintain control and escalate privileges.
- System Info:
sysinfo. - Get System (Priv-Esc):
getsystem. - Dump Hashes:
hashdump. - Download/Upload Files:
download [file]orupload [file].





Sakul –
Loved it