Question 418 of 509
Attacks and ExploitsmediumMultiple ChoiceObjective-mapped

Quick Answer

The answer is Impacket’s wmiexec.py, the tool designed for pass-the-hash attacks to achieve remote code execution. This tool directly supports pass-the-hash authentication by accepting an NTLM hash via the `-hashes` flag, then leveraging Windows Management Instrumentation (WMI) to establish a remote session without needing the plaintext password. On the CompTIA PenTest+ PT0-002 exam, this scenario tests your understanding of lateral movement techniques—specifically how to use a captured local administrator hash to authenticate to another domain-joined system. A common trap is choosing tools like PsExec or Mimikatz for remote execution, but wmiexec.py is the correct choice because it natively integrates hash-based authentication over WMI, avoiding the need for service creation or interactive logon. Memory tip: think “WMI + hash = wmiexec” to recall that WMI’s remote management capability pairs directly with NTLM hashes for stealthy lateral movement.

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.

A penetration tester has obtained the NTLM hash of a local administrator account on a Windows domain-joined system. The tester wants to use this hash to authenticate to another system on the network and execute commands remotely. Which tool is commonly used for pass-the-hash attacks to achieve remote code execution?

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

Impacket's wmiexec.py

Impacket's wmiexec.py is the correct tool because it directly supports pass-the-hash (PtH) authentication using NTLM hashes over Windows Management Instrumentation (WMI). It accepts an NTLM hash via the `-hashes` flag and establishes a remote WMI session, enabling command execution without needing the plaintext password. This makes it ideal for lateral movement in a domain environment where a local administrator hash has been captured.

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.

  • Hydra

    Why it's wrong here

    Hydra is a brute-force tool for online password guessing, not pass-the-hash.

  • Impacket's wmiexec.py

    Why this is correct

    wmiexec.py authenticates via WMI using an NTLM hash, enabling remote command execution.

    Related concept

    Read the scenario before looking for a memorised answer.

  • PsExec

    Why it's wrong here

    PsExec can be used for remote execution but requires extra steps to pass the hash (e.g., using sekurlsa::pth).

  • Sqlmap

    Why it's wrong here

    Sqlmap is used for exploiting SQL injection vulnerabilities, not for pass-the-hash attacks.

Common exam traps

Common exam trap: answer the scenario, not the keyword

CompTIA often tests the distinction between tools that require plaintext credentials versus those that can operate directly with NTLM hashes, leading candidates to mistakenly choose PsExec because it is a well-known remote execution tool, even though it does not natively support pass-the-hash without additional credential injection steps.

Detailed technical explanation

How to think about this question

Pass-the-hash works by leveraging the NTLM challenge-response protocol: the attacker supplies the captured NTLM hash as the response to the server's challenge, bypassing the need for the plaintext password. Impacket's wmiexec.py implements this by using the DCOM protocol to instantiate a WMI object on the remote system, then executing commands via the `Win32_Process` class. A subtle behavior is that this method works even if the remote system has UAC remote restrictions enabled, as long as the target account is a local administrator and the registry key `LocalAccountTokenFilterPolicy` is set to 1.

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?

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: Impacket's wmiexec.py — Impacket's wmiexec.py is the correct tool because it directly supports pass-the-hash (PtH) authentication using NTLM hashes over Windows Management Instrumentation (WMI). It accepts an NTLM hash via the `-hashes` flag and establishes a remote WMI session, enabling command execution without needing the plaintext password. This makes it ideal for lateral movement in a domain environment where a local administrator hash has been captured.

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.

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

Same concept, more angles

1 more ways this is tested on PT0-002

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. A penetration tester is attempting a pass-the-hash (PtH) attack against a Windows domain-joined machine. The tester has obtained the NTLM hash of a local administrator account. Which tool can be used directly to authenticate using the hash to gain remote command execution?

medium
  • A.John the Ripper
  • B.Metasploit's psexec module
  • C.Mimikatz
  • D.Nmap

Why B: Metasploit's psexec module (exploit/windows/smb/psexec) directly accepts an NTLM hash via the 'SMBPass' option and uses it to authenticate over SMB, then creates a service on the target to execute commands. This is a classic pass-the-hash technique against Windows systems, as the module leverages the SMB protocol and Windows service control manager without needing the plaintext password.

Last reviewed: Jun 30, 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.