What You'll Build
In this exercise you will carry an authorized, intentionally vulnerable lab VM through the full exploitation arc: recon a foothold, gain limited access using documented tooling, enumerate for privilege escalation, escalate to administrative control, and document every step with evidence. The deliverable is a compact engagement narrative, how initial access was gained, how privileges were escalated, and exactly how each step is remediated, mirroring the core loop of a real internal penetration test end to end.
Prerequisites
- A signed authorization for the lab VM and a clear scope, from Lesson 1, rehearsing the habit of confirming permission before any active step.
- The recon workflow from Module 1, passive discovery, Nmap scanning, and service fingerprinting, to identify the foothold service.
- Familiarity with the Metasploit workflow, from Lesson 7, including reading a module before running it and managing sessions responsibly.
- Comfort with Linux and Windows privilege escalation enumeration, from Lessons 9 and 10, and the enumerate-verify-report loop.
- Awareness of safe practice, from Lesson 8, preferring non-destructive demonstrations over crash-prone techniques on any host.
Setup & Project Structure
Run everything inside an isolated lab environment you are explicitly authorized to attack, never against systems you do not own or have written permission to test. Create a working directory to capture each phase's output and evidence, because in a real engagement the documentation is the product. Dated, named files make your narrative reproducible and let a teammate follow the exact path from foothold to escalation without repeating your work or guessing what you did.
# Isolated, authorized lab only. Set up a documented workspace.
mkdir vm-engagement && cd vm-engagement
mkdir recon foothold privesc evidence
# Record scope and target up front as your reference of record.
cat > scope.txt <<'EOF'
AUTHORIZED LAB TARGET
vm: intentionally-vulnerable practice VM (isolated network)
ip: 10.10.10.50
rule: this VM only; nothing outside the isolated lab network
EOF
cat scope.txtStep 1 — Recon the Foothold
Begin by mapping the target, reusing Module 1's workflow. Discover open ports, fingerprint service versions, and identify a service whose version corresponds to a known, documented weakness suitable for gaining initial access. The goal here is not to exploit yet but to build the same precise service map a real test relies on, so that any later action targets a confirmed, in-scope service rather than a guess. Save all output as evidence for the narrative.
# Map the target and fingerprint services (authorized VM only).
nmap -sV -oA recon/services 10.10.10.50
# Identify a service whose version maps to a KNOWN, documented weakness.
grep -E 'open' recon/services.nmap
# Research that exact version -> confirm a suitable, in-scope entry point
# BEFORE any exploitation. Record the target service in your notes.Step 2 — Gain Initial Access
With a confirmed vulnerable service identified, gain a limited foothold using documented tooling, following the disciplined Metasploit workflow from Lesson 7: read the module, inspect its options, verify applicability where possible, then execute against the in-scope target and manage the resulting session. This should yield low-privileged access, exactly the starting point real engagements face. Capture evidence of the access and note precisely what defenders could have observed during the attempt.
# Deliberate, understood exploitation of the confirmed service.
# Follow the Lesson 7 discipline; run only within scope.
# msfconsole
# use <module_for_the_confirmed_weakness>
# show options ; set RHOSTS 10.10.10.50 ; set LHOST <lab_ip>
# check # verify applicability where supported
# run # execute against the authorized VM
# sessions -l # you now hold a LOW-PRIVILEGED session
# Evidence: capture 'whoami' / 'id' showing limited access.Step 3 — Enumerate & Escalate Privileges
From your low-privileged foothold, run the enumerate-verify-report loop from Lessons 9 and 10. Enumerate SUID binaries or service permissions, scheduled jobs, sudo rights or privileges, and versions; verify each promising lead by hand; then choose the least disruptive confirmed path to escalate toward root or SYSTEM. Prefer a safe misconfiguration route over any crash-prone technique. Capture evidence at each stage so the escalation path is fully reconstructable in your report.
# Enumerate from the foothold, verify, then escalate least-disruptively.
# Linux example enumeration:
find / -perm -4000 -type f 2>/dev/null # SUID candidates
sudo -l 2>/dev/null ; cat /etc/crontab # sudo rights, scheduled jobs
uname -a # version context
# (Windows equivalent: whoami /priv ; sc query ; icacls on service bins)
# Verify the most promising lead by hand -> escalate via that path ->
# capture 'id'/'whoami' proving root/SYSTEM. Prefer safe misconfig paths.Step 4 — Document & Remediate
Finish by turning your captured evidence into a concise engagement narrative. For both the foothold and the escalation, record the vulnerability, the exact step taken, the proof of impact, and, most importantly, the specific remediation, patch the service, tighten permissions, remove the privilege. Confirm the write-up is clear enough that a defender could both understand the attack and close every step. This documentation, not merely reaching root, is the true product of the exercise.
# Consolidate the chain into ONE remediable narrative -- the deliverable.
cat > evidence/report.md <<'EOF'
# Engagement Narrative — VM 10.10.10.50 (authorized lab)
## Foothold
- Vulnerability: <service + version> (known documented weakness)
- Step: exploited via <module>, gained low-priv session
- Proof: id -> low-privileged user
- Fix: patch/upgrade the service; restrict its exposure
## Privilege Escalation
- Vulnerability: <misconfig, e.g. writable root cron script>
- Step: verified by hand, escalated via that path
- Proof: id -> root / SYSTEM
- Fix: correct permissions; apply least privilege
EOF
cat evidence/report.mdWarning: Everything here is confined to your authorized, isolated lab VM. Running these exploitation and escalation steps against any system you do not own or lack written permission to test is unauthorized access and can be a crime. The tooling is identical regardless of target; only authorization makes it lawful. Prefer non-destructive demonstrations throughout, and never carry techniques practised in the lab onto real systems without a signed engagement behind them.
Extension Challenge: Strengthen the engagement three ways. First, for each step write both what you did and what a defender's logs or EDR would have shown, practising the detection-awareness Module 5 formalizes. Second, redo the escalation via an alternate confirmed path to show the host had multiple weaknesses. Third, draft a one-paragraph executive summary translating the technical chain into business risk for a non-technical reader.
- A full exploitation exercise runs the real engagement loop: recon a foothold, gain limited access, enumerate, escalate privileges, and document with evidence.
- Everything stays inside an authorized, isolated lab VM, since identical tooling is only lawful when a signed authorization and clear scope stand behind it.
- Recon fingerprints services to identify a confirmed, in-scope weakness, so initial access targets a known entry point rather than a blind guess.
- Initial access follows the disciplined Metasploit workflow, read the module, verify, execute, manage the session, and yields a low-privileged foothold.
- Escalation applies the enumerate-verify-report loop, preferring the least disruptive confirmed misconfiguration path over any crash-prone technique.
- The true deliverable is a clear, remediable narrative pairing each step with proof of impact and the specific hardening that closes it, not merely reaching root.