CompTIA Certification

PT0-002 — PenTest+ Study Guide

63 practice questions with correct answers and detailed explanations. Use this guide to review concepts before taking the practice exam.

▶ Take Practice Exam 63 questions  ·  Free  ·  No registration

About the PT0-002 Exam

The CompTIA PenTest+ (PT0-002) certification validates professional expertise in CompTIA technologies. This study guide covers all 63 practice questions from our PT0-002 practice test, complete with correct answers and explanations to help you understand each concept thoroughly.

Review each question and explanation below, then test yourself with the full interactive practice exam to measure your readiness.

63 Practice Questions & Answers

Q1 Medium

During a penetration test, you discover a web application that uses client-side validation only. What is the primary risk associated with this finding?

  • A Client-side validation can be bypassed by attackers to submit malicious data directly to the server ✓ Correct
  • B Client-side validation is slower than server-side validation
  • C Client-side validation prevents users from accessing the application offline
  • D Client-side validation requires additional bandwidth
Explanation

Client-side validation provides no security since it runs in the user's browser and can be easily bypassed. Server-side validation is essential to protect against malicious input.

Q2 Hard

Which of the following best describes the purpose of a golden ticket attack in Active Directory environments?

  • A Stealing the domain administrator's password through social engineering
  • B Creating a forged Kerberos ticket-granting ticket that allows indefinite access to domain resources without detection ✓ Correct
  • C Performing a distributed denial of service attack against domain controllers
  • D Exploiting unpatched vulnerabilities in the domain controller
Explanation

A golden ticket is a forged Kerberos TGT that allows an attacker to impersonate any user and maintain persistent access to domain resources, even after credential changes.

Q3 Medium

What is the primary advantage of using a proxy server during a penetration test?

  • A To increase the speed of internet connections
  • B To automatically patch security vulnerabilities in applications
  • C To intercept and modify network traffic for analysis and testing purposes ✓ Correct
  • D To encrypt all communication between the client and server
Explanation

A proxy server allows penetration testers to intercept, inspect, and modify requests and responses, enabling thorough testing of application security controls.

Q4 Medium

During reconnaissance, you identify that a target organization uses a Content Delivery Network (CDN). How does this affect your attack surface mapping?

  • A CDN usage completely eliminates all security vulnerabilities in the organization
  • B You should exclusively focus testing efforts on the CDN provider instead of the client's infrastructure
  • C The CDN infrastructure may not reveal the actual origin server IP addresses, requiring alternative techniques to identify the real infrastructure ✓ Correct
  • D CDN providers always maintain perfect security, making penetration testing unnecessary
Explanation

CDNs mask origin servers, so penetration testers must use DNS enumeration, HTTP header analysis, and other techniques to identify actual infrastructure for proper scope mapping.

Q5 Easy

What is the primary purpose of implementing rate limiting controls in web applications?

  • A To reduce the file size of web pages served to users
  • B To ensure that only administrators can access the application
  • C To prevent brute force attacks and resource exhaustion by limiting the number of requests from a single source ✓ Correct
  • D To increase the processing speed of legitimate user requests
Explanation

Rate limiting restricts the number of requests allowed in a specific time period, effectively defending against brute force attacks, credential stuffing, and DDoS attempts.

Q6 Medium

During a white-box penetration test, you review the source code and discover hardcoded API keys in the application. What should be your immediate action?

  • A Share the API keys with other team members to verify they work correctly
  • B Modify the source code to remove the keys before completing your test
  • C Attempt to use the API keys to access external services to understand their scope of access
  • D Document the finding as a critical vulnerability and recommend storing credentials in environment variables or a secrets management system ✓ Correct
Explanation

Hardcoded credentials are critical vulnerabilities that should be reported immediately. The proper remediation is to use secure credential storage mechanisms like environment variables or vault systems.

Q7 Medium

Which attack technique involves capturing and replaying network traffic to bypass authentication mechanisms?

  • A Cross-site scripting attack
  • B Command injection attack
  • C SQL injection attack
  • D Session replay attack ✓ Correct
Explanation

A session replay attack captures legitimate session tokens or authentication data and replays them to impersonate authenticated users without knowing their credentials.

Q8 Easy

What is the primary difference between a vulnerability assessment and a penetration test?

  • A Penetration tests are faster and cheaper than vulnerability assessments
  • B Penetration tests do not require prior authorization from the organization
  • C Vulnerability assessments are only performed on web applications
  • D A vulnerability assessment identifies potential security weaknesses, while a penetration test actively exploits them to demonstrate business impact and access chains ✓ Correct
Explanation

Vulnerability assessments identify and catalog security flaws, while penetration tests go further by attempting to exploit those flaws to show real-world impact and chain attacks together.

Q9 Hard

You are testing a REST API and discover it uses JWT tokens without proper validation of the signature. What is the primary risk of this vulnerability?

  • A The API will consume excessive server resources
  • B An attacker can forge or modify JWT tokens to escalate privileges or impersonate other users ✓ Correct
  • C Users will be unable to authenticate to the application
  • D The API will be vulnerable to cross-origin resource sharing attacks
Explanation

Without signature validation, attackers can modify JWT token payloads (such as user ID or roles) and the application will accept the forged token as legitimate.

Q10 Hard

During the exploitation phase, you gain access to a system running outdated BIOS/firmware. What does this represent in your engagement report?

  • A A configuration issue that only affects system performance
  • B A critical finding that could allow persistent access, privilege escalation, or bypass of security controls through firmware-level exploits ✓ Correct
  • C An opportunity to provide free technical support to the organization
  • D A minor informational finding with no security implications
Explanation

Outdated BIOS/firmware can contain exploitable vulnerabilities that provide low-level system access, persistence mechanisms, and bypass security controls like secure boot.

Q11 Medium

What is the primary purpose of implementing CORS (Cross-Origin Resource Sharing) headers correctly?

  • A To increase the speed of API responses
  • B To automatically encrypt all data in transit
  • C To control which external domains can make requests to the application and prevent unauthorized cross-origin access ✓ Correct
  • D To hide the server's identity from attackers
Explanation

CORS headers specify which origins are allowed to access resources, preventing malicious websites from making unauthorized requests on behalf of users.

Q12 Medium

During a network penetration test, you discover a service running on an unusual port. What is the most effective approach to identify and test this service?

  • A Use banner grabbing and service-specific tools to identify the service, then research known vulnerabilities and perform targeted testing ✓ Correct
  • B Assume it is a honeypot and stop all testing immediately
  • C Immediately attempt exploitation without identification
  • D Scan only standard ports in future assessments to avoid this situation
Explanation

Banner grabbing reveals service type and version, allowing you to research specific vulnerabilities and conduct targeted testing rather than making assumptions.

Q13 Medium

What is the primary security risk associated with allowing file uploads without proper validation and storage controls?

  • A File uploads will consume all available disk space immediately
  • B Users will experience slow download speeds
  • C Attackers can upload malicious files such as web shells, execute arbitrary code, or overwrite critical files on the server ✓ Correct
  • D The application will automatically convert all files to PDF format
Explanation

Unrestricted file uploads allow attackers to upload executable code, web shells, or malware that can be executed by the server or served to other users.

Q14 Hard

During post-exploitation, you obtain a Windows NTLM hash. What technique can you use to crack this hash without performing a dictionary attack?

  • A Reinstalling the operating system to reset the password
  • B Rainbow table attacks, which use precomputed hash values to quickly identify the plaintext password ✓ Correct
  • C Social engineering the user for their password
  • D Contacting the administrator to retrieve the plaintext password
Explanation

Rainbow tables are precomputed databases of hashes mapped to plaintext values, allowing fast hash cracking without dictionary attacks.

Q15 Medium

What is the primary benefit of using a dedicated testing environment or sandbox during penetration testing?

  • A To test only non-critical applications
  • B To reduce the cost of the penetration test
  • C To avoid documenting findings in the final report
  • D To safely perform exploit development and malware analysis without affecting production systems or creating legal liability ✓ Correct
Explanation

Sandboxed environments allow safe testing of exploits, malware, and potentially destructive techniques without risk to production systems or accidental data damage.

Q16 Easy

Which vulnerability allows attackers to access data beyond intended boundaries, such as reading arbitrary files from a server?

  • A Path traversal vulnerability ✓ Correct
  • B Denial of service attack
  • C Man-in-the-middle attack
  • D Session hijacking
Explanation

Path traversal uses specially crafted file paths (like ../) to access files and directories outside the intended application directory.

Q17 Hard

During a test, you discover that the application stores passwords using an unsalted hashing algorithm. What is the specific risk this presents?

  • A The application will require users to change their passwords every 30 days
  • B The application will be unable to verify user passwords during login
  • C Multiple users with identical passwords will produce identical hashes, making rainbow table attacks and batch password cracking more efficient ✓ Correct
  • D Passwords will be transmitted in plaintext across the network
Explanation

Unsalted hashes produce identical outputs for identical inputs, allowing attackers to identify common passwords and use precomputed tables (rainbow tables) efficiently.

Q18 Medium

What is the primary purpose of using parameterized queries or prepared statements in database interactions?

  • A To reduce the size of database backup files
  • B To make database queries run faster
  • C To prevent SQL injection attacks by separating SQL code from user input ✓ Correct
  • D To automatically encrypt database credentials
Explanation

Parameterized queries treat user input as data rather than executable code, preventing SQL injection by ensuring input cannot be interpreted as SQL commands.

Q19 Hard

During reconnaissance, you identify that a target organization uses a web application firewall (WAF). How should this discovery influence your testing methodology?

  • A Abandon the penetration test entirely since WAF provides complete protection
  • B Assume the organization has no other vulnerabilities to discover
  • C Focus exclusively on social engineering attacks to avoid the WAF
  • D Adjust your testing approach to test WAF bypass techniques, identify WAF rules and bypasses, and perform testing from different network perspectives ✓ Correct
Explanation

WAF presence requires adjusted methodology including testing bypass techniques, identifying evasion methods, and potentially accessing internal networks to bypass the WAF.

Q20 Easy

What is the primary risk of using default credentials on network devices and applications?

  • A Default credentials are required for legitimate user access
  • B Default credentials improve system performance
  • C Attackers can easily gain unauthorized access using publicly known default usernames and passwords to compromise critical infrastructure ✓ Correct
  • D Default credentials are automatically encrypted by the system
Explanation

Default credentials are widely known and documented, allowing attackers trivial access to systems that retain factory settings after deployment.

Q21 Medium

During testing of a web application, you identify that user input is reflected in the response without proper encoding. What type of vulnerability is this?

  • A Stored cross-site scripting (XSS) vulnerability
  • B SQL injection vulnerability
  • C Cross-site request forgery (CSRF) vulnerability
  • D Reflected cross-site scripting (XSS) vulnerability ✓ Correct
Explanation

Reflected XSS occurs when user input is immediately returned to the user in the response without encoding, allowing attackers to inject malicious scripts via manipulated URLs.

Q22 Hard

What is the primary security purpose of implementing certificate pinning in mobile applications?

  • A To encrypt user passwords stored locally on the device
  • B To reduce the size of the mobile application package
  • C To prevent man-in-the-middle attacks by ensuring the application only accepts legitimate certificates from the intended server ✓ Correct
  • D To automatically update application security policies
Explanation

Certificate pinning hardcodes or pins the expected certificate within the application, preventing attackers from intercepting connections using fraudulent certificates.

Q23 Medium

During a black-box penetration test, you discover the application returns different error messages for valid versus invalid usernames during login attempts. What vulnerability does this represent?

  • A User enumeration vulnerability, which allows attackers to discover valid usernames for targeted attacks ✓ Correct
  • B Inadequate logging of failed authentication attempts
  • C Weak password policy that requires longer passwords
  • D Insufficient encryption of login credentials
Explanation

Differential error messages reveal which usernames exist in the system, allowing attackers to enumerate valid accounts and focus brute force attacks on real users.

Q24 Medium

What is the primary advantage of implementing proper access controls and the principle of least privilege during system configuration?

  • A It prevents all external attacks automatically
  • B It minimizes the impact of compromise by ensuring users and processes only have permissions necessary for their specific functions ✓ Correct
  • C It removes the requirement for regular security updates
  • D It eliminates the need for security awareness training
Explanation

Least privilege limits the damage from compromised accounts or exploits by restricting what an attacker can access even after gaining initial access.

Q25 Medium

During a test of a third-party API integration, you discover the API key is transmitted over HTTP instead of HTTPS. What is the primary risk of this configuration?

  • A The third-party provider will automatically revoke the API key
  • B The API key will expire more quickly than expected
  • C Users will experience slower performance when using the API
  • D Network eavesdroppers can capture the API key and use it to access protected resources on behalf of the legitimate application ✓ Correct
Explanation

Unencrypted HTTP transmission allows man-in-the-middle attackers to capture sensitive credentials in transit, compromising the entire API integration.

Q26 Easy

What is the primary purpose of implementing a Web Application Firewall (WAF) in a security architecture?

  • A To eliminate the need for input validation in the application code
  • B To monitor and filter HTTP/HTTPS traffic, detecting and blocking common web-based attacks like SQL injection, XSS, and DDoS before they reach the application ✓ Correct
  • C To automatically patch all software vulnerabilities
  • D To encrypt all user passwords stored in the database
Explanation

A WAF provides a protective layer that inspects web traffic and blocks known attack patterns, providing defense-in-depth against web-based exploits.

Q27 Easy

During a penetration test, you discover a web application that reflects user input without any sanitization. Which type of vulnerability is this most likely to be?

  • A Remote Code Execution (RCE)
  • B Cross-Site Request Forgery (CSRF)
  • C Cross-Site Scripting (XSS) ✓ Correct
  • D SQL Injection
Explanation

Reflected user input without sanitization is the primary indicator of XSS vulnerabilities, where attackers can inject malicious scripts that execute in users' browsers.

Q28 Easy

What is the primary purpose of a rules of engagement document in a penetration test?

  • A To define the scope, timeline, authorized targets, and limitations of the engagement ✓ Correct
  • B To provide detailed technical methodologies for vulnerability scanning
  • C To establish the hourly rate and payment terms between the tester and client
  • D To document all findings and vulnerabilities discovered during testing
Explanation

Rules of engagement establish the legal and operational boundaries of the penetration test, including what systems can be tested, when, and what techniques are permitted.

Q29 Easy

You are performing reconnaissance on a target organization. Which of the following is a passive information gathering technique?

  • A Conducting a vulnerability scan against known IP ranges
  • B Performing a port scan on the target's public-facing servers
  • C Reviewing publicly available job postings to identify technology stack and employee names ✓ Correct
  • D Attempting SQL injection payloads against web applications
Explanation

Passive reconnaissance gathers information without directly interacting with the target. Job postings, DNS records, and public documents provide intelligence without triggering detection mechanisms.

Q30 Medium

A penetration tester finds that a Windows server is running an outdated version of SMB with null session enabled. What is the greatest risk this presents?

  • A The attacker can establish a connection without credentials and enumerate shares and users ✓ Correct
  • B The attacker gains immediate SYSTEM-level privileges on the server
  • C The attacker can bypass Windows Defender protections automatically
  • D The attacker can remotely execute arbitrary code through SMB protocol exploitation
Explanation

Null sessions on SMB allow unauthenticated users to connect and enumerate network information, shares, and user accounts—a significant information disclosure risk. While RCE may be possible with additional exploits, enumeration is the direct risk.

Q31 Medium

During post-exploitation, you gain access to a Linux system and discover a setuid binary owned by root. What does this indicate?

  • A The binary requires root authentication before execution
  • B The binary's source code is publicly visible and world-readable
  • C The binary can only be executed by the owner of the file
  • D The binary will execute with root privileges regardless of which user runs it ✓ Correct
Explanation

A setuid binary executes with the privileges of its owner; if owned by root, it runs as root regardless of the executing user. This can be a privilege escalation vector if the binary is vulnerable.

Q32 Medium

Which of the following best describes the difference between vulnerability scanning and penetration testing?

  • A Vulnerability scanning is automated and identifies potential issues; penetration testing manually exploits vulnerabilities to assess real-world impact ✓ Correct
  • B Vulnerability scanning requires exploitation while penetration testing only identifies vulnerabilities
  • C Penetration testing is faster and less expensive than vulnerability scanning
  • D Vulnerability scanning tests network security while penetration testing only tests application security
Explanation

Vulnerability scanners automatically detect known vulnerabilities and misconfigurations, while penetration testing actively exploits those vulnerabilities to determine actual impact and risk to the organization.

Q33 Medium

You perform a lateral movement attack and successfully escalate privileges using a plaintext password found in a configuration file. Under what circumstance would this be a valid test activity?

  • A Only if the rules of engagement explicitly authorize testing this specific system and technique ✓ Correct
  • B Never, as this would violate the Computer Fraud and Abuse Act
  • C Anytime plaintext passwords are discovered, exploitation is automatically authorized
  • D Only if you obtain written permission from the system administrator directly
Explanation

Exploitation activities must always align with the signed rules of engagement and scope. Even discovered credentials should only be used for authorized testing purposes defined in the engagement documentation.

Q34 Hard

A web application uses JWT tokens for authentication. An attacker modifies the token's payload and changes the signature algorithm from RS256 to HS256. What vulnerability is being exploited?

  • A Insecure deserialization allowing code execution
  • B JWT algorithm confusion attack exploiting weak signature validation ✓ Correct
  • C Session fixation through predictable token generation
  • D Cross-Site Request Forgery through token manipulation
Explanation

Algorithm confusion attacks exploit improper JWT validation where the server accepts multiple algorithms. Changing from asymmetric (RS256) to symmetric (HS256) can allow attackers to forge valid signatures if the implementation doesn't enforce algorithm types.

Q35 Medium

During a network penetration test, you identify that Domain Name System (DNS) queries are not encrypted. Which protocol could you recommend to encrypt DNS traffic?

  • A DNS-over-HTTPS (DoH) or DNS-over-TLS (DoT) ✓ Correct
  • B Secure DNS (SDNS) with mandatory AES encryption
  • C DNSSEC with RSA key exchange protocols
  • D Encrypted DNS Query Protocol (EDQP)
Explanation

DoH and DoT are the primary standards for encrypting DNS queries. DoH uses HTTPS while DoT uses TLS, both preventing eavesdropping on DNS traffic. DNSSEC validates authenticity but doesn't encrypt queries.

Q36 Medium

What is the primary goal of threat modeling during the planning phase of a penetration test?

  • A To provide detailed remediation steps for vulnerabilities before testing begins
  • B To determine the exact number of vulnerability scanners needed for the assessment
  • C To identify which systems are most likely to be targeted by attackers based on their value and attack surface ✓ Correct
  • D To establish the financial budget and resource allocation for the engagement
Explanation

Threat modeling helps identify high-value assets and likely attack paths, allowing the penetration tester to focus on realistic scenarios that an actual attacker would pursue.

Q37 Hard

You discover a web application parameter that filters input to prevent SQL injection. However, you notice the application is vulnerable to NoSQL injection through the same parameter. What is the most likely cause?

  • A The application developers intentionally left NoSQL injection for performance testing
  • B NoSQL injection requires a different network protocol that bypasses standard filtering
  • C The input validation only checks for SQL syntax and does not account for NoSQL query operators ✓ Correct
  • D The web application firewall blocks SQL but not NoSQL attack patterns
Explanation

SQL injection filters typically look for SQL keywords and syntax. NoSQL injection uses different operators and syntax (like $ne, $regex), so legacy SQL-focused validation won't catch these attacks.

Q38 Hard

During privilege escalation testing on a Windows system, you find a service running with SYSTEM privileges that loads a DLL from a world-writable directory. What attack would be most effective?

  • A Registry manipulation to change the service startup type
  • B Process injection using Remote Thread Creation
  • C Token impersonation through the Access Token Duplication API
  • D DLL hijacking by placing a malicious DLL in the writable directory before the service loads ✓ Correct
Explanation

If a SYSTEM-level service loads a DLL from a world-writable location, an attacker can place a malicious DLL there first. When the service starts, it will load and execute the attacker's code with SYSTEM privileges.

Q39 Easy

What is the primary purpose of maintaining a testing journal during a penetration engagement?

  • A To track time spent on each vulnerability for performance metrics
  • B To record passwords and credentials for future maintenance access
  • C To document actions taken, findings discovered, and evidence for the final report and potential troubleshooting ✓ Correct
  • D To provide hourly billing records for the client's accounting department
Explanation

A testing journal creates a comprehensive audit trail of all actions, findings, and evidence collected during the assessment. This is essential for report accuracy, demonstrating due diligence, and supporting conclusions.

Q40 Medium

You are testing an API endpoint that uses OAuth 2.0 for authentication. You discover the refresh token is stored in browser localStorage instead of a secure HTTP-only cookie. What vulnerability does this create?

  • A The client application will experience performance degradation
  • B The API endpoint will reject all authentication requests from the browser
  • C The OAuth 2.0 server cannot validate token authenticity
  • D The refresh token becomes vulnerable to Cross-Site Scripting (XSS) attacks ✓ Correct
Explanation

Storing sensitive tokens in localStorage makes them accessible to JavaScript, including malicious scripts injected via XSS. HTTP-only cookies prevent script access, protecting tokens from XSS-based theft.

Q41 Medium

During active reconnaissance, you perform a SYN scan on a target and receive RST responses from closed ports and no responses from filtered ports. Based on this behavior, what can you infer?

  • A The target system is offline and unreachable
  • B The target is running an intrusion detection system (IDS) actively blocking connections
  • C A stateless firewall is in place, allowing incomplete connections
  • D A stateful firewall is protecting the target and blocking inbound SYN packets ✓ Correct
Explanation

RST responses indicate open/closed ports (the server is responding), while no response (filtered) suggests a firewall is silently dropping packets. This pattern is typical of stateful firewall behavior.

Q42 Medium

What is the primary difference between authenticated and unauthenticated vulnerability scanning in a penetration test?

  • A Authenticated scanning is faster but less thorough than unauthenticated scanning
  • B Authenticated scanning requires physical access to the target systems
  • C Unauthenticated scanning bypasses access controls while authenticated scanning cannot
  • D Authenticated scanning uses valid credentials to access systems and can discover vulnerabilities only visible to logged-in users ✓ Correct
Explanation

Authenticated scanning provides deeper visibility by logging in with valid credentials, revealing configuration issues, patch levels, and vulnerabilities that aren't visible to anonymous users.

Q43 Hard

You discover that a target application is vulnerable to XML External Entity (XXE) injection. Which of the following is the most critical risk associated with this vulnerability?

  • A Encryption of all transmitted data with unrecoverable cryptographic keys
  • B Complete erasure of the application's database through malformed XML parsing
  • C Automatic elevation of all user accounts to administrator status
  • D Arbitrary file disclosure, Server-Side Request Forgery (SSRF), and potential Remote Code Execution through entity expansion attacks ✓ Correct
Explanation

XXE vulnerabilities allow attackers to read local files, access internal services via SSRF, and conduct denial-of-service attacks through billion laughs (entity expansion) attacks, making them a critical security risk.

Q44 Medium

During client communication, a stakeholder asks why you're testing for vulnerabilities that 'obviously shouldn't exist.' What is the best response?

  • A Explain that security assumptions are often wrong, and even obvious vulnerabilities frequently exist due to misconfigurations, legacy systems, or human error ✓ Correct
  • B Agree that such testing is wasteful and propose removing those tests from the scope
  • C Increase the testing fees to compensate for testing 'obvious' vulnerabilities
  • D Focus only on complex, newly discovered vulnerabilities as those are more valuable
Explanation

Organizations often assume obvious vulnerabilities don't exist, yet default credentials, unpatched systems, and basic misconfigurations are among the most commonly exploited issues in real attacks.

Q45 Easy

What is the primary function of a Web Application Firewall (WAF) in the context of web application security?

  • A To monitor and block malicious HTTP requests and patterns before they reach the web application ✓ Correct
  • B To encrypt all traffic between clients and web servers using TLS protocols
  • C To replace the need for secure coding practices in application development
  • D To perform real-time code compilation and optimization of the web application
Explanation

A WAF acts as a protective layer between clients and web servers, analyzing HTTP requests for known attack patterns and blocking malicious payloads before they can exploit application vulnerabilities.

Q46 Medium

You find that a Linux server allows SSH password authentication with weak passwords. During your testing, you successfully brute-force an administrative account. What additional security control would best prevent this attack?

  • A Implementing multi-factor authentication (MFA) and enforcing key-based authentication with SSH ✓ Correct
  • B Regularly updating the SSH version to the latest available release
  • C Increasing the complexity of administrative usernames
  • D Restricting SSH access only to IPv6 addresses
Explanation

MFA and SSH key-based authentication eliminate the risk of brute-force attacks against passwords. Keys are cryptographically stronger and MFA adds an additional layer that can't be brute-forced.

Q47 Medium

During a test of a mobile application, you discover that sensitive data is being cached in the application's memory and not cleared after the user logs out. Why is this a security concern?

  • A The cached data will be automatically transmitted to the attacker's server
  • B The cached data prevents the user from logging in with different credentials
  • C An attacker with physical access or malware could access sensitive data from memory dumps even after the application is closed ✓ Correct
  • D Memory caching will cause the application to become unstable and crash
Explanation

Sensitive data left in memory can be recovered through memory dumps, malware, or physical device access long after the application is closed, violating data protection principles.

Q48 Medium

What is the best practice for reporting findings that overlap between multiple penetration testers on a large engagement?

  • A Assign all findings to the senior tester regardless of who discovered them
  • B Have each tester independently report all findings without coordination to validate results
  • C Maintain a centralized tracking system and establish clear communication protocols to prevent duplication and ensure comprehensive coverage ✓ Correct
  • D Document overlapping findings twice to provide additional evidence of vulnerability severity
Explanation

Centralized tracking prevents duplicate reporting, ensures all systems are covered, and facilitates team communication for complex findings that span multiple systems or attack chains.

Q49 Hard

A penetration tester discovers a vulnerability in the target organization's code repository that could impact all deployed applications. Should this finding be included in the penetration test report?

  • A Yes, if the vulnerability is within the agreed scope and demonstrates real exploitability that impacts the organization's security posture ✓ Correct
  • B No, because the code repository is not a 'live' system and therefore outside the scope of penetration testing
  • C Only if the client specifically asks about code repository security during the engagement
  • D Yes, but only if the vulnerability was documented in the initial reconnaissance phase
Explanation

If code repositories are within scope and contain exploitable vulnerabilities affecting deployed systems, they should be reported as they represent significant risk to the organization's security.

Q50 Easy

Which of the following is the primary advantage of using Burp Suite or similar web proxy tools during web application penetration testing?

  • A The generation of fully written penetration test reports without human analysis
  • B Automatic exploitation of all discovered vulnerabilities without manual intervention
  • C The ability to intercept, modify, and replay HTTP requests to test for various input validation and business logic vulnerabilities ✓ Correct
  • D Real-time encryption of all communications between the tester and target applications
Explanation

Web proxies enable testers to intercept and manipulate HTTP traffic, revealing how applications handle malformed input and allowing manual testing for complex vulnerabilities that automated scanners miss.

Q51 Hard

During exploitation, you gain a shell on a compromised system. The operating system uses Address Space Layout Randomization (ASLR). Why would this complicate further exploitation attempts?

  • A ASLR encrypts the entire file system and prevents data exfiltration
  • B ASLR automatically logs and reports all exploitation attempts to security administrators
  • C ASLR prevents the system from accepting any remote connections or commands
  • D ASLR randomizes memory addresses on each execution, making it harder to reliably exploit memory corruption vulnerabilities that depend on known memory locations ✓ Correct
Explanation

ASLR randomizes the base addresses of executable code and data segments with each execution. Exploits using hardcoded memory addresses will fail, requiring more sophisticated techniques like information disclosure to bypass ASLR.

Q52 Easy

What is the primary purpose of conducting a social engineering test as part of a penetration engagement?

  • A To identify and remove employees who fall victim to phishing attacks
  • B To obtain login credentials that can be used for unauthorized system access after the engagement
  • C To demonstrate that social engineering is impossible to prevent in modern organizations
  • D To assess the organization's security awareness and identify vulnerabilities in human processes and controls ✓ Correct
Explanation

Social engineering tests evaluate how well employees follow security policies, recognize threats, and respond to suspicious communications. Results guide awareness training and process improvements.

Q53 Medium

You are testing a cloud-based infrastructure and discover overly permissive IAM roles that allow services to access resources beyond their operational needs. What principle does this violate?

  • A Principle of Separation of Concerns in cloud architecture design
  • B Principle of Availability in the CIA triad of information security
  • C Principle of Least Privilege—services should only have permissions necessary to perform their specific functions ✓ Correct
  • D Principle of Data Residency in cloud compliance frameworks
Explanation

Overly permissive IAM roles violate the Principle of Least Privilege, which states that users and services should have only the minimum permissions required to perform their duties, limiting potential damage from compromised accounts.

Q54 Medium

During a penetration test, you discover that a web application fails to properly validate file uploads and allows execution of arbitrary code. Which of the following best describes this vulnerability?

  • A XML external entity injection
  • B Insecure deserialization
  • C Unrestricted file upload ✓ Correct
  • D Path traversal vulnerability
Explanation

Unrestricted file upload vulnerabilities allow attackers to upload and execute arbitrary files, including code. This directly matches the scenario of bypassed upload validation and code execution.

Q55 Easy

What is the primary purpose of performing a wireless network assessment during a penetration test?

  • A To evaluate the security posture of wireless access points and detect unauthorized networks ✓ Correct
  • B To document the network topology for IT department records
  • C To identify all devices connected to the network
  • D To measure the signal strength across all floors of a building
Explanation

Wireless assessments focus on identifying security weaknesses in wireless infrastructure, including rogue access points, weak encryption, and authentication flaws.

Q56 Medium

You are conducting a black-box penetration test and need to identify web application technologies in use. Which technique would be most appropriate for fingerprinting web technologies without making obvious requests that trigger IDS alerts?

  • A Running aggressive vulnerability scanners continuously
  • B Analyzing HTTP response headers and HTML comments passively ✓ Correct
  • C Submitting malformed HTTP requests to generate error pages
  • D Sending multiple identical requests to observe response patterns
Explanation

Passive analysis of HTTP headers, HTML comments, and other metadata allows technology identification with minimal noise and fewer alerts compared to active scanning techniques.

Q57 Hard

During post-exploitation, you gain access to a Linux system and find a database backup file encrypted with a weak cipher. Which approach would be most efficient for attempting to recover the plaintext?

  • A Request the encryption key from system administrators
  • B Analyze the cipher implementation for known weaknesses and use targeted cryptanalysis ✓ Correct
  • C Brute force every possible key combination without analysis
  • D Assume the encryption is unbreakable and move to other targets
Explanation

Analyzing the cipher for known weaknesses (such as ECB mode vulnerabilities, weak key schedules, or implementation flaws) is far more efficient than brute force and demonstrates professional penetration testing methodology.

Q58 Medium

What is the primary benefit of establishing a command and control (C2) infrastructure during a penetration test?

  • A To disable all security controls on the target network
  • B To automate the detection of all vulnerabilities in the environment
  • C To avoid detection by maintaining persistent remote access and executing post-exploitation activities ✓ Correct
  • D To immediately escalate privileges on all compromised systems
Explanation

A C2 infrastructure allows penetration testers to simulate advanced persistent threat (APT) behavior by maintaining access and executing post-exploitation commands while avoiding detection.

Q59 Hard

You discover that a target system uses certificate pinning in its mobile application. Which of the following best describes the impact this has on your penetration test?

  • A It automatically encrypts all traffic and makes network analysis impossible
  • B It prevents you from using HTTPS entirely when testing the application
  • C It complicates man-in-the-middle attacks by validating certificates against a pinned list, requiring additional bypass techniques ✓ Correct
  • D It forces all authentication to use multi-factor authentication exclusively
Explanation

Certificate pinning validates that the server's certificate matches a pre-pinned list, preventing standard MITM attacks. Testers must employ bypass techniques such as jailbreaking, hooking, or patching the application.

Q60 Medium

During a social engineering assessment, you successfully obtain credentials from an employee through phishing. What should be your next step to maintain professional ethics and scope compliance?

  • A Share the credentials with other team members to expedite testing
  • B Reset the employee's password to prevent legitimate access
  • C Verify the credentials work and document the finding without accessing restricted systems beyond your authorized scope ✓ Correct
  • D Immediately use the credentials to access as many systems as possible
Explanation

Professional penetration testing requires validating the finding and documenting it while respecting scope limitations. Using credentials only within authorized boundaries demonstrates ethical practice and prevents unintended damage.

Q61 Easy

Which of the following scenarios best represents the need for DNS enumeration during reconnaissance?

  • A To block all external DNS requests from the target network
  • B To identify subdomains, mail servers, and other DNS records that may reveal additional attack surfaces ✓ Correct
  • C To measure the speed of DNS resolution across the network
  • D To verify that only one DNS server is configured in the environment
Explanation

DNS enumeration reveals subdomains, mail servers, nameservers, and other records that expand the target's attack surface and provide valuable information for vulnerability identification.

Q62 Hard

You are testing a web application that implements rate limiting on login attempts. Which technique would best help identify if the rate limiting can be bypassed?

  • A Only using automated tools that ignore rate limiting responses
  • B Submitting requests at exactly the documented rate limit threshold
  • C Waiting 24 hours before attempting additional login attempts
  • D Testing with different HTTP headers, user agents, and IP addresses to see if the limit resets or is applied per-session ✓ Correct
Explanation

Rate limiting bypasses often depend on how limits are applied—by IP, session, or account. Testing with varied headers and IPs helps identify if the implementation has weaknesses in tracking request origin.

Q63 Medium

When documenting vulnerabilities in a penetration test report, which information is most critical for remediation efforts?

  • A The names of all employees who had access to vulnerable systems
  • B A detailed explanation of exploitation steps, impact assessment, proof of concept, and specific remediation recommendations ✓ Correct
  • C A list of all tools used during the assessment with version numbers
  • D A timeline of every network packet captured during the engagement
Explanation

Effective remediation requires understanding how the vulnerability was exploited, its business impact, proof that it exists, and actionable steps to fix it. This information enables the organization to prioritize and resolve issues effectively.

Ready to test your knowledge?

You've reviewed all 63 questions. Take the interactive practice exam to simulate the real test environment.

▶ Start Practice Exam — Free