Courses

The Metasploit Framework
OSCP · Chapter 16

The Metasploit Framework

Metasploit Framework is the most widely used exploitation and post-exploitation platform, bundling exploits, payloads, and a scripting console (Meterpreter) that dramatically speeds up lab work and real engagements alike.

Key concepts

  • `search`, `use`, `show options`, `set`, `run`/`exploit` is the core workflow for firing any module.
  • Meterpreter (the advanced payload) gives you a scripting-capable, in-memory session for post-exploitation: file transfer, pivoting, credential harvesting.
  • Understand what a module actually does before running it against anything but a lab — Metasploit makes exploitation easy, which also makes it easy to cause real damage without meaning to.
  • Metasploit is a force-multiplier, not a substitute for understanding the vulnerability class it automates.

Example

msfconsole
search type:exploit name:eternalblue
use exploit/windows/smb/ms17_010_eternalblue
set RHOSTS 10.10.10.5
run

Try it yourself

In a lab environment (e.g. Metasploitable2), use msfconsole to find and run one matching exploit module, then use the resulting Meterpreter session to run `sysinfo` and `getuid`.

@ Daniel Burlacu