Metasploit › Module 4 › Lesson 3
Use Before Run
use selects module context — still read options and RoE before run on $LAB.
Visual · msf_use_before_run
use path ; back. Original Cyberlium.
Opening
use enters the module; it does not launch the attack — run comes later with options.
`use exploit/.` switches prompt and loads defaults. `back` leaves module context. `rerun` and `run` wait until Options Literacy (M5) confirms RHOSTS=$LAB and required settings. Module 4 ends at use+info+back — no run. Next: Search Lab.
1. use and back
`use auxiliary/scanner/ftp/ftp_version` (example) changes context. `back` returns global. `info` still works in context.
Accidental `run` is why RoE and checklists exist — this lesson stops before run.
Command guide
Try these commands — use and back
═══ TOOLS & WEBSITES ═══ Browse / read these (authorized learning only — stay in YOUR lab / program scope)
Using modules — https://docs.rapid7.com/metasploit/using-metasploit/ Module lifecycle — https://docs.rapid7.com/metasploit/msf-overview/
═══ INSTALL ═══
Linux (Debian/Ubuntu): Kali: preinstalled, or: sudo apt install metasploit-framework
macOS: Prefer Kali/Linux VM — brew install metasploit (heavy)
Windows: Use Kali VM or WSL with metasploit-framework — not raw Windows host
═══ LINUX / macOS ═══
Command — copy this
msfconsole -q -x 'help use; help set; help run; help back; exit' 2>/dev/null || echo 'Always: use -> show options -> set RHOSTS to LAB only'
Primary tools to practice this lesson: msfconsole. Reference sites: Using modules (https://docs.rapid7.com/metasploit/using-metasploit/); Module lifecycle (https://docs.rapid7.com/metasploit/msf-overview/). Run every command in the box — install first, then the usage lines — only on YOUR lab / program scope.
2. Prerequisite chain
RoE → search → info → use → show options → check → run. You are at step four — do not skip to run.
3. Defender note
Attackers who skip info make noise with wrong options — defenders detect that noise. Slow literacy wins.
4. What you ship: use/back transcript
use one module, info, back — no run. chmod 600.
5. What you record before the next lesson
Date. Module used. back confirmed. File t14-m04-l03-use-before-run.txt chmod 600.
6. Wrong vs right: stranger hosts vs YOUR lab VM
Worked failure — same MSF word, opposite target. Right never needs a café Wi-Fi or classmate laptop.
Wrong
use module ; set RHOSTS public_ip ; run 'quick test.'
Right
use + info + back only. Next: Search Lab.
Mission: use and back without run
1) search → pick module 2) use module_path 3) info 4) back 5) Save transcript chmod 600. No run.
Stuck? Ask Cyberlium AI Mentor
Prompt change means context change — notice it.
Knowledge Check
APPLY: use command:
Multiple choice
Knowledge Check
APPLY: True or False: Cyberlium M4 allows run on $LAB.
True or False
Knowledge Check
APPLY: back command:
Multiple choice