CompTIA PT0-003 CompTIA PenTest+ Exam Online Training
CompTIA PT0-003 Online Training
The questions for PT0-003 were last updated at Feb 21,2025.
- Exam Code: PT0-003
- Exam Name: CompTIA PenTest+ Exam
- Certification Provider: CompTIA
- Latest update: Feb 21,2025
A penetration tester needs to test a very large number of URLs for public access. Given the following code snippet:
1 import requests
2 import pathlib
3
4 for url in pathlib.Path("urls.txt").read_text().split("n"):
5 response = requests.get(url)
6 if response.status == 401:
7 print("URL accessible")
Which of the following changes is required?
- A . The condition on line 6
- B . The method on line 5
- C . The import on line 1
- D . The delimiter in line 3
As part of an engagement, a penetration tester wants to maintain access to a compromised system after rebooting.
Which of the following techniques would be best for the tester to use?
- A . Establishing a reverse shell
- B . Executing a process injection attack
- C . Creating a scheduled task
- D . Performing a credential-dumping attack
In a file stored in an unprotected source code repository, a penetration tester discovers the following line of code:
sshpass -p donotchange ssh [email protected]
Which of the following should the tester attempt to do next to take advantage of this information? (Select two).
- A . Use Nmap to identify all the SSH systems active on the network.
- B . Take a screen capture of the source code repository for documentation purposes.
- C . Investigate to find whether other files containing embedded passwords are in the code repository.
- D . Confirm whether the server 192.168.6.14 is up by sending ICMP probes.
- E . Run a password-spraying attack with Hydra against all the SSH servers.
- F . Use an external exploit through Metasploit to compromise host 192.168.6.14.
During a security assessment for an internal corporate network, a penetration tester wants to gain unauthorized access to internal resources by executing an attack that uses software to disguise itself as legitimate software.
Which of the following host-based attacks should the tester use?
- A . On-path
- B . Logic bomb
- C . Rootkit
- D . Buffer overflow
A penetration tester assesses a complex web application and wants to explore potential security weaknesses by searching for subdomains that might have existed in the past.
Which of the following tools should the penetration tester use?
- A . Censys.io
- B . Shodan
- C . Wayback Machine
- D . SpiderFoot
During the reconnaissance phase, a penetration tester collected the following information from the DNS records:
A—–> www
A—–> host
TXT –> vpn.comptia.org
SPF—> ip =2.2.2.2
Which of the following DNS records should be in place to avoid phishing attacks using spoofing domain techniques?
- A . MX
- B . SOA
- C . DMARC
- D . CNAME
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?
- A . Apply UTF-8 to the data and send over a tunnel to TCP port 25.
- B . Apply Base64 to the data and send over a tunnel to TCP port 80.
- C . Apply 3DES to the data and send over a tunnel UDP port 53.
- D . Apply AES-256 to the data and send over a tunnel to TCP port 443.
A penetration tester gains access to a domain server and wants to enumerate the systems within the domain.
Which of the following tools would provide the best oversight of domains?
- A . Netcat
- B . Wireshark
- C . Nmap
- D . Responder
A penetration tester plans to conduct reconnaissance during an engagement using readily available resources.
Which of the following resources would most likely identify hardware and software being utilized by the client?
- A . Cryptographic flaws
- B . Protocol scanning
- C . Cached pages
- D . Job boards
During an assessment, a penetration tester manages to get RDP access via a low-privilege user.
The tester attempts to escalate privileges by running the following commands: Import-Module .PrintNightmare.ps1
Invoke-Nightmare -NewUser "hacker" -NewPassword "Password123!" -DriverName "Print"
The tester attempts to further enumerate the host with the new administrative privileges by using the runas command. However, the access level is still low.
Which of the following actions should the penetration tester take next?
- A . Log off and log on with "hacker".
- B . Attempt to add another user.
- C . Bypass the execution policy.
- D . Add a malicious printer driver.