eJPT Exploitation with Metasploit 2 — Questions and Answers
Question 1: Which Metasploit command searches for modules by CVE number or keyword?
- use
- search (Correct answer)
- find
- lookup
Correct answer: search
The 'search' command in msfconsole lets you find modules by CVE, name, platform, or type.
Question 2: What does the 'check' command do in Metasploit before running an exploit?
- Runs the exploit in safe mode
- Verifies the target is vulnerable without exploiting it (Correct answer)
- Checks if the payload is compatible
- Validates module syntax
Correct answer: Verifies the target is vulnerable without exploiting it
The 'check' command tests whether the target is vulnerable without actually launching the exploit.
Question 3: Which payload type in Metasploit establishes a persistent TCP connection from target back to attacker?
- bind/tcp
- reverse/tcp (Correct answer)
- inline/tcp
- staged/tcp
Correct answer: reverse/tcp
A reverse_tcp payload causes the target machine to connect back to the attacker's listener.
Question 4: In Metasploit, what is the purpose of the LHOST option?
- The target host IP address
- The local attacker machine IP that receives the reverse connection (Correct answer)
- The proxy host for routing traffic
- The hostname for the payload filename
Correct answer: The local attacker machine IP that receives the reverse connection
LHOST specifies the attacker's IP address where reverse payloads will connect back to.
Question 5: What Metasploit command shows all currently configured options for the selected module?
- info
- show options (Correct answer)
- list settings
- config
Correct answer: show options
'show options' displays all required and optional parameters for the active module along with their current values.
Question 6: Which msfvenom flag specifies the output format for a generated payload?
- -p
- -f (Correct answer)
- -o
- -e
Correct answer: -f
The -f flag in msfvenom specifies the output format such as exe, elf, raw, or python.
Question 7: What happens when you run 'sessions -i 1' in Metasploit?
- Lists all active sessions
- Interacts with session number 1 (Correct answer)
- Kills session number 1
- Inspects session 1 metadata
Correct answer: Interacts with session number 1
'sessions -i 1' interacts with (drops into) the active session with ID 1.
Which Metasploit command searches for modules by CVE number or keyword?