Key details for this exam, checked against the published exam outline
Each question shows the correct answer and an explanation of why it is right
A penetration tester executes multiple enumeration commands to find a path to escalate privileges. Given the following command:
find / -user root -perm -4000 -exec ls -ldb {} \; 2>/dev/null
Which of the following is the penetration tester attempting to enumerate?
The command find / -user root -perm -4000 -exec ls -ldb {} \; 2>/dev/null is used to find files with the SUID bit set. SUID (Set User ID) permissions allow a file to be executed with the permissions of the file owner (root), rather than the permissions of the user running the file.
Understanding the Command:
find /: Search the entire filesystem.
-user root: Limit the search to files owned by the root user.
-perm -4000: Look for files with the SUID bit set.
-exec ls -ldb {} \;: Execute ls -ldb on each found file to list it in detail.
2>/dev/null: Redirect error messages to /dev/null to avoid cluttering the output.
Purpose:
Enumerating SUID Files: The command is used to identify files with elevated privileges that might be exploited for privilege escalation.
Security Risks: SUID files can pose security risks if they are vulnerable, as they can be used to execute code with root privileges.
Why Enumerate Permissions:
Identifying SUID files is a crucial step in privilege escalation as it reveals potential attack vectors that can be exploited to gain root access.
Reference from Pentesting Literature:
Enumeration of SUID files is a common practice in penetration testing, as discussed in various guides and write-ups.
HTB write-ups often detail how finding and exploiting SUID binaries can lead to root access on a target system.
Step-by-Step ExplanationReference:
Penetration Testing - A Hands-on Introduction to Hacking
HTB Official Writeups
During an assessment, a penetration tester gains access to one of the internal hosts. Given the following command:
schtasks /create /sc onlogon /tn "Windows Update" /tr "cmd.exe /c reverse_shell.exe"
Which of the following is the penetration tester trying to do with this code?
The command creates a scheduled task that executes a reverse shell payload at logon, ensuring persistence.
Option A (Enumerate tasks) : This command creates a task, not lists tasks (schtasks /query is used for enumeration).
Option B (Establish persistence) : Correct.
The attacker ensures a reverse shell opens every time a user logs in.
Option C (Deactivate Windows Update) : The task is named 'Windows Update' but does not disable updates.
Option D (Create a Windows Update binary) : This executes a reverse shell, not a system update.
Reference: CompTIA PenTest+ PT0-003 Official Guide -- Windows Persistence Techniques
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?
A kiosk escape involves breaking out of a restricted environment, such as a kiosk or a single application interface, to access the underlying operating system. Here's why option A is correct:
Kiosk Escape: This attack targets environments where user access is intentionally limited, such as a kiosk or a dedicated application. The goal is to break out of these restrictions and gain access to the full operating system.
Arbitrary Code Execution: This involves running unauthorized code on the system, but the scenario described is more about escaping a restricted environment.
Process Hollowing: This technique involves injecting code into a legitimate process, making it appear benign while executing malicious activities.
Library Injection: This involves injecting malicious code into a running process by loading a malicious library, which is not the focus in this scenario.
Reference from Pentest:
Forge HTB: Demonstrates techniques to escape restricted environments and gain broader access to the system.
Horizontall HTB: Shows methods to break out of limited access environments, aligning with the concept of kiosk escape.
Conclusion:
Option A, Kiosk escape, accurately describes the type of attack where a tester breaks out of a restricted environment to access the underlying operating system.
A penetration tester uses a Python script to scan web servers. The script loops through ports including 443, 80, and 8080, but constructs every request using http://. The script fails during execution. Which of the following should the tester do?
Port 443 normally provides HTTPS rather than unencrypted HTTP. A request constructed as http://host:443 can fail because the client initiates an unencrypted HTTP exchange while the service expects a TLS handshake.
The script should select the scheme according to the port, for example:
scheme = 'https' if port == '443' else 'http'
The nesting order of the loops is not the underlying problem. response.status_code can be printed directly. Changing GET to POST does not correct the protocol mismatch.
Reference status: PT0-003-aligned code-analysis concepts involving Python requests, URL construction, HTTP, HTTPS, ports, and error correction.
Which of the following is the most efficient way to infiltrate a file containing data that could be sensitive?
When considering efficiency and security for exfiltrating sensitive data, the chosen method must ensure data confidentiality and minimize the risk of detection. Here's an analysis of each option:
Use steganography and send the file over FTP (Option A):
Steganography hides data within other files, such as images. FTP is a protocol for transferring files.
Drawbacks: FTP is not secure as it transmits data in clear text, making it susceptible to interception. Steganography can add an extra layer of obfuscation, but the use of FTP makes this option insecure.
Compress the file and send it using TFTP (Option B):
TFTP is a simple file transfer protocol that lacks encryption.
Drawbacks: TFTP is inherently insecure because it does not support encryption, making it easy for attackers to intercept the data during transfer.
Split the file in tiny pieces and send it over dnscat (Option C):
dnscat is a tool for tunneling data over DNS.
Drawbacks: While effective at evading detection by using DNS, splitting the file and managing the reassembly adds complexity. Additionally, large data transfers over DNS can raise suspicion.
Encrypt and send the file over HTTPS (Answe r: D):
Encrypting the file ensures that its contents are protected during transfer. HTTPS provides a secure, encrypted channel for communication over the internet.
Advantages: HTTPS is widely used and trusted, making it less likely to raise suspicion. Encryption ensures the data remains confidential during transit.
The use of HTTPS for secure data transfer is a standard practice in cybersecurity, providing both encryption and integrity of the data being transmitted.
Conclusion: Encrypting the file and sending it over HTTPS is the most efficient and secure method for exfiltrating sensitive data, ensuring both confidentiality and reducing the risk of detection.
393 questions covering all exam domains, starting from $20
Exam domains verified against: Official CompTIA PT0-003 exam guide, last checked August 2026.
Covers planning and scoping penetration tests, communicating with clients, and selecting appropriate testing frameworks that align with legal and compliance requirements. You will need to understand how to structure engagement contracts and produce professional reports with actionable remediation recommendations.
Focuses on gathering intelligence about target systems through passive and active techniques, including DNS queries, network scanning, and service enumeration. You must be able to use industry tools effectively and adapt scripts to suit specific reconnaissance scenarios.
Sample question from this domain above: Q1
Requires you to conduct vulnerability scanning, interpret scan results, and understand physical security concepts that may affect penetration testing scope. Analysis of output from reconnaissance and scanning phases helps prioritize which vulnerabilities to target.
Sample question from this domain above: Q4
The largest domain, covering network attacks, authentication attacks, host-based attacks, web application attacks, cloud attacks, wireless attacks, social engineering, and specialized systems. This domain emphasizes hands-on exploitation using appropriate tools and includes scripting to automate attacks.
Sample question from this domain above: Q3
Involves maintaining access through persistence techniques, moving laterally across network segments, and understanding data staging and exfiltration methods. You must also know proper cleanup and restoration procedures to leave systems in their original state.
Common questions about the exam itself