Question 496 of 509
Attacks and ExploitshardMultiple ChoiceObjective-mapped

Quick Answer

The correct action is to modify the existing PowerShell script to include a reverse shell that connects back to the tester. This is the best approach because it leverages the legitimate lateral movement via GPO scheduled tasks already running on the network, using WinRM on port 5985, which is permitted through the firewall and uses stored domain admin credentials. By injecting a reverse shell into the trusted script, the tester avoids creating new connections or unusual traffic patterns that would trigger the SIEM or SOC alerts. On the CompTIA PenTest+ PT0-002 exam, this scenario tests your understanding of abusing existing administrative channels to move laterally while evading detection, a common trap being the temptation to open a new port or service. Remember the key principle: blend with the baseline—if WinRM is already flowing, ride that wave. Memory tip: "Scripted shell, no new bell" — modify, don’t create.

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 is engaged to assess a corporate network that uses a centralized logging server (SIEM) with a 24/7 SOC. The tester has gained initial access to a Windows workstation via a phishing email. The goal is to move laterally to a domain controller without triggering alerts. The internal network is segmented into VLANs: a user VLAN (192.168.1.0/24) and a server VLAN (10.0.0.0/24) with strict firewall rules allowing only specific ports (e.g., RDP from user VLAN to server VLAN is denied). The tester discovers that the workstation has a PowerShell script that runs every hour to check for drive space on all servers using WinRM (port 5985) with stored domain admin credentials. The script is scheduled via a domain GPO. Which of the following actions should the tester perform to achieve lateral movement to the domain controller with the lowest chance of detection?

Question 1hardmultiple choice
Open the full VLAN trunking answer →

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

Modify the existing PowerShell script to include a reverse shell that connects back to the tester

Option C is correct because modifying the existing PowerShell script to include a reverse shell allows the tester to execute code on the domain controller using WinRM (port 5985), which is already permitted by the firewall and part of a legitimate scheduled task. This approach leverages the stored domain admin credentials and the trusted script execution path, avoiding any new connections or anomalies that would trigger SOC alerts. The reverse shell blends into the normal WinRM traffic, making detection by the SIEM or SOC highly unlikely.

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.

  • Alter the firewall rules to allow direct access from the user VLAN to the server VLAN

    Why it's wrong here

    Modifying firewall rules requires elevated privileges and could trigger alerts.

  • Use a RDP client to connect directly to the domain controller from the workstation

    Why it's wrong here

    RDP from user VLAN to server VLAN is denied by firewall rules and would be blocked or logged.

  • Modify the existing PowerShell script to include a reverse shell that connects back to the tester

    Why this is correct

    This leverages existing trusted infrastructure and credentials, blending in with normal operations.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Perform a pass-the-hash attack from the workstation to the domain controller using SMB

    Why it's wrong here

    Pass-the-hash over SMB might be detected by the SOC as anomalous lateral movement.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates often choose pass-the-hash (Option D) because it is a well-known lateral movement technique, but they overlook the strict firewall rules and logging that would expose the SMB traffic, whereas modifying an existing trusted script (Option C) is stealthier and aligns with the scenario's constraints.

Detailed technical explanation

How to think about this question

WinRM (Windows Remote Management) operates over HTTP/HTTPS on ports 5985/5986 and uses Kerberos or NTLM authentication; when a PowerShell script is scheduled via GPO, it runs in the context of the SYSTEM account or a specified user, inheriting stored credentials. By injecting a reverse shell into the script, the tester can execute arbitrary commands on the target server without initiating a new network session, as the WinRM connection is already established and trusted. In real-world engagements, this technique is known as 'living off the land' and is favored because it mimics legitimate administrative activity, bypassing behavioral detection rules.

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

An employee at a financial services firm receives an email that appears to come from the IT helpdesk, asking them to reset their password via a link. The link leads to a convincing fake portal that harvests credentials. Security teams use phishing simulations and security-awareness training to reduce this attack vector. Questions like this test whether you can identify social engineering techniques and appropriate controls.

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: Modify the existing PowerShell script to include a reverse shell that connects back to the tester — Option C is correct because modifying the existing PowerShell script to include a reverse shell allows the tester to execute code on the domain controller using WinRM (port 5985), which is already permitted by the firewall and part of a legitimate scheduled task. This approach leverages the stored domain admin credentials and the trusted script execution path, avoiding any new connections or anomalies that would trigger SOC alerts. The reverse shell blends into the normal WinRM traffic, making detection by the SIEM or SOC highly unlikely.

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

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