Question 323 of 509
Tools and Code AnalysismediumMultiple ChoiceObjective-mapped

Quick Answer

The answer is that the Nmap SMB script requires administrative credentials to enumerate shares. This is because scripts like smb-enum-shares.nse attempt anonymous or guest logins by default, but modern Windows servers disable anonymous SMB access as a security hardening measure. Without valid credentials, the script connects but receives no share list, even though shares exist. On the CompTIA PenTest+ PT0-002 exam, this tests your understanding of SMB authentication requirements versus tool behavior—a common trap is assuming a script that runs without errors has succeeded. Remember that Nmap’s SMB enumeration is not a magic wand; it respects the target’s access controls. For the exam, think: “No shares returned? Check your creds, not your switches.” A useful memory tip is SMB-CAN: Shares Must Be Credentialed, Always Negotiate.

PT0-002 Tools and Code Analysis Practice Question

This PT0-002 practice question tests your understanding of tools and code analysis. This is a configuration task: choose the command set that satisfies every stated requirement. Small differences — like 'secret' vs 'password' or 'transport input ssh' vs 'all' — change whether the answer is correct. 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.

A penetration tester is using an Nmap NSE script to enumerate SMB shares on a target Windows server. The script runs without errors but returns no shares, even though the server has shares configured. Which is the MOST likely cause?

Clue words in this question

Noticing these words before you look at the options changes how you read each choice.

  • Clue: "most likely"

    Why it matters: Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.

Question 1mediummultiple choice
Full question →

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

The script requires administrative credentials

The Nmap SMB enumeration scripts (e.g., smb-enum-shares.nse) by default attempt to connect as a guest or anonymous user. On modern Windows servers, especially those with default security configurations, anonymous access to SMB shares is disabled. The script requires valid administrative credentials to list all shares, as the SMB protocol restricts share enumeration to authenticated users with appropriate privileges.

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.

  • The script requires administrative credentials

    Why this is correct

    SMB share enumeration typically requires valid credentials, without which the script cannot enumerate shares.

    Clue confirmation

    The clue word "most likely" in the question point toward this answer.

    Related concept

    Read the scenario before looking for a memorised answer.

  • The target is running Windows 10 with SMB signing enabled

    Why it's wrong here

    SMB signing does not prevent script execution; it only adds integrity checks.

  • The script is not being run with the correct arguments

    Why it's wrong here

    Incorrect arguments would likely produce an error message or no output, but the script ran without errors.

  • The target is blocking ICMP traffic

    Why it's wrong here

    ICMP blocking does not affect SMB scanning over TCP port 445.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates assume Nmap scripts run with full default access, overlooking that SMB enumeration on modern Windows requires explicit authentication, not just a null session.

Trap categories for this question

  • Command / output trap

    Incorrect arguments would likely produce an error message or no output, but the script ran without errors.

Detailed technical explanation

How to think about this question

Under the hood, the SMB protocol uses the NetShareEnum API (via MSRPC over SMB) to list shares. This API requires the caller to have the 'SeNetworkLogonRight' and appropriate share-level permissions. Without credentials, the script falls back to a null session, which Windows Server (since Windows 2000 and later) disables by default. In real-world assessments, testers must supply credentials using the --script-args 'smbuser=...','smbpass=...' or use a credential file to enumerate shares successfully.

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 analyst at a medium-sized enterprise encounters this scenario during an investigation or architecture review. The correct answer reflects best practice for the specific threat or control described. Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option. Security exam questions test whether you can match controls to threats in context — not just recall definitions.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related PT0-002 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free PT0-002 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this PT0-002 question test?

Tools and Code Analysis — This question tests Tools and Code Analysis — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: The script requires administrative credentials — The Nmap SMB enumeration scripts (e.g., smb-enum-shares.nse) by default attempt to connect as a guest or anonymous user. On modern Windows servers, especially those with default security configurations, anonymous access to SMB shares is disabled. The script requires valid administrative credentials to list all shares, as the SMB protocol restricts share enumeration to authenticated users with appropriate privileges.

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: "most likely". Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.

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 →

How Courseiva writes practice questions · Editorial policy

Keep practising

More PT0-002 practice questions

Last reviewed: Jun 11, 2026

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.

Loading comments…

Sign in to join the discussion.

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.