Black Friday Special Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: 70special

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

Page: 1 / 43
Total 433 questions

CompTIA PenTest+ Certification Exam Questions and Answers

Testing Engine

  • Product Type: Testing Engine
$37.5  $124.99

PDF Study Guide

  • Product Type: PDF Study Guide
$33  $109.99
Question 1

A consultant just performed a SYN scan of all the open ports on a remote host and now needs to remotely identify the type of services that are running on the host. Which of the following is an active reconnaissance tool that would be BEST to use to accomplish this task?

Options:

A.

tcpdump

B.

Snort

C.

Nmap

D.

Netstat

E.

Fuzzer

Question 2

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 3

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 4

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 5

A penetration tester completed a vulnerability scan against a web server and identified a single but severe vulnerability.

Which of the following is the BEST way to ensure this is a true positive?

Options:

A.

Run another scanner to compare.

B.

Perform a manual test on the server.

C.

Check the results on the scanner.

D.

Look for the vulnerability online.

Question 6

A penetration tester recently performed a social-engineering attack in which the tester found an employee of the target company at a local coffee shop and over time built a relationship with the employee. On the employee’s birthday, the tester gave the employee an external hard drive as a gift. Which of the following social-engineering attacks was the tester utilizing?

Options:

A.

Phishing

B.

Tailgating

C.

Baiting

D.

Shoulder surfing

Question 7

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 8

A penetration tester who is doing a company-requested assessment would like to send traffic to another system using double tagging. Which of the following techniques would BEST accomplish this goal?

Options:

A.

RFID cloning

B.

RFID tagging

C.

Meta tagging

D.

Tag nesting

Question 9

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 10

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 11

A company’s Chief Executive Officer has created a secondary home office and is concerned that the WiFi service being used is vulnerable to an attack. A penetration tester is hired to test the security of the WiFi’s router.

Which of the following is MOST vulnerable to a brute-force attack?

Options:

A.

WPS

B.

WPA2-EAP

C.

WPA-TKIP

D.

WPA2-PSK

Question 12

A penetration tester is looking for a vulnerability that enables attackers to open doors via a specialized TCP service that is used for a physical access control system. The service exists on more than 100 different hosts, so the tester would like to automate the assessment. Identification requires the penetration tester to:

    Have a full TCP connection

    Send a “hello” payload

    Walt for a response

    Send a string of characters longer than 16 bytes

Which of the following approaches would BEST support the objective?

Options:

A.

Run nmap –Pn –sV –script vuln .

B.

Employ an OpenVAS simple scan against the TCP port of the host.

C.

Create a script in the Lua language and use it with NSE.

D.

Perform a credentialed scan with Nessus.

Question 13

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 14

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 15

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

Options:

A.

S/MIME

B.

FTPS

C.

DNSSEC

D.

AS2

Question 16

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 17

A penetration tester is starting an assessment but only has publicly available information about the target company. The client is aware of this exercise and is preparing for the test.

Which of the following describes the scope of the assessment?

Options:

A.

Partially known environment testing

B.

Known environment testing

C.

Unknown environment testing

D.

Physical environment testing

Question 18

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

INSTRUCTIONS

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

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

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

Options:

Question 19

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 20

A company is concerned that its cloud service provider is not adequately protecting the VMs housing its software development. The VMs are housed in a datacenter with other companies sharing physical resources. Which of the following attack types is MOST concerning to the company?

Options:

A.

Data flooding

B.

Session riding

C.

Cybersquatting

D.

Side channel

Question 21

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 22

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 23

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 24

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 25

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 26

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 27

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 28

A Chief Information Security Officer wants a penetration tester to evaluate the security awareness level of the company’s employees.

Which of the following tools can help the tester achieve this goal?

Options:

A.

Metasploit

B.

Hydra

C.

SET

D.

WPScan

Question 29

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 30

A penetration tester is scanning a corporate lab network for potentially vulnerable services. Which of the following Nmap commands will return vulnerable ports that might be interesting to a potential attacker?

Options:

A.

nmap192.168.1.1-5–PU22-25,80

B.

nmap192.168.1.1-5–PA22-25,80

C.

nmap192.168.1.1-5–PS22-25,80

D.

nmap192.168.1.1-5–Ss22-25,80

Question 31

A client wants a security assessment company to perform a penetration test against its hot site. The purpose of the test is to determine the effectiveness of the defenses that protect against disruptions to business continuity. Which of the following is the MOST important action to take before starting this type of assessment?

Options:

A.

Ensure the client has signed the SOW.

B.

Verify the client has granted network access to the hot site.

C.

Determine if the failover environment relies on resources not owned by the client.

D.

Establish communication and escalation procedures with the client.

Question 32

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 33

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 34

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 35

A penetration tester gains access to a system and establishes persistence, and then runs the following commands:

cat /dev/null > temp

touch –r .bash_history temp

mv temp .bash_history

Which of the following actions is the tester MOST likely performing?

Options:

A.

Redirecting Bash history to /dev/null

B.

Making a copy of the user's Bash history for further enumeration

C.

Covering tracks by clearing the Bash history

D.

Making decoy files on the system to confuse incident responders

Question 36

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

INSTRUCTIONS

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

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

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

Options:

Question 37

Performing a penetration test against an environment with SCADA devices brings additional safety risk because the:

Options:

A.

devices produce more heat and consume more power.

B.

devices are obsolete and are no longer available for replacement.

C.

protocols are more difficult to understand.

D.

devices may cause physical world effects.

Question 38

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 39

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 40

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 41

A penetration tester runs a scan against a server and obtains the following output:

21/tcp open ftp Microsoft ftpd

| ftp-anon: Anonymous FTP login allowed (FTP code 230)

| 03-12-20 09:23AM 331 index.aspx

| ftp-syst:

135/tcp open msrpc Microsoft Windows RPC

139/tcp open netbios-ssn Microsoft Windows netbios-ssn

445/tcp open microsoft-ds Microsoft Windows Server 2012 Std

3389/tcp open ssl/ms-wbt-server

| rdp-ntlm-info:

| Target Name: WEB3

| NetBIOS_Computer_Name: WEB3

| Product_Version: 6.3.9600

|_ System_Time: 2021-01-15T11:32:06+00:00

8443/tcp open http Microsoft IIS httpd 8.5

| http-methods:

|_ Potentially risky methods: TRACE

|_http-server-header: Microsoft-IIS/8.5

|_http-title: IIS Windows Server

Which of the following command sequences should the penetration tester try NEXT?

Options:

A.

ftp 192.168.53.23

B.

smbclient \\\\WEB3\\IPC$ -I 192.168.53.23 –U guest

C.

ncrack –u Administrator –P 15worst_passwords.txt –p rdp 192.168.53.23

D.

curl –X TRACE https://192.168.53.23:8443/index.aspx

E.

nmap –-script vuln –sV 192.168.53.23

Question 42

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 43

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

Options:

A.

Send deauthentication frames to the stations.

B.

Perform jamming on all 2.4GHz and 5GHz channels.

C.

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

D.

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

Question 44

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 45

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 46

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 47

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 48

A penetration tester is performing an assessment of an application that allows users to upload documents to a cloud-based file server for easy access anywhere in the world. Which of the following would most likely allow a tester to access unintentionally exposed documents?

Options:

A.

Directory traversal attack

B.

Cross-site request forgery

C.

Cross-site scripting attack

D.

Session attack

Question 49

Which of the following is a ROE component that provides a penetration tester with guidance on who and how to contact the necessary individuals in the event of a disaster during an engagement?

Options:

A.

Engagementscope

B.

Communication escalation path

C.

SLA

D.

SOW

Question 50

A penetration tester is performing an assessment for an application that is used by large organizations operating in the heavily regulated financial services industry. The penetration tester observes that the default Admin User account is enabled and appears to be used several times a day by unfamiliar IP addresses. Which of the following is the most appropriate way to remediate this issue?

Options:

A.

Increase password complexity.

B.

Implement system hardening.

C.

Restrict simultaneous user log-ins.

D.

Require local network access.

Question 51

During a penetration test of a server application, a security consultant found that the application randomly crashed or remained stable after opening several simultaneous connections to the application and always submitting the same packets of data. Which of the following is the best sequence of steps the tester should use to understand and exploit the vulnerability?

Options:

A.

Attacha remoteprofiler to the server application. Establish a random number of connections to the server application. Send fixed packets of data simultaneously using those connections.

B.

Attacha remotedebugger to the server application. Establish a large number of connections to the server application. Send fixed packets of data simultaneously using those connections.

C.

Attacha local disassembler to the server application. Establish a single connection to the server application. Send fixed packets of data simultaneously using that connection.

D.

Attacha remotedisassembler to the server application. Establish a small number of connections to the server application. Send fixed packets of data simultaneously using those connections.

Question 52

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 53

A penetration tester runs an Nmap scan and obtains the following output:

Starting Nmap 7.80 ( ) at 2023-02-12 18:53 GMT

Nmap scan report for 10.22.2.2

Host is up (0.0011s latency).

PORTSTATE SERVICEVERSION

135/tcpopen msrpcMicrosoft Windows RPC

139/tcpopen netbios-ssnMicrosoft Windows netbios-ssn

445/tcpopen microsoft-dsMicrosoft Windows Server 2019

1433/tcpopen ms-sql-sMicrosoft SQL Server 2019

3389/tcpopen ms-wbt-serverMicrosoft Terminal Services

8080/tcpopen httpMicrosoft IIS 9.0

Which of the following commands should the penetration tester try next to explore this server?

Options:

A.

nikto -host http://10.22.2-2

B.

hydra -1 administrator -P passwords.txt ftp://10.22.2.2

C.

nmap -p 3389 —script vnc-info.nse 10.22.2.2

D.

medusa -h 10.22.2.2 -n 1433 -u sa -P passwords.txt -M mssql

Question 54

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 55

During a REST API security assessment, a penetration tester was able to sniff JSON content containing user credentials. The JSON structure was as follows:

<

transaction_id: "1234S6", content: [ {

user_id: "mrcrowley", password: ["€54321#"] b <

user_id: "ozzy",

password: ["1112228"] ) ]

Assuming that the variable json contains the parsed JSON data, which of the following Python code snippets correctly returns the password for the user ozzy?

Options:

A.

json['content']['password'][1]

B.

json['user_id']['password'][0][1]

C.

json['content'][1]['password'][0]

D.

json['content'][0]['password'][1]

Question 56

Which of the following is the most secure way to protect a final report file when delivering the report to the client/customer?

Options:

A.

Creating a link on a cloud service and delivering it by email

B.

Asking for a PGP public key to encrypt the file

C.

Requiring FTPS security to download the file

D.

Copying the file on a USB drive and delivering it by postal mail

Question 57

A penetration tester wants to perform a SQL injection test. Which of the following characters should the tester use to start the SQL injection attempt?

Options:

A.

Colon

B.

Double quote mark

C.

Single quote mark

D.

Semicolon

Question 58

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 59

Penetration on an assessment for a client organization, a penetration tester notices numerous outdated software package versions were installed ...s-critical servers. Which of the following would best mitigate this issue?

Options:

A.

Implementation of patching and change control programs

B.

Revision of client scripts used to perform system updates

C.

Remedial training for the client's systems administrators

D.

Refrainment from patching systems until quality assurance approves

Question 60

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 61

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

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 62

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 63

A penetration tester managed to get control of an internal web server that is hosting the IT knowledge base. Which of the following attacks should the penetration tester attempt next?

Options:

A.

Vishing

B.

Watering hole

C.

Whaling

D.

Spear phishing

Question 64

A penetration tester wants to accomplish ARP poisoning as part of an attack. Which of the following tools will the tester most likely utilize?

Options:

A.

Wireshark

B.

Netcat

C.

Nmap

D.

Ettercap

Question 65

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

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

Options:

A.

To search for passwords in the service directory

B.

To list scheduled tasks that may be exploitable

C.

To register a service to run as System

D.

To find services that have unquoted service paths

Question 66

An organization is using Android mobile devices but does not use MDM services. Which of the following describes an existing risk present in this scenario?

Options:

A.

Device log facility does not record actions.

B.

End users have root access by default.

C.

Unsigned applications can be installed.

D.

Push notification services require internet.

Question 67

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

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

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

Options:

A.

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

B.

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

C.

Executing the command sudo vi -c ' Jbash'

D.

Editing the file/etc/sudoers to allow any command

Question 68

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 69

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 70

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 71

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 72

Which of the following describes how a penetration tester could prioritize findings in a report?

Options:

A.

Business mission and goals

B.

Cyberassets

C.

Network infrastructure

D.

Cyberthreats

Question 73

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 74

As part of active reconnaissance, penetration testers need to determine whether a protection mechanism is in place to safeguard the target’s website against web application attacks. Which of the following methods would be the most suitable?

Options:

A.

Direct-to-origin testing

B.

Antivirus scanning

C.

Scapy packet crafting

D.

WAF detection

Question 75

A penetration tester performs several Nmap scans against the web application for a client.

INSTRUCTIONS

Click on the WAF and servers to review the results of the Nmap scans. Then click on

each tab to select the appropriate vulnerability and remediation options.

If at any time you would like to bring back the initial state of the simulation, please

click the Reset All button.

Options:

Question 76

A penetration tester enters a command into the shell and receives the following output:

C:\Users\UserX\Desktop>vmic service get name, pathname, displayname, startmode | findstr /i auto | findstr /i /v |C:\\Windows\\" I findstr /i /v""

VulnerableService Some Vulnerable Service C:\Program Files\A Subfolder\B Subfolder\SomeExecutable.exe Automatic

Which of the following types of vulnerabilities does this system contain?

Options:

A.

Unquoted service path

B.

Writable services

C.

Clear text credentials

D.

Insecure file/folder permissions

Question 77

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 78

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

Options:

A.

CeWL

B.

John the Ripper

C.

Hashcat

D.

Hydra

Question 79

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 80

During an assessment, a penetration tester found an application with the default credentials enabled. Which of the following best describes the technical control required to fix this issue?

Options:

A.

Password encryption

B.

System hardening

C.

Multifactor authentication

D.

Patch management

Question 81

A penetration tester is trying to bypass an active response tool that blocks IP addresses that have more than 100 connections per minute. Which of the following commands would allow the tester to finish the test without being blocked?

Options:

A.

nmap -sU -p 1-1024 10.0.0.15

B.

nmap -p 22,25, 80, 3389 -T2 10.0.0.15 -Pn

C.

nmap -T5 -p 1-65535 -A 10.0.0.15

D.

nmap -T3 -F 10.0.0.15

Question 82

A penetration tester was able to gain access to a plaintext file on a user workstation. Upon opening the file, the tester notices some strings of randomly generated text. The tester is able to use these strings to move laterally throughout the network by accessing the fileshare on a web application. Which of the following should the organization do to remediate the issue?

Options:

A.

Sanitize user input.

B.

Implement password management solution.

C.

Rotate keys.

D.

Utilize certificate management.

Question 83

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 84

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

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

Which of the following objects or data structures is var ?

Options:

A.

An array

B.

A class

C.

A dictionary

D.

A list

Question 85

During an assessment, a penetration tester obtains a list of password digests using Responder. Which of the following tools would the penetration tester most likely use next?

Options:

A.

Hashcat

B.

Hydra

C.

CeWL

D.

Medusa

Question 86

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 87

During an assessment, a penetration tester gathered OSINT for one of the IT systems administrators from the target company and managed to obtain valuable information, including corporate email addresses. Which of the following techniques should the penetration tester perform NEXT?

Options:

A.

Badge cloning

B.

Watering-hole attack

C.

Impersonation

D.

Spear phishing

Question 88

The following output is from reconnaissance on a public-facing banking website:

Based on these results, which of the following attacks is MOST likely to succeed?

Options:

A.

A birthday attack on 64-bit ciphers (Sweet32)

B.

An attack that breaks RC4 encryption

C.

An attack on a session ticket extension (Ticketbleed)

D.

A Heartbleed attack

Question 89

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 90

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

Options:

A.

Determine if visas are required.

B.

Ensure all testers can access all sites.

C.

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

D.

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

Question 91

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

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

Options:

A.

Closing open services

B.

Encryption users' passwords

C.

Randomizing users' credentials

D.

Users' input validation

E.

Parameterized queries

F.

Output encoding

Question 92

A company requires that all hypervisors have the latest available patches installed. Which of the following would BEST explain the reason why this policy is in place?

Options:

A.

To provide protection against host OS vulnerabilities

B.

To reduce the probability of a VM escape attack

C.

To fix any misconfigurations of the hypervisor

D.

To enable all features of the hypervisor

Question 93

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 94

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 95

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 96

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 97

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

Options:

A.

Exploit-DB

B.

Metasploit

C.

Shodan

D.

Retina

Question 98

A penetration tester wrote the following comment in the final report: "Eighty-five percent of the systems tested were found to be prone to unauthorized access from the internet." Which of the following audiences was this message intended?

Options:

A.

Systems administrators

B.

C-suite executives

C.

Data privacy ombudsman

D.

Regulatory officials

Question 99

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

Options:

A.

The IP address is wrong.

B.

The server is unreachable.

C.

The IP address is on the blocklist.

D.

The IP address is on the allow list.

Question 100

An exploit developer is coding a script that submits a very large number of small requests to a web server until the server is compromised. The script must examine each response received and compare the data to a large number of strings to determine which data to submit next. Which of the following data structures should the exploit developer use to make the string comparison and determination as efficient as possible?

Options:

A.

A list

B.

A tree

C.

A dictionary

D.

An array

Question 101

A penetration tester was hired to perform a physical security assessment of an organization's office. After monitoring the environment for a few hours, the penetration tester notices that some employees go to lunch in a restaurant nearby and leave their belongings unattended on the table while getting food. Which of the following techniques would MOST likely be used to get legitimate access into the organization's building without raising too many alerts?

Options:

A.

Tailgating

B.

Dumpster diving

C.

Shoulder surfing

D.

Badge cloning

Question 102

After running the enum4linux.pl command, a penetration tester received the following output:

Which of the following commands should the penetration tester run NEXT?

Options:

A.

smbspool //192.160.100.56/print$

B.

net rpc share -S 192.168.100.56 -U ''

C.

smbget //192.168.100.56/web -U ''

D.

smbclient //192.168.100.56/web -U '' -N

Question 103

Penetration tester has discovered an unknown Linux 64-bit executable binary. Which of the following tools would be BEST to use to analyze this issue?

Options:

A.

Peach

B.

WinDbg

C.

GDB

D.

OllyDbg

Question 104

A penetration tester utilized Nmap to scan host 64.13.134.52 and received the following results:

Based on the output, which of the following services are MOST likely to be exploited? (Choose two.)

Options:

A.

Telnet

B.

HTTP

C.

SMTP

D.

DNS

E.

NTP

F.

SNMP

Question 105

A red team completed an engagement and provided the following example in the report to describe how the team gained access to a web server:

x’ OR role LIKE '%admin%

Which of the following should be recommended to remediate this vulnerability?

Options:

A.

Multifactor authentication

B.

Encrypted communications

C.

Secure software development life cycle

D.

Parameterized queries

Question 106

After gaining access to a Linux system with a non-privileged account, a penetration tester identifies the following file:

Which of the following actions should the tester perform FIRST?

Options:

A.

Change the file permissions.

B.

Use privilege escalation.

C.

Cover tracks.

D.

Start a reverse shell.

Question 107

A penetration tester was contracted to test a proprietary application for buffer overflow vulnerabilities. Which of the following tools would be BEST suited for this task?

Options:

A.

GDB

B.

Burp Suite

C.

SearchSpliot

D.

Netcat

Question 108

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 109

A company provided the following network scope for a penetration test:

169.137.1.0/24

221.10.1.0/24

149.14.1.0/24

A penetration tester discovered a remote command injection on IP address 149.14.1.24 and exploited the system. Later, the tester learned that this particular IP address belongs to a third party. Which of the following stakeholders is responsible for this mistake?

Options:

A.

The company that requested the penetration test

B.

The penetration testing company

C.

The target host's owner

D.

The penetration tester

E.

The subcontractor supporting the test

Question 110

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 111

SIMULATION

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

Options:

Question 112

Which of the following is a rules engine for managing public cloud accounts and resources?

Options:

A.

Cloud Custodian

B.

Cloud Brute

C.

Pacu

D.

Scout Suite

Question 113

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 114

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 115

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 116

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 117

A penetration tester opened a shell on a laptop at a client's office but is unable to pivot because of restrictive ACLs on the wireless subnet. The tester is also aware that all laptop users have a hard-wired connection available at their desks. Which of the following is the BEST method available to pivot and gain additional access to the network?

Options:

A.

Set up a captive portal with embedded malicious code.

B.

Capture handshakes from wireless clients to crack.

C.

Span deauthentication packets to the wireless clients.

D.

Set up another access point and perform an evil twin attack.

Question 118

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 119

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:

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 120

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 121

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 122

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 123

A penetration tester is cleaning up and covering tracks at the conclusion of a penetration test. Which of the following should the tester be sure to remove from the system? (Choose two.)

Options:

A.

Spawned shells

B.

Created user accounts

C.

Server logs

D.

Administrator accounts

E.

Reboot system

F.

ARP cache

Question 124

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

Options:

A.

Crawling the web application's URLs looking for vulnerabilities

B.

Fingerprinting all the IP addresses of the application's servers

C.

Brute forcing the application's passwords

D.

Sending many web requests per second to test DDoS protection

Question 125

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 126

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 127

A software company has hired a security consultant to assess the security of the company's software development practices. The consultant opts to begin reconnaissance by performing fuzzing on a software binary. Which of the following vulnerabilities is the security consultant MOST likely to identify?

Options:

A.

Weak authentication schemes

B.

Credentials stored in strings

C.

Buffer overflows

D.

Non-optimized resource management

Question 128

Which of the following documents describes activities that are prohibited during a scheduled penetration test?

Options:

A.

MSA

B.

NDA

C.

ROE

D.

SLA

Question 129

Which of the following is the most secure method for sending the penetration test report to the client?

Options:

A.

Sending the penetration test report on an online storage system.

B.

Sending the penetration test report inside a password-protected ZIP file.

C.

Sending the penetration test report via webmail using an HTTPS connection.

D.

Encrypting the penetration test report with the client’s public key and sending it via email.

Page: 1 / 43
Total 433 questions