Metasploit: Exploitation

Overview

This room moves from Metasploit basics into practical use. It covers scanning with Metasploit modules, using the built-in database and workspaces, running vulnerability scans, exploiting services, and understanding how msfvenom and Meterpreter fit into the workflow.

Core idea: Metasploit becomes much more useful once you stop treating it as a single exploit runner and start using it as an organized framework for discovery, exploitation, and session management.

1) Scanning with Metasploit

Metasploit includes many auxiliary modules for reconnaissance and service discovery.

The room makes the practical point that Metasploit can scan, but if raw scanning speed matters, Nmap is often the better first choice.

2) Using Nmap from Msfconsole

You can run normal Nmap scans directly from within msfconsole.

Practical takeaway: Metasploit integrates well with Nmap, but you should still choose the right tool for the job rather than forcing everything through Metasploit modules.

3) Service-Specific Scanners

The room highlights that Metasploit is often strongest when you use focused service scanners instead of generic port scans.

4) The Metasploit Database

For larger engagements, the database feature helps track hosts, services, notes, loot, and vulnerabilities.

On TryHackMe AttackBox this is usually already configured, but on a local setup you may need to start PostgreSQL and initialize the database first.

5) Workspaces

Workspaces let you separate different projects or target environments inside the same Metasploit instance.

Why this matters: once you have multiple targets or multiple clients, clean separation prevents mistakes and makes findings easier to manage.

6) Database-Aware Enumeration

When the database is active, Metasploit can store scan results and let you query them later.

This is the main difference between a quick one-off exploit session and a more realistic engagement workflow.

7) Exploitation Workflow

The room’s practical direction is straightforward: enumerate the target, identify a promising service, search for a relevant module, set the required options, choose a payload if needed, and run the exploit.

  1. Scan or import target information.
  2. Search for a relevant exploit module.
  3. Review options with show options.
  4. Set target values such as RHOSTS, RPORT, and payload parameters.
  5. Run the module and handle the resulting session.

8) Msfvenom and Meterpreter

The room also introduces msfvenom and Meterpreter at a high level.

Exam Notes (PT1)