The correct next step after a port scan is to run service version detection on those open ports. This is because a port scan alone only reveals which ports are open, but without knowing the specific software and version running behind each port—such as Apache 2.4.49 or OpenSSH 8.9—you cannot match those services against known vulnerabilities in databases like CVE or Exploit-DB. On the CompTIA PenTest+ PT0-002 exam, this tests your understanding of the enumeration phase in the penetration testing methodology, where you must systematically gather detailed service information before attempting exploitation. A common trap is jumping straight to exploitation after seeing open ports, but the exam emphasizes that version detection is the critical bridge between discovery and attack. Remember the mnemonic “Ports point, versions verify”—always verify the version before you exploit.
PT0-002 Attacks and Exploits Practice Question
This PT0-002 practice question tests your understanding of attacks and exploits. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.
Exhibit
Refer to the exhibit.
msf6 > use auxiliary/scanner/portscan/tcp
msf6 auxiliary(scanner/portscan/tcp) > set RHOSTS 10.0.0.1
msf6 auxiliary(scanner/portscan/tcp) > set PORTS 1-1000
msf6 auxiliary(scanner/portscan/tcp) > run
[*] 10.0.0.1:22 - TCP OPEN
[*] 10.0.0.1:80 - TCP OPEN
[*] 10.0.0.1:443 - TCP OPEN
[*] Scanned 1 of 1 hosts (100% complete)
Refer to the exhibit. After running a port scan in Metasploit, what is the next best step to identify vulnerabilities on the open ports?
Clue words in this question
Noticing these words before you look at the options changes how you read each choice.
Clue: "best"
Why it matters: Signals that multiple options may be partially correct. Choose the option that most directly solves the exact problem described, not the one that sounds most complete.
Refer to the exhibit.
msf6 > use auxiliary/scanner/portscan/tcp
msf6 auxiliary(scanner/portscan/tcp) > set RHOSTS 10.0.0.1
msf6 auxiliary(scanner/portscan/tcp) > set PORTS 1-1000
msf6 auxiliary(scanner/portscan/tcp) > run
[*] 10.0.0.1:22 - TCP OPEN
[*] 10.0.0.1:80 - TCP OPEN
[*] 10.0.0.1:443 - TCP OPEN
[*] Scanned 1 of 1 hosts (100% complete)
A
Perform a brute-force attack against SSH and HTTP
Why wrong: Brute-forcing is noisy and may alert defenders; version detection is less intrusive.
B
Immediately exploit the open HTTP service
Why wrong: Exploitation without version identification may fail and create noise.
C
Run a Nessus scan on the host
Why wrong: Nessus is a separate tool; the question asks for next step within Metasploit.
D
Use the scanner to run service version detection on those ports
Knowing the exact version of services allows matching against known vulnerabilities.
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Use the scanner to run service version detection on those ports
After a port scan in Metasploit, the next best step is to run service version detection (e.g., using the `scanner/portscan/tcp` auxiliary module's `VERSION` option or the `db_nmap -sV` command) to identify the exact software and version running on each open port. This version information is critical for matching against known vulnerabilities in databases like CVE or Exploit-DB, enabling targeted exploitation. Option D is correct because it follows the systematic penetration testing methodology of enumeration before exploitation.
Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
✗
Perform a brute-force attack against SSH and HTTP
Why it's wrong here
Brute-forcing is noisy and may alert defenders; version detection is less intrusive.
✗
Immediately exploit the open HTTP service
Why it's wrong here
Exploitation without version identification may fail and create noise.
✗
Run a Nessus scan on the host
Why it's wrong here
Nessus is a separate tool; the question asks for next step within Metasploit.
✓
Use the scanner to run service version detection on those ports
Why this is correct
Knowing the exact version of services allows matching against known vulnerabilities.
Clue confirmation
The clue word "best" in the question point toward this answer.
Related concept
Read the scenario before looking for a memorised answer.
Common exam traps
Common exam trap: answer the scenario, not the keyword
The trap here is that candidates often jump to exploitation (Option B) or brute-forcing (Option A) without performing version detection, missing the critical enumeration step that identifies the exact service version needed to select the correct exploit.
Detailed technical explanation
How to think about this question
Service version detection works by sending crafted probes to open ports and analyzing responses against a signature database (e.g., nmap-service-probes). In Metasploit, the `db_nmap -sV` command integrates Nmap's version detection into the framework's database, allowing subsequent searches like `search type:exploit platform:linux name:openssh` to find relevant exploits. A real-world scenario where this matters is when a port scan shows port 22 open, but version detection reveals it's OpenSSH 7.2p2, which has a known user enumeration vulnerability (CVE-2016-6210) that can be exploited without brute-forcing.
KKey Concepts to Remember
Read the scenario before looking for a memorised answer.
Find the constraint that changes the correct option.
Eliminate answers that are true in general but not in this case.
TExam Day Tips
→Watch for words such as best, first, most likely and least administrative effort.
→Review why wrong options are wrong, not only why the correct option is correct.
Key takeaway
Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Real-world example
How this comes up in practice
A security team runs a vulnerability scan on a web application and discovers an unpatched SQL injection flaw. The team prioritises remediation by CVSS score — critical flaws are patched within 24 hours, high within 7 days. Questions like this test whether you understand vulnerability management processes, scanning tools, and remediation prioritisation.
Related glossary terms
Concepts from this question explained
These glossary pages explain the core terms tested in this PT0-002 question in full detail.
Attacks and Exploits — This question tests Attacks and Exploits — Read the scenario before looking for a memorised answer..
What is the correct answer to this question?
The correct answer is: Use the scanner to run service version detection on those ports — After a port scan in Metasploit, the next best step is to run service version detection (e.g., using the `scanner/portscan/tcp` auxiliary module's `VERSION` option or the `db_nmap -sV` command) to identify the exact software and version running on each open port. This version information is critical for matching against known vulnerabilities in databases like CVE or Exploit-DB, enabling targeted exploitation. Option D is correct because it follows the systematic penetration testing methodology of enumeration before exploitation.
What should I do if I get this PT0-002 question wrong?
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
Are there clue words in this question I should notice?
Yes — watch for: "best". Signals that multiple options may be partially correct. Choose the option that most directly solves the exact problem described, not the one that sounds most complete.
What is the key concept behind this question?
Read the scenario before looking for a memorised answer.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
This PT0-002 practice question is part of Courseiva's free CompTIA 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 PT0-002 exam.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.