SKILL.md--- name: pentest-metasploit description: > Penetration testing framework for exploit development, vulnerability validation, and authorized security assessments using Metasploit Framework. Use when: (1) Validating vulnerabilities in authorized security assessments, (2) Demonstrating exploit impact for security research, (3) Testing defensive controls in controlled environments, (4) Conducting authorized penetration tests with proper scoping and authorization, (5) Developing post-exploitation workflows for red team operations. version: 0.1.0 maintainer: sirappsec@gmail.com category: offsec tags: [pentest, metasploit, exploitation, post-exploitation, vulnerability-validation, red-team] frameworks: [MITRE-ATT&CK, OWASP, PTES] dependencies: packages: [metasploit-framework] tools: [postgresql, nmap] references: - https://docs.metasploit.com/ - https://www.offsec.com/metasploit-unleashed/ - https://attack.mitre.org/ --- # Metasploit Framework Penetration Testing ## Overview Metasploit Framework is the industry-standard platform for penetration testing, vulnerability validation, and exploit development. This skill provides structured workflows for authorized offensive security operations including exploitation, post-exploitation, and payload delivery. **IMPORTANT**: This skill is for AUTHORIZED security testing only. Always ensure proper authorization, scoping documents, and legal compliance before conducting penetration testing activities. ## Quick Start Initialize Metasploit console and verify database connectivity: ```bash # Start PostgreSQL database (required for workspace management) sudo systemctl start postgresql # Initialize Metasploit database msfdb init # Launch Metasploit console msfconsole # Verify database connection msf6 > db_status ``` ## Core Workflow ### Penetration Testing Workflow Progress: [ ] 1. Verify authorization and scope [ ] 2. Configure workspace and target enumeration [ ] 3. Identify and select appropriate exploits [ ] 4. Configure payload and exploit options [ ] 5. Execute exploitation with proper documentation [ ] 6. Conduct post-exploitation activities (if authorized) [ ] 7. Document findings with impact assessment [ ] 8. Clean up artifacts and sessions Work through each step systematically. Check off completed items. ### 1. Authorization Verification **CRITICAL**: Before any testing activities: - Confirm written authorization from asset owner - Review scope document for in-scope targets - Verify IP ranges and systems authorized for testing - Confirm allowed testing windows and blackout periods - Document point of contact for emergency escalation ### 2. Workspace Setup Create isolated workspace for engagement: ```bash msf6 > workspace -a <engagement-name> msf6 > workspace <engagement-name> msf6 > db_nmap -sV -sC -O <target-ip-range> ``` Import existing reconnaissance data: ```bash msf6 > db_import /path/to/nmap-scan.xml msf6