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

PT0-002 CompTIA PenTest+ Certification Exam Questions and Answers

Questions 4

Appending string values onto another string is called:

Options:

A.

compilation

B.

connection

C.

concatenation

D.

conjunction

Buy Now
Questions 5

Which of the following BEST explains why a penetration tester cannot scan a server that was previously scanned successfully?

Options:

A.

The IP address is wrong.

B.

The server is unreachable.

C.

The IP address is on the blocklist.

D.

The IP address is on the allow list.

Buy Now
Questions 6

Which of the following factors would a penetration tester most likely consider when testing at a location?

Options:

A.

Determine if visas are required.

B.

Ensure all testers can access all sites.

C.

Verify the tools being used are legal for use at all sites.

D.

Establish the time of the day when a test can occur.

Buy Now
Questions 7

A penetration tester is trying to restrict searches on Google to a specific domain. Which of the following commands should the penetration tester consider?

Options:

A.

inurl:

B.

link:

C.

site:

D.

intitle:

Buy Now
Questions 8

A penetration tester was able to gather MD5 hashes from a server and crack the hashes easily with rainbow tables.

Which of the following should be included as a recommendation in the remediation report?

Options:

A.

Stronger algorithmic requirements

B.

Access controls on the server

C.

Encryption on the user passwords

D.

A patch management program

Buy Now
Questions 9

A CentOS computer was exploited during a penetration test. During initial reconnaissance, the penetration tester discovered that port 25 was open on an internal

Sendmail server. To remain stealthy, the tester ran the following command from the attack machine:

PT0-002 Question 9

Which of the following would be the BEST command to use for further progress into the targeted network?

Options:

A.

nc 10.10.1.2

B.

ssh 10.10.1.2

C.

nc 127.0.0.1 5555

D.

ssh 127.0.0.1 5555

Buy Now
Questions 10

Which of the following situations would MOST likely warrant revalidation of a previous security assessment?

Options:

A.

After detection of a breach

B.

After a merger or an acquisition

C.

When an organization updates its network firewall configurations

D.

When most of the vulnerabilities have been remediated

Buy Now
Questions 11

You are a penetration tester reviewing a client’s website through a web browser.

INSTRUCTIONS

Review all components of the website through the browser to determine if vulnerabilities are present.

Remediate ONLY the highest vulnerability from either the certificate, source, or cookies.

If at any time you would like to bring back the initial state of the simulation, please click the Reset All button.

PT0-002 Question 11

PT0-002 Question 11

PT0-002 Question 11

PT0-002 Question 11

PT0-002 Question 11

PT0-002 Question 11

PT0-002 Question 11

Options:

Buy Now
Questions 12

A penetration tester runs the following command:

l.comptia.local axfr comptia.local

which of the following types of information would be provided?

Options:

A.

The DNSSEC certificate and CA

B.

The DHCP scopes and ranges used on the network

C.

The hostnames and IP addresses of internal systems

D.

The OS and version of the DNS server

Buy Now
Questions 13

A company uses a cloud provider with shared network bandwidth to host a web application on dedicated servers. The company's contact with the cloud provider prevents any activities that would interfere with the cloud provider's other customers. When engaging with a penetration-testing company to test the application, which of the following should the company avoid?

Options:

A.

Crawling the web application's URLs looking for vulnerabilities

B.

Fingerprinting all the IP addresses of the application's servers

C.

Brute forcing the application's passwords

D.

Sending many web requests per second to test DDoS protection

Buy Now
Questions 14

During an assessment, a penetration tester obtains a list of 30 email addresses by crawling the target company's website and then creates a list of possible usernames based on the email address format. Which of the following types of attacks would MOST likely be used to avoid account lockout?

Options:

A.

Mask

B.

Rainbow

C.

Dictionary

D.

Password spraying

Buy Now
Questions 15

A penetration tester created the following script to use in an engagement:

PT0-002 Question 15

However, the tester is receiving the following error when trying to run the script:

PT0-002 Question 15

Which of the following is the reason for the error?

Options:

A.

The sys variable was not defined.

B.

The argv variable was not defined.

C.

The sys module was not imported.

D.

The argv module was not imported.

Buy Now
Questions 16

A penetration tester found several critical SQL injection vulnerabilities during an assessment of a client's system. The tester would like to suggest mitigation to the client as soon as possible.

Which of the following remediation techniques would be the BEST to recommend? (Choose two.)

Options:

A.

Closing open services

B.

Encryption users' passwords

C.

Randomizing users' credentials

D.

Users' input validation

E.

Parameterized queries

F.

Output encoding

Buy Now
Questions 17

Which of the following documents is agreed upon by all parties associated with the penetration-testing engagement and defines the scope, contacts, costs, duration, and deliverables?

Options:

A.

SOW

B.

SLA

C.

MSA

D.

NDA

Buy Now
Questions 18

A penetration tester initiated the transfer of a large data set to verify a proof-of-concept attack as permitted by the ROE. The tester noticed the client's data included PII, which is out of scope, and immediately stopped the transfer. Which of the following MOST likely explains the penetration tester's decision?

Options:

A.

The tester had the situational awareness to stop the transfer.

B.

The tester found evidence of prior compromise within the data set.

C.

The tester completed the assigned part of the assessment workflow.

D.

The tester reached the end of the assessment time frame.

Buy Now
Questions 19

A tester who is performing a penetration test discovers an older firewall that is known to have serious vulnerabilities to remote attacks but is not part of the original list of IP addresses for the engagement. Which of the

following is the BEST option for the tester to take?

Options:

A.

Segment the firewall from the cloud.

B.

Scan the firewall for vulnerabilities.

C.

Notify the client about the firewall.

D.

Apply patches to the firewall.

Buy Now
Questions 20

A penetration tester is conducting an unknown environment test and gathering additional information that can be used for later stages of an assessment. Which of the following would most likely produce useful information for additional testing?

Options:

A.

Searching for code repositories associated with a developer who previously worked for the target company code repositories associated with the

B.

Searching for code repositories target company's organization

C.

Searching for code repositories associated with the target company's organization

D.

Searching for code repositories associated with a developer who previously worked for the target company

Buy Now
Questions 21

A penetration tester discovers during a recent test that an employee in the accounting department has been making changes to a payment system and redirecting money into a personal bank account. The penetration test was immediately stopped. Which of the following would be the BEST recommendation to prevent this type of activity in the future?

Options:

A.

Enforce mandatory employee vacations

B.

Implement multifactor authentication

C.

Install video surveillance equipment in the office

D.

Encrypt passwords for bank account information

Buy Now
Questions 22

A penetration tester downloaded the following Perl script that can be used to identify vulnerabilities in network switches. However, the script is not working properly.

Which of the following changes should the tester apply to make the script work as intended?

Options:

A.

Change line 2 to $ip= ג€10.192.168.254ג€;

B.

Remove lines 3, 5, and 6.

C.

Remove line 6.

D.

Move all the lines below line 7 to the top of the script.

Buy Now
Questions 23

Given the following code:

PT0-002 Question 23

Which of the following data structures is systems?

Options:

A.

A tuple

B.

A tree

C.

An array

D.

A dictionary

Buy Now
Questions 24

During a penetration test, a tester is in close proximity to a corporate mobile device belonging to a network administrator that is broadcasting Bluetooth frames.

Which of the following is an example of a Bluesnarfing attack that the penetration tester can perform?

Options:

A.

Sniff and then crack the WPS PIN on an associated WiFi device.

B.

Dump the user address book on the device.

C.

Break a connection between two Bluetooth devices.

D.

Transmit text messages to the device.

Buy Now
Questions 25

An organization wants to identify whether a less secure protocol is being utilized on a wireless network. Which of the following types of attacks will achieve this goal?

Options:

A.

Protocol negotiation

B.

Packet sniffing

C.

Four-way handshake

D.

Downgrade attack

Buy Now
Questions 26

A penetration tester wants to identify CVEs that can be leveraged to gain execution on a Linux server that has an SSHD running. Which of the following would BEST support this task?

Options:

A.

Run nmap with the –o, -p22, and –sC options set against the target

B.

Run nmap with the –sV and –p22 options set against the target

C.

Run nmap with the --script vulners option set against the target

D.

Run nmap with the –sA option set against the target

Buy Now
Questions 27

A penetration tester logs in as a user in the cloud environment of a company. Which of the following Pacu modules will enable the tester to determine the level of access of the existing user?

Options:

A.

iam_enum_permissions

B.

iam_privesc_scan

C.

iam_backdoor_assume_role

D.

iam_bruteforce_permissions

Buy Now
Questions 28

A penetration tester has established an on-path attack position and must now specially craft a DNS query response to be sent back to a target host. Which of the following utilities would BEST support this objective?

Options:

A.

Socat

B.

tcpdump

C.

Scapy

D.

dig

Buy Now
Questions 29

A company hired a penetration-testing team to review the cyber-physical systems in a manufacturing plant. The team immediately discovered the supervisory systems and PLCs are both connected to the company intranet. Which of the following assumptions, if made by the penetration-testing team, is MOST likely to be

valid?

Options:

A.

PLCs will not act upon commands injected over the network.

B.

Supervisors and controllers are on a separate virtual network by default.

C.

Controllers will not validate the origin of commands.

D.

Supervisory systems will detect a malicious injection of code/commands.

Buy Now
Questions 30

Which of the following should a penetration tester consider FIRST when engaging in a penetration test in a cloud environment?

Options:

A.

Whether the cloud service provider allows the penetration tester to test the environment

B.

Whether the specific cloud services are being used by the application

C.

The geographical location where the cloud services are running

D.

Whether the country where the cloud service is based has any impeding laws

Buy Now
Questions 31

Which of the following are the MOST important items to include in the final report for a penetration test? (Choose two.)

Options:

A.

The CVSS score of the finding

B.

The network location of the vulnerable device

C.

The vulnerability identifier

D.

The client acceptance form

E.

The name of the person who found the flaw

F.

The tool used to find the issue

Buy Now
Questions 32

An assessment has been completed, and all reports and evidence have been turned over to the client. Which of the following should be done NEXT to ensure the confidentiality of the client’s information?

Options:

A.

Follow the established data retention and destruction process

B.

Report any findings to regulatory oversight groups

C.

Publish the findings after the client reviews the report

D.

Encrypt and store any client information for future analysis

Buy Now
Questions 33

A penetration tester wrote the following script to be used in one engagement:

PT0-002 Question 33

Which of the following actions will this script perform?

Options:

A.

Look for open ports.

B.

Listen for a reverse shell.

C.

Attempt to flood open ports.

D.

Create an encrypted tunnel.

Buy Now
Questions 34

Which of the following should a penetration tester do NEXT after identifying that an application being tested has already been compromised with malware?

Options:

A.

Analyze the malware to see what it does.

B.

Collect the proper evidence and then remove the malware.

C.

Do a root-cause analysis to find out how the malware got in.

D.

Remove the malware immediately.

E.

Stop the assessment and inform the emergency contact.

Buy Now
Questions 35

A penetration tester has gained access to part of an internal network and wants to exploit on a different network segment. Using Scapy, the tester runs the following command:

PT0-002 Question 35

Which of the following represents what the penetration tester is attempting to accomplish?

Options:

A.

DNS cache poisoning

B.

MAC spoofing

C.

ARP poisoning

D.

Double-tagging attack

Buy Now
Questions 36

In an unprotected network file repository, a penetration tester discovers a text file containing usernames and passwords in cleartext and a spreadsheet containing data for 50 employees, including full names, roles, and serial numbers. The tester realizes some of the passwords in the text file follow the format: . Which of the following would be the best action for the tester to take NEXT with this information?

Options:

A.

Create a custom password dictionary as preparation for password spray testing.

B.

Recommend using a password manage/vault instead of text files to store passwords securely.

C.

Recommend configuring password complexity rules in all the systems and applications.

D.

Document the unprotected file repository as a finding in the penetration-testing report.

Buy Now
Questions 37

Which of the following documents describes specific activities, deliverables, and schedules for a penetration tester?

Options:

A.

NDA

B.

MSA

C.

SOW

D.

MOU

Buy Now
Questions 38

Which of the following describes the reason why a penetration tester would run the command sdelete mimikatz. * on a Windows server that the tester compromised?

Options:

A.

To remove hash-cracking registry entries

B.

To remove the tester-created Mimikatz account

C.

To remove tools from the server

D.

To remove a reverse shell from the system

Buy Now
Questions 39

A company becomes concerned when the security alarms are triggered during a penetration test. Which of the following should the company do NEXT?

Options:

A.

Halt the penetration test.

B.

Contact law enforcement.

C.

Deconflict with the penetration tester.

D.

Assume the alert is from the penetration test.

Buy Now
Questions 40

Which of the following protocols or technologies would provide in-transit confidentiality protection for emailing the final security assessment report?

Options:

A.

S/MIME

B.

FTPS

C.

DNSSEC

D.

AS2

Buy Now
Questions 41

A penetration tester conducts an Nmap scan against a target and receives the following results:

PT0-002 Question 41

Which of the following should the tester use to redirect the scanning tools using TCP port 1080 on the target?

Options:

A.

Nessus

B.

ProxyChains

C.

OWASPZAP

D.

Empire

Buy Now
Questions 42

A penetration tester wants to perform reconnaissance without being detected. Which of the following activities have a MINIMAL chance of detection? (Choose two.)

Options:

A.

Open-source research

B.

A ping sweep

C.

Traffic sniffing

D.

Port knocking

E.

A vulnerability scan

F.

An Nmap scan

Buy Now
Questions 43

A red-team tester has been contracted to emulate the threat posed by a malicious insider on a company’s network, with the constrained objective of gaining access to sensitive personnel files. During the assessment, the red-team tester identifies an artifact indicating possible prior compromise within the target environment.

Which of the following actions should the tester take?

Options:

A.

Perform forensic analysis to isolate the means of compromise and determine attribution.

B.

Incorporate the newly identified method of compromise into the red team’s approach.

C.

Create a detailed document of findings before continuing with the assessment.

D.

Halt the assessment and follow the reporting procedures as outlined in the contract.

Buy Now
Questions 44

A penetration tester writes the following script:

PT0-002 Question 44

Which of the following objectives is the tester attempting to achieve?

Options:

A.

Determine active hosts on the network.

B.

Set the TTL of ping packets for stealth.

C.

Fill the ARP table of the networked devices.

D.

Scan the system on the most used ports.

Buy Now
Questions 45

A penetration tester has been contracted to review wireless security. The tester has deployed a malicious wireless AP that mimics the configuration of the target enterprise WiFi. The penetration tester now wants to try to force nearby wireless stations to connect to the malicious AP. Which of the following steps should the tester take NEXT?

Options:

A.

Send deauthentication frames to the stations.

B.

Perform jamming on all 2.4GHz and 5GHz channels.

C.

Set the malicious AP to broadcast within dynamic frequency selection channels.

D.

Modify the malicious AP configuration to not use a pre-shared key.

Buy Now
Questions 46

A penetration tester is testing input validation on a search form that was discovered on a website. Which of the following characters is the BEST option to test the website for vulnerabilities?

Options:

A.

Comma

B.

Double dash

C.

Single quote

D.

Semicolon

Buy Now
Questions 47

A penetration tester has been hired to perform a physical penetration test to gain access to a secure room within a client’s building. Exterior reconnaissance identifies two entrances, a WiFi guest network, and multiple security cameras connected to the Internet.

Which of the following tools or techniques would BEST support additional reconnaissance?

Options:

A.

Wardriving

B.

Shodan

C.

Recon-ng

D.

Aircrack-ng

Buy Now
Questions 48

A penetration tester has been hired to configure and conduct authenticated scans of all the servers on a software company’s network. Which of the following accounts should the tester use to return the MOST results?

Options:

A.

Root user

B.

Local administrator

C.

Service

D.

Network administrator

Buy Now
Questions 49

A penetration tester ran the following commands on a Windows server:

PT0-002 Question 49

Which of the following should the tester do AFTER delivering the final report?

Options:

A.

Delete the scheduled batch job.

B.

Close the reverse shell connection.

C.

Downgrade the svsaccount permissions.

D.

Remove the tester-created credentials.

Buy Now
Questions 50

An Nmap scan shows open ports on web servers and databases. A penetration tester decides to run WPScan and SQLmap to identify vulnerabilities and additional information about those systems.

Which of the following is the penetration tester trying to accomplish?

Options:

A.

Uncover potential criminal activity based on the evidence gathered.

B.

Identify all the vulnerabilities in the environment.

C.

Limit invasiveness based on scope.

D.

Maintain confidentiality of the findings.

Buy Now
Questions 51

A penetration tester discovered a vulnerability that provides the ability to upload to a path via directory traversal. Some of the files that were discovered through this vulnerability are:

PT0-002 Question 51

Which of the following is the BEST method to help an attacker gain internal access to the affected machine?

Options:

A.

Edit the discovered file with one line of code for remote callback

B.

Download .pl files and look for usernames and passwords

C.

Edit the smb.conf file and upload it to the server

D.

Download the smb.conf file and look at configurations

Buy Now
Questions 52

A penetration tester conducted an assessment on a web server. The logs from this session show the following:

https://www.thecompanydomain.com/servicestatus.php?serviceID=892 &serviceID=892 ‘ ; DROP TABLE SERVICES; --

Which of the following attacks is being attempted?

Options:

A.

Clickjacking

B.

Session hijacking

C.

Parameter pollution

D.

Cookie hijacking

E.

Cross-site scripting

Buy Now
Questions 53

A penetration tester was conducting a penetration test and discovered the network traffic was no longer reaching the client’s IP address. The tester later discovered the SOC had used sinkholing on the penetration tester’s IP address. Which of the following BEST describes what happened?

Options:

A.

The penetration tester was testing the wrong assets

B.

The planning process failed to ensure all teams were notified

C.

The client was not ready for the assessment to start

D.

The penetration tester had incorrect contact information

Buy Now
Questions 54

A company obtained permission for a vulnerability scan from its cloud service provider and now wants to test the security of its hosted data.

Which of the following should the tester verify FIRST to assess this risk?

Options:

A.

Whether sensitive client data is publicly accessible

B.

Whether the connection between the cloud and the client is secure

C.

Whether the client's employees are trained properly to use the platform

D.

Whether the cloud applications were developed using a secure SDLC

Buy Now
Questions 55

A penetration tester is able to capture the NTLM challenge-response traffic between a client and a server.

Which of the following can be done with the pcap to gain access to the server?

Options:

A.

Perform vertical privilege escalation.

B.

Replay the captured traffic to the server to recreate the session.

C.

Use John the Ripper to crack the password.

D.

Utilize a pass-the-hash attack.

Buy Now
Questions 56

A penetration-testing team is conducting a physical penetration test to gain entry to a building. Which of the following is the reason why the penetration testers should carry copies of the engagement documents with them?

Options:

A.

As backup in case the original documents are lost

B.

To guide them through the building entrances

C.

To validate the billing information with the client

D.

As proof in case they are discovered

Buy Now
Questions 57

Which of the following types of information should be included when writing the remediation section of a penetration test report to be viewed by the systems administrator and technical staff?

Options:

A.

A quick description of the vulnerability and a high-level control to fix it

B.

Information regarding the business impact if compromised

C.

The executive summary and information regarding the testing company

D.

The rules of engagement from the assessment

Buy Now
Questions 58

A company hired a penetration tester to do a social-engineering test against its employees. Although the tester did not find any employees’ phone numbers on the company’s website, the tester has learned the complete phone catalog was published there a few months ago.

In which of the following places should the penetration tester look FIRST for the employees’ numbers?

Options:

A.

Web archive

B.

GitHub

C.

File metadata

D.

Underground forums

Buy Now
Questions 59

A penetration tester has been given an assignment to attack a series of targets in the 192.168.1.0/24 range, triggering as few alarms and countermeasures as possible.

Which of the following Nmap scan syntaxes would BEST accomplish this objective?

Options:

A.

nmap -sT -vvv -O 192.168.1.2/24 -PO

B.

nmap -sV 192.168.1.2/24 -PO

C.

nmap -sA -v -O 192.168.1.2/24

D.

nmap -sS -O 192.168.1.2/24 -T1

Buy Now
Questions 60

Given the following code:

Which of the following are the BEST methods to prevent against this type of attack? (Choose two.)

Options:

A.

Web-application firewall

B.

Parameterized queries

C.

Output encoding

D.

Session tokens

E.

Input validation

F.

Base64 encoding

Buy Now
Questions 61

A penetration tester found the following valid URL while doing a manual assessment of a web application: https://www.example.com/product.php?id=123987.

Which of the following automated tools would be best to use NEXT to try to identify a vulnerability in this URL?

Options:

A.

SQLmap

B.

Nessus

C.

Nikto

D.

DirBuster

Buy Now
Questions 62

A penetration tester is conducting a test after hours and notices a critical system was taken down. Which of the following contacts should be notified first?

Options:

A.

Secondary

B.

Emergency

C.

Technical

D.

Primary

Buy Now
Questions 63

Which of the following documents would be the most helpful in determining who is at fault for a temporary outage that occurred during a penetration test?

Options:

A.

Non-disclosure agreement

B.

Business associate agreement

C.

Assessment scope and methodologies

D.

Executive summary

Buy Now
Questions 64

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?

Options:

A.

Client acceptance

B.

Data destruction process

C.

Attestation of findings

D.

Lessons learned

Buy Now
Questions 65

A penetration tester is conducting an assessment of an organization that has both a web and mobile application. While testing the user profile page, the penetration tester notices that additional data is returned in the API response, which is not displayed in the web user interface. Which of the following is the most effective technique to extract sensitive user data?

Options:

A.

Compare PI I from data leaks to publicly exposed user profiles.

B.

Target the user profile page with a denial-of-service attack.

C.

Target the user profile page with a reflected XSS attack.

D.

Compare the API response fields to GUI fields looking for PH.

Buy Now
Questions 66

A penetration testing firm performs an assessment every six months for the same customer. While performing network scanning for the latest assessment, the penetration tester observes that several of the target hosts appear to be residential connections associated with a major television and ISP in the area. Which of the following is the most likely reason for the observation?

Options:

A.

The penetration tester misconfigured the network scanner.

B.

The network scanning tooling is not functioning properly.

C.

The IP ranges changed ownership.

D.

The network scanning activity is being blocked by a firewall.

Buy Now
Questions 67

Which of the following is the most common vulnerability associated with loT devices that are directly connected to the internet?

Options:

A.

Unsupported operating systems

B.

Susceptibility to DDoS attacks

C.

Inability to network

D.

The existence of default passwords

Buy Now
Questions 68

A penetration tester was hired to test Wi-Fi equipment. Which of the following tools should be used to gather information about the wireless network?

Options:

A.

Kismet

B.

Burp Suite

C.

BeEF

D.

WHOIS

Buy Now
Questions 69

A penetration tester is performing reconnaissance for a web application assessment. Upon investigation, the tester reviews the robots.txt file for items of interest.

INSTRUCTIONS

Select the tool the penetration tester should use for further investigation.

Select the two entries in the robots.txt file that the penetration tester should recommend for removal.

PT0-002 Question 69

Options:

Buy Now
Questions 70

A potential reason for communicating with the client point of contact during a penetration test is to provide resolution if a testing component crashes a system or service and leaves them unavailable for both legitimate users and further testing. Which of the following best describes this concept?

Options:

A.

Retesting

B.

De-escalation

C.

Remediation

D.

Collision detection

Buy Now
Questions 71

A penetration tester is conducting an assessment for an e-commerce company and successfully copies the user database to the local machine. After a closer review, the penetration tester identifies several high-profile celebrities who have active user accounts with the online service. Which of the following is the most appropriate next step?

Options:

A.

Contact the high-profile celebrities.

B.

Delete the high-profile accounts.

C.

Immediately contact the client.

D.

Record the findings in the penetration test report.

Buy Now
Questions 72

A penetration tester is performing an assessment for an organization and must gather valid user credentials. Which of the following attacks would be best for the tester to use to achieve this objective?

Options:

A.

Wardriving

B.

Captive portal

C.

Deauthentication

D.

Impersonation

Buy Now
Questions 73

A security analyst is conducting an unknown environment test from 192.168.3.3. The analyst wants to limit observation of the penetration tester's activities and lower the probability of detection by intrusion protection and detection systems. Which of the following Nmap commands should the analyst use to achieve this objective?

Options:

A.

nmap -F 192.168.5.5

B.

nmap -datalength 2 192.168.5.5

C.

nmap -D 10.5.2.2 192.168.5.5

D.

nmap -scanflags SYNFIN 192.168.5.5

Buy Now
Questions 74

A penetration tester developed the following script to be used during an engagement:

#!/usr/bin/python

import socket, sys

ports = [21, 22, 23, 25, 80, 139, 443, 445, 3306, 3389]

if len(sys.argv) > 1:

target = socket.gethostbyname (sys. argv [0])

else:

print ("Few arguments.")

print ("Syntax: python {} ". format (sys. argv [0]))

sys.exit ()

try:

for port in ports:

s = socket. socket (socket. AF_INET, socket. SOCK_STREAM)

s.settimeout (2)

result = s.connect_ex ((target, port) )

if result == 0:

print ("Port {} is opened". format (port) )

except KeyboardInterrupt:

print ("\nExiting ... ")

sys.exit ()

However, when the penetration tester ran the script, the tester received the following message:

socket.gaierror: [Errno -2] Name or service not known

Which of the following changes should the penetration tester implement to fix the script?

Options:

A.

From:

target = socket.gethostbyname (sys. argv [0])

To:

target = socket.gethostbyname (sys.argv[1])

B.

From:

s = socket. socket (socket. AF_INET, socket. SOCK_STREAM)

To:

s = socket.socket (socket.AF_INET, socket. SOCK_DGRAM)

C.

From:

import socket, sys

To:

import socket

import sys

D.

From:

result = s.connect_ex ((target, port) )

To:

result = s.connect ( (target, port) )

Buy Now
Questions 75

A penetration tester runs the following command:

nmap -p- -A 10.0.1.10

Given the execution of this command, which of the following quantities of ports will Nmap scan?

Options:

A.

1,000

B.

1,024

C.

10,000

D.

65,535

Buy Now
Questions 76

As part of an active reconnaissance, a penetration tester intercepts and analyzes network traffic, including API requests and responses. Which of the following can be gained by capturing and examining the API traffic?

Options:

A.

Assessing the performance of the network's API communication

B.

Identifying the token/authentication detail

C.

Enumerating all users of the application

D.

Extracting confidential user data from the intercepted API responses

Buy Now
Questions 77

A penetration tester is working to enumerate the PLC devices on the 10.88.88.76/24 network. Which of the following commands should the tester use to achieve the objective in a way that minimizes the risk of affecting the PLCs?

Options:

A.

nmap —script=s7-info -p 102 10.88.88.76/24 -T3

B.

nmap —script=wsdd-discover -p 3702 -sUlO.88.88.76/24

C.

nmap --script=iax2-version -p 4569 -sU -V 10.88.88.76/24 -T2

D.

nmap --script=xll-access -p 6000-6009 10.88.88.76/24

Buy Now
Questions 78

A penetration tester is reviewing the security of a web application running in an laaS compute instance. Which of the following payloads should the tester send to get the running process credentials?

Options:

A.

file=https://192.168. 1. 78?+document.cookie

B.

file =.. / .. / .. /proc/self/environ

C.

file='%20or%2054365=54365 ;--

D.

file=https://169.254.169.254/latest/meta-data/

Buy Now
Questions 79

A security firm is discussing the results of a penetration test with a client. Based on the findings, the client wants to focus the remaining time on a critical network segment. Which of the following best describes the action taking place?

Options:

A.

Maximizing the likelihood of finding vulnerabilities

B.

Reprioritizing the goals/objectives

C.

Eliminating the potential for false positives

D.

Reducing the risk to the client environment

Buy Now
Questions 80

Which of the following best explains why communication is a vital phase of a penetration test?

Options:

A.

To discuss situational awareness

B.

To build rapport with the emergency contact

C.

To explain the data destruction process

D.

To ensure the likelihood of future assessments

Buy Now
Questions 81

A penetration tester has been provided with only the public domain name and must enumerate additional information for the public-facing assets.

INSTRUCTIONS

Select the appropriate answer(s), given the output from each section.

Output 1

PT0-002 Question 81

PT0-002 Question 81

PT0-002 Question 81

PT0-002 Question 81

PT0-002 Question 81

PT0-002 Question 81

Options:

Buy Now
Questions 82

During a vulnerability scan a penetration tester enters the following Nmap command against all of the non-Windows clients:

nmap -sX -T4 -p 21-25, 67, 80, 139, 8080 192.168.11.191

The penetration tester reviews the packet capture in Wireshark and notices that the target responds with an RST packet flag set for all of the targeted ports. Which of the following does this information most likely indicate?

Options:

A.

All of the ports in the target range are closed.

B.

Nmap needs more time to scan the ports in the target range.

C.

The ports in the target range cannot be scanned because they are common UDP ports.

D.

All of the ports in the target range are open.

Buy Now
Questions 83

A penetration tester is taking screen captures of hashes obtained from a domain controller. Which of the following best explains why the penetration tester should immediately obscure portions of the images before saving?

Options:

A.

To maintain confidentiality of data/information

B.

To avoid disclosure of how the hashes were obtained

C.

To make the hashes appear shorter and easier to crack

D.

To prevent analysis based on the type of hash

Buy Now
Questions 84

An external consulting firm is hired to perform a penetration test and must keep the confidentiality of the security vulnerabilities and the private data found in a customer's systems. Which of the following documents addresses this requirement?

Options:

A.

ROE

B.

NDA

C.

MOU

D.

SLA

Buy Now
Questions 85

Given the following user-supplied data:

www.comptia.com/info.php?id=1 AND 1=1

Which of the following attack techniques is the penetration tester likely implementing?

Options:

A.

Boolean-based SQL injection

B.

Time-based SQL injection

C.

Stored cross-site scripting

D.

Reflected cross-site scripting

Buy Now
Questions 86

In Java and C/C++, variable initialization is critical because:

Options:

A.

the unknown value, when used later, will cause unexpected behavior.

B.

the compiler will assign null to the variable, which will cause warnings and errors.

C.

the initial state of the variable creates a race condition.

D.

the variable will not have an object type assigned to it.

Buy Now
Questions 87

After performing a web penetration test, a security consultant is ranking the findings by criticality. Which of the following standards or methodologies would be best for the consultant to use for reference?

Options:

A.

OWASP

B.

MITRE ATT&CK

C.

PTES

D.

NIST

Buy Now
Questions 88

Given the following Nmap scan command:

[root@kali ~]# nmap 192.168.0 .* -- exclude 192.168.0.101

PT0-002 Question 88

Which of the following is the total number of servers that Nmap will attempt to scan?

Options:

A.

1

B.

101

C.

255

D.

256

Buy Now
Questions 89

Which of the following tools would be the best to use to intercept an HTTP response of an API, change its content, and forward it back to the origin mobile device?

Options:

A.

Drozer

B.

Burp Suite

C.

Android SDK Tools

D.

MobSF

Buy Now
Questions 90

A security engineer is trying to bypass a network IPS that isolates the source when the scan exceeds 100 packets per minute. The scope of the scan is to identify web servers in the 10.0.0.0/16 subnet.

Which of the following commands should the engineer use to achieve the objective in the least amount of time?

Options:

A.

nmap -T3 -p 80 10.0.0.0/16 -- max-hostgroup 100

B.

nmap -TO -p 80 10.0.0.0/16

C.

nmap -T4 -p 80 10.0.0.0/16 -- max-rate 60

D.

nmap -T5 -p 80 10.0.0.0/16 -- min-rate 80

Buy Now
Questions 91

A penetration tester is conducting an assessment on 192.168.1.112. Given the following output:

[ATTEMPT] target 192.168.1.112 - login "root" - pass "abcde"

[ATTEMPT] target 192.168.1.112 - login "root" - pass "edcfg"

[ATTEMPT] target 192.168.1.112 - login "root" - pass "qazsw"

[ATTEMPT] target 192.168.1.112 - login "root" – pass “tyuio”

Which of the following is the penetration tester conducting?

Options:

A.

Port scan

B.

Brute force

C.

Credential stuffing

D.

DoS attack

Buy Now
Questions 92

During a security assessment, a penetration tester decides to write the following Python script: import requests

x= ['OPTIONS', 'TRACE', 'TEST'l

for y in x;

z - requests.request(y, 'https://server.net ')

print(y, z.status_code, z.reason)

Which of the following is the penetration tester trying to accomplish? (Select two).

Options:

A.

Web server denial of service

B.

HTTP methods availability

C.

'Web application firewall detection

D.

'Web server fingerprinting

E.

Web server error handling

F.

Web server banner grabbing

Buy Now
Questions 93

A penetration tester is preparing a credential stuffing attack against a company's website. Which of the following can be used to passively get the most relevant information?

Options:

A.

Shodan

B.

BeEF

C.

HavelBeenPwned

D.

Maltego

Buy Now
Questions 94

The following PowerShell snippet was extracted from a log of an attacker machine:

PT0-002 Question 94

A penetration tester would like to identify the presence of an array. Which of the following line numbers would define the array?

Options:

A.

Line 8

B.

Line 13

C.

Line 19

D.

Line 20

Buy Now
Questions 95

During a test of a custom-built web application, a penetration tester identifies several vulnerabilities. Which of the following would be the most interested in the steps to reproduce these vulnerabilities?

Options:

A.

Operations staff

B.

Developers

C.

Third-party stakeholders

D.

C-suite executives

Buy Now
Questions 96

A penetration tester requested, without express authorization, that a CVE number be assigned for a new vulnerability found on an internal client application. Which of the following did the penetration tester most likely breach?

Options:

A.

ROE

B.

SLA

C.

NDA

D.

SOW

Buy Now
Questions 97

A penetration tester captures SMB network traffic and discovers that users are mistyping the name of a fileshare server. This causes the workstations to send out requests attempting to resolve the fileshare server's name. Which of the following is the best way for a penetration tester to exploit this situation?

Options:

A.

Relay the traffic to the real file server and steal documents as they pass through.

B.

Host a malicious file to compromise the workstation.

C.

Reply to the broadcasts with a fake IP address to deny access to the real file server.

D.

Respond to the requests with the tester's IP address and steal authentication credentials.

Buy Now
Questions 98

A penetration tester issues the following command after obtaining a low-privilege reverse shell: wmic service get name,pathname,startmode

Which of the following is the most likely reason the penetration tester ran this command?

Options:

A.

To search for passwords in the service directory

B.

To list scheduled tasks that may be exploitable

C.

To register a service to run as System

D.

To find services that have unquoted service paths

Buy Now
Questions 99

Which of the following tools provides Python classes for interacting with network protocols?

Options:

A.

Responder

B.

Impacket

C.

Empire

D.

PowerSploit

Buy Now
Questions 100

Which of the following tools would help a penetration tester locate a file that was uploaded to a content management system?

Options:

A.

DirBuster

B.

Open VAS

C.

Scout Suite

D.

CeWL

Buy Now
Questions 101

A security analyst is conducting an unknown environment test from 192.168 3.3. The analyst wants to limit observation of the penetration tester's activities and lower the probability of detection by intrusion protection and detection systems. Which of the following Nmap commands should the analyst use to achieve This objective?

Options:

A.

Nmap –F 192.168.5.5

B.

Map –datalength 2.192.168.5.5

C.

Nmap –D 10.5.2.2.168.5.5

D.

Map –scanflags SYNFIN 192.168.5.5

Buy Now
Questions 102

A penetration tester executes the following Nmap command and obtains the following output:

PT0-002 Question 102

Which of the following commands would best help the penetration tester discover an exploitable service?

A)

PT0-002 Question 102

B)

PT0-002 Question 102

C)

PT0-002 Question 102

D)

PT0-002 Question 102

Options:

A.

nmap -v -p 25 -- soript smtp-enum-users remotehost

B.

nmap -v -- script=mysql-info.nse remotehost

C.

nmap --ocript=omb-brute.noe remotehoat

D.

nmap -p 3306 -- script "http*vuln*" remotehost

Buy Now
Questions 103

A penetration tester learned that when users request password resets, help desk analysts change users' passwords to 123change. The penetration tester decides to brute force an internet-facing webmail to check which users are still using the temporary password. The tester configures the brute-force tool to test usernames found on a text file and the... Which of the following techniques is the penetration tester using?

Options:

A.

Password brute force attack

B.

SQL injection

C.

Password spraying

D.

Kerberoasting

Buy Now
Questions 104

A penetration tester captured the following traffic during a web-application test:

PT0-002 Question 104

Which of the following methods should the tester use to visualize the authorization information being transmitted?

Options:

A.

Decode the authorization header using UTF-8.

B.

Decrypt the authorization header using bcrypt.

C.

Decode the authorization header using Base64.

D.

Decrypt the authorization header using AES.

Buy Now
Questions 105

Which of the following is the BEST resource for obtaining payloads against specific network infrastructure products?

Options:

A.

Exploit-DB

B.

Metasploit

C.

Shodan

D.

Retina

Buy Now
Questions 106

A penetration tester is conducting a penetration test. The tester obtains a root-level shell on a Linux server and discovers the following data in a file named password.txt in the /home/svsacct directory:

U3VQZXIkM2NyZXQhCg==

Which of the following commands should the tester use NEXT to decode the contents of the file?

Options:

A.

echo U3VQZXIkM2NyZXQhCg== | base64 ג€"d

B.

tar zxvf password.txt

C.

hydra ג€"l svsacct ג€"p U3VQZXIkM2NyZXQhCg== ssh://192.168.1.0/24

D.

john --wordlist /usr/share/seclists/rockyou.txt password.txt

Buy Now
Questions 107

During the reconnaissance phase, a penetration tester obtains the following output:

Reply from 192.168.1.23: bytes=32 time<54ms TTL=128

Reply from 192.168.1.23: bytes=32 time<53ms TTL=128

Reply from 192.168.1.23: bytes=32 time<60ms TTL=128

Reply from 192.168.1.23: bytes=32 time<51ms TTL=128

Which of the following operating systems is MOST likely installed on the host?

Options:

A.

Linux

B.

NetBSD

C.

Windows

D.

macOS

Buy Now
Questions 108

A penetration tester who is working remotely is conducting a penetration test using a wireless connection. Which of the following is the BEST way to provide confidentiality for the client while using this connection?

Options:

A.

Configure wireless access to use a AAA server.

B.

Use random MAC addresses on the penetration testing distribution.

C.

Install a host-based firewall on the penetration testing distribution.

D.

Connect to the penetration testing company's VPS using a VPN.

Buy Now
Questions 109

A company recently moved its software development architecture from VMs to containers. The company has asked a penetration tester to determine if the new containers are configured correctly against a DDoS attack. Which of the following should a tester perform first?

Options:

A.

Test the strength of the encryption settings.

B.

Determine if security tokens are easily available.

C.

Perform a vulnerability check against the hypervisor.

D.

.Scan the containers for open ports.

Buy Now
Questions 110

During an assessment, a penetration tester inspected a log and found a series of thousands of requests coming from a single IP address to the same URL. A few of the requests are listed below.

PT0-002 Question 110

Which of the following vulnerabilities was the attacker trying to exploit?

Options:

A.

..Session hijacking

B.

..URL manipulation

C.

..SQL injection

D.

..Insecure direct object reference

Buy Now
Questions 111

A penetration-testing team needs to test the security of electronic records in a company's office. Per the terms of engagement, the penetration test is to be conducted after hours and should not include circumventing the alarm or performing destructive entry. During outside reconnaissance, the team sees an open door from an adjoining building. Which of the following would be allowed under the terms of the engagement?

Options:

A.

Prying the lock open on the records room

B.

Climbing in an open window of the adjoining building

C.

Presenting a false employee ID to the night guard

D.

Obstructing the motion sensors in the hallway of the records room

Buy Now
Questions 112

A penetration tester uncovers access keys within an organization's source code management solution. Which of the following would BEST address the issue? (Choose two.)

Options:

A.

Setting up a secret management solution for all items in the source code management system

B.

Implementing role-based access control on the source code management system

C.

Configuring multifactor authentication on the source code management system

D.

Leveraging a solution to scan for other similar instances in the source code management system

E.

Developing a secure software development life cycle process for committing code to the source code management system

F.

Creating a trigger that will prevent developers from including passwords in the source code management system

Buy Now
Questions 113

During an assessment, a penetration tester found a suspicious script that could indicate a prior compromise. While reading the script, the penetration tester noticed the following lines of code:

PT0-002 Question 113

Which of the following was the script author trying to do?

Options:

A.

Spawn a local shell.

B.

Disable NIC.

C.

List processes.

D.

Change the MAC address

Buy Now
Questions 114

A penetration tester is testing a new version of a mobile application in a sandbox environment. To intercept and decrypt the traffic between the application and the external API, the tester has created a private root CA and issued a certificate from it. Even though the tester installed the root CA into the trusted stone of the smartphone used for the tests, the application shows an error indicating a certificate mismatch and does not connect to the server. Which of the following is the MOST likely reason for the error?

Options:

A.

TCP port 443 is not open on the firewall

B.

The API server is using SSL instead of TLS

C.

The tester is using an outdated version of the application

D.

The application has the API certificate pinned.

Buy Now
Questions 115

The provision that defines the level of responsibility between the penetration tester and the client for preventing unauthorized disclosure is found in the:

Options:

A.

NDA

B.

SLA

C.

MSA

D.

SOW

Buy Now
Questions 116

Which of the following types of assessments MOST likely focuses on vulnerabilities with the objective to access specific data?

Options:

A.

An unknown-environment assessment

B.

A known-environment assessment

C.

A red-team assessment

D.

A compliance-based assessment

Buy Now
Questions 117

A penetration tester gains access to a web server and notices a large number of devices in the system ARP table. Upon scanning the web server, the tester determines that many of the devices are user ...ch of the following should be included in the recommendations for remediation?

Options:

A.

training program on proper access to the web server

B.

patch-management program for the web server.

C.

the web server in a screened subnet

D.

Implement endpoint  protection on the workstations

Buy Now
Questions 118

An Nmap scan of a network switch reveals the following:

PT0-002 Question 118

Which of the following technical controls will most likely be the FIRST recommendation for this device?

Options:

A.

Encrypted passwords

B.

System-hardening techniques

C.

Multifactor authentication

D.

Network segmentation

Buy Now
Questions 119

A penetration tester downloaded a Java application file from a compromised web server and identifies how to invoke it by looking at the following log:

PT0-002 Question 119

Which of the following is the order of steps the penetration tester needs to follow to validate whether the Java application uses encryption over sockets?

Options:

A.

Run an application vulnerability scan and then identify the TCP ports used by the application.

B.

Run the application attached to a debugger and then review the application's log.

C.

Disassemble the binary code and then identify the break points.

D.

Start a packet capture with Wireshark and then run the application.

Buy Now
Questions 120

Which of the following is a regulatory compliance standard that focuses on user privacy by implementing the right to be forgotten?

Options:

A.

NIST SP 800-53

B.

ISO 27001

C.

GDPR

Buy Now
Exam Code: PT0-002
Exam Name: CompTIA PenTest+ Certification Exam
Last Update: May 19, 2024
Questions: 400

PDF + Testing Engine

$56  $159.99

Testing Engine

$42  $119.99
buy now PT0-002 testing engine

PDF (Q&A)

$35  $99.99
buy now PT0-002 pdf
dumpsmate guaranteed to pass
24/7 Customer Support

DumpsMate's team of experts is always available to respond your queries on exam preparation. Get professional answers on any topic of the certification syllabus. Our experts will thoroughly satisfy you.

Site Secure

mcafee secure

TESTED 20 May 2024