Cyberlium

Metasploit › Module 7 › Lesson 1

BeginnerModule 7Lesson 1/5

Sessions Named

sessions -l lists callbacks — interact only on $LAB with written RoE.

15 min+40 XP3 quiz
Module progress1 of 5

Visual · msf_sessions_named

Session = established callback channel. Original Cyberlium.

Opening

A session is evidence of access — treat it like a loaded tool.

After a lab exercise, msfconsole tracks sessions with IDs. sessions -l lists them; sessions -i <id> interacts. Background with background. This is naming and hygiene — not a cookbook to hold shells on real workstations overnight.

1. Session list literacy

sessions -l shows id, type, info, tunnel.

Know which session belongs to which $LAB VM — label notes.

Command guide

Try these commands — Session list literacy

═══ TOOLS & WEBSITES ═══ Browse / read these (authorized learning only — stay in YOUR lab / program scope)

Sessions — https://docs.rapid7.com/metasploit/managing-sessions/ Session types — 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 sessions; help sessions -l; exit' 2>/dev/null || echo 'Session list/kill literacy'

Primary tools to practice this lesson: msfconsole. Reference sites: Sessions (https://docs.rapid7.com/metasploit/managing-sessions/); Session types (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. Interact concept

sessions -i 1 enters session 1. background returns to console.

Multiple sessions need a spreadsheet in long labs — still $LAB only.

3. Scope

Sessions on systems you do not own = stop immediately.

Kill lab sessions when exercise ends.

4. What you ship: session command vocabulary

sessions -l / -i / background defined. Kill-when-done rule.

5. What you record before the next lesson

Command list in notes.

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

    Keep a session open on a roommate's PC “to learn.”

  • Right

    Name session commands. Next: Meterpreter literacy.

Mission: session vocabulary

1) Write sessions -l purpose. 2) Write sessions -i and background. 3) Write kill-on-done for $LAB.

Stuck? Ask Cyberlium AI Mentor

Ask Mentor: “sessions -l vs jobs?”

Knowledge Check

1

APPLY: sessions -l:

Multiple choice

Knowledge Check

2

APPLY: True or False: Interact any session found on LAN.

True or False

Knowledge Check

3

APPLY: background:

Multiple choice

← Previous

Answer all 3 knowledge checks to continue. (0/3 answered)