GPEN Metasploit Practice Question
Exhibit
msf6 > sessions -l Active sessions =============== Id Name Type Information -- ---- ---- ----------- 1 meterpreter x86/windows NT AUTHORITY\SYSTEM @ WIN-SERVER1 2 meterpreter x64/windows NT AUTHORITY\SYSTEM @ WIN-SERVER2
Refer to the exhibit. Which command allows the tester to switch their interaction focus from session 1 to session 2?
⚠ Common exam trap
Candidates often guess command syntax like 'switch 2' or 'interact 2' instead of the standard Metasploit 'sessions -i' syntax, failing to recall the specific flags used for session management.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
sessions -i 2
Managing multiple sessions is a common task in professional penetration tests where an attacker may have compromised several machines. The 'sessions -i' command is the standard way to switch the console interface to a different active session. Being able to quickly toggle between sessions is essential for maintaining control over multiple compromised systems simultaneously without needing to manually reconnect to each one.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
sessions -s 2
Why it's wrong here
There is no '-s' flag for the sessions command in Metasploit. The correct flag for interacting with a session is '-i'. Using the wrong flag will lead to command errors, and it is important to be familiar with the correct syntax to ensure smooth session management during a penetration test.
- ✓
sessions -i 2
Why this is correct
The '-i' flag stands for interact, and specifying the session ID (2 in this case) correctly switches the console focus to that session. This is the standard procedure in Metasploit for moving between different active shells when managing multiple compromises during a large-scale penetration test engagement.
- ✗
switch 2
Why it's wrong here
The 'switch' command does not exist in the Metasploit console. Managing sessions is done via the 'sessions' command. Using invalid commands like 'switch' will prevent the user from interacting with their active sessions, highlighting the need to memorize the correct session management syntax for the GIAC certification exam.
- ✗
use session 2
Why it's wrong here
The 'use' command is reserved for selecting exploit or auxiliary modules, not for session interaction. Metasploit's command structure is strictly organized, and using the wrong command to interact with sessions will return errors, showing that the user has not grasped the command hierarchy within the framework's operational console.
About these practice questions
Courseiva writes every GPEN question from scratch — 298 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official GIAC exam blueprint
This GPEN practice question is part of Courseiva's free GIAC certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the GPEN exam.