CompTIA PenTest+ Practice Test (PT0-002)
Use the form below to configure your CompTIA PenTest+ Practice Test (PT0-002). The practice test can be configured to only include certain exam objectives and domains. You can choose between 5-100 questions and set a time limit.

CompTIA PenTest+ PT0-002 Information
CompTIA PenTest+ (PT0-002) Exam
The CompTIA PenTest+ (PT0-002) certification is designed for cybersecurity professionals who specialize in penetration testing and vulnerability assessment. It validates hands-on skills in planning, conducting, and reporting penetration tests for organizations. This certification is vendor-neutral and focuses on real-world scenarios, making it relevant for security professionals working with various technologies and environments.
Exam Overview
The PT0-002 exam consists of a maximum of 85 questions, including multiple-choice and performance-based questions. Candidates have 165 minutes to complete the test. The exam costs $392 USD. A passing score is 750 on a scale of 100 to 900. The certification is valid for three years and can be renewed through CompTIA’s continuing education program.
Exam Content
The PT0-002 exam covers five main domains: planning and scoping, information gathering and vulnerability scanning, attacks and exploits, reporting and communication, and tools and code analysis. Planning and scoping include engagement rules, compliance, and risk assessment. Information gathering and vulnerability scanning focus on reconnaissance, fingerprinting, and scanning techniques. Attacks and exploits test knowledge of network, web, wireless, and physical attacks. Reporting and communication cover documentation, remediation, and risk communication. Tools and code analysis assess scripting, automation, and exploit development.
Who Should Take This Exam?
The CompTIA PenTest+ certification is ideal for cybersecurity professionals working as penetration testers, security analysts, vulnerability assessment analysts, or red team members. It is recommended for individuals with at least three to four years of hands-on cybersecurity experience. The certification is also useful for IT professionals who want to advance their careers in offensive security.
How to Prepare
Candidates should review the official CompTIA PenTest+ Exam Objectives and study materials provided by CompTIA. Practical experience with penetration testing tools such as Metasploit, Nmap, and Burp Suite is essential. Practice exams can help assess readiness and identify weak areas. Hands-on labs and ethical hacking courses can further strengthen skills.
Summary
The CompTIA PenTest+ (PT0-002) certification is a valuable credential for cybersecurity professionals specializing in penetration testing and vulnerability assessment. It validates hands-on skills in ethical hacking, exploit development, and security testing. This certification is ideal for those pursuing careers in offensive security and ethical hacking.
Scroll down to see your responses and detailed results
Free CompTIA PenTest+ PT0-002 Practice Test
Press start when you are ready, or press Change to modify any settings for the practice test.
- Questions: 15
- Time: Unlimited
- Included Topics:Planning and ScopingInformation Gathering and Vulnerability ScanningAttacks and ExploitsReporting and CommunicationTools and Code Analysis
During a penetration test, you have identified that an organization's web application is vulnerable to SQL injection attacks. Which of the following recommendations would be most effective in mitigating this risk?
Encrypt passwords stored within the application database
Sanitize user input and utilize parameterized queries
Keep the web server and database server software up to date through regular patch management
Implement multifactor authentication for user logins
Enforce strong password requirements for all application users
Answer Description
Sanitizing user input is the primary defense against SQL injection attacks. It involves validating and cleaning up all user-supplied data to prevent malicious SQL code from being executed. Parameterized queries, which separate SQL logic from data, are also an effective measure against SQL injection as they ensure that the input is treated strictly as data, not executable code. While strong passwords and multifactor authentication can improve overall security, they do not directly protect against SQL injection attacks. Similarly, encrypting passwords is essential for data protection but is not a mitigation strategy for SQL injection vulnerabilities. Regular patch management is important for addressing known vulnerabilities, but not as directly related to preventing SQL injections as sanitizing input and using parameterized queries.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What are SQL injection attacks?
What are parameterized queries, and how do they work?
What is input sanitization, and why is it important?
Which method of using search engines for passive reconnaissance is most likely to yield comprehensive insight into potential vulnerabilities within a target organization's web applications?
Using advanced search engine queries with operators to find exposed sensitive information or misconfigurations.
Looking up the main company website to analyze the business' profile and obtain general contact information.
Searching the company's social media feeds for general technology updates or event announcements.
Reviewing the company's public financial reports to identify budget allocations for cybersecurity.
Answer Description
By using advanced search engine queries, such as those involving site:
, filetype:
, inurl:
, or intext:
operators, a penetration tester can discover sensitive information that may be inadvertently exposed on public websites. This can include configuration files, user credentials, or revealing error messages. This type of strategic search can uncover a wide array of vulnerabilities or misconfigurations more effectively than basic company details or generic searches, which tend to yield only surface-level information. The incorrect answers focus on specific narrow aspects that are less likely to provide a broad view of potential vulnerabilities across web applications.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What are advanced search engine queries and how do they work?
What are some examples of sensitive information that can be found using these queries?
What are some common operators used in advanced search queries?
What is the primary characteristic of a direct-to-origin attack in the context of cloud technologies?
Bypassing content delivery networks to target the server or service directly
Flooding a network with traffic to disrupt service availability
Intercepting data packets between the client and the server
Exploiting weaknesses in the encryption algorithms of data in transit
Answer Description
A direct-to-origin attack occurs when an attacker bypasses a content delivery network (CDN) or other security measures and targets the web server or cloud service directly. By doing this, attackers attempt to exploit the vulnerabilities that may not be apparent or protected behind these services.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What are content delivery networks (CDNs)?
What types of vulnerabilities are typically targeted in direct-to-origin attacks?
How can organizations protect against direct-to-origin attacks?
During a penetration test, establishing a primary contact person with the client organization is not necessary if the penetration tester has been granted authorization to test the systems.
True
False
Answer Description
This statement is false. Even with authorization, having a primary contact person is vital for ensuring that there is a clear line of communication throughout the engagement. This person is responsible for receiving updates, providing information, and making decisions if needed. Lacking a primary point of contact could lead to information silos, inefficient communication, and potential escalation of issues that could have been addressed with proper communication channels.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
Why is having a primary contact person important during a penetration test?
What could happen if there is no primary contact person during a penetration test?
What role does communication play in a penetration test?
Why is it imperative for penetration testers to remove any credentials they have created during an assessment after the engagement concludes?
Because the credentials may be required for client-side auditing purposes
To ensure penetration testers can reuse the same credentials for future tests
To revert systems to their original security posture and prevent misuse by unauthorized parties
It is a legal requirement in most countries to delete any data produced during a test
Answer Description
It is imperative to remove tester-created credentials to ensure that there is no residual access that could be exploited by unauthorized parties. This action not only reverts systems to their original security posture but also prevents the potential misuse of the credentials which could lead to a security breach.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What are residual access and why is it a concern for security?
What steps should penetration testers take to securely delete credentials?
What does reverting systems to their original security posture involve?
Imagine you are conducting a penetration test and need to transfer a file from your attacking machine to a compromised Windows host. You decide to use a networking utility known for its simplicity and effectiveness in creating ad-hoc connections between two machines. What command should be executed on the attacker's machine to serve a file named 'payload.exe' over port 4444?
nc -lvp 4444 < payload.exe
nc -p 4444 -w 3 < payload.exe
nc -ulvp 4444 < payload.exe
nc -l -p 4444 > payload.exe
Answer Description
The correct line 'nc -lvp 4444 < payload.exe' listens on port 4444 and serves 'payload.exe' to any client that connects. The '-l' flag tells the utility to listen for incoming connections, '-v' stands for verbose output (providing feedback and debugging information), and '-p 4444' specifies the port number. Redirection '<' is used to serve a file. The other options are incorrect: '-p' should not be used with the client mode (without '-l'), 'nc -l -p 4444 > payload.exe' wrongly suggests the file is being received (using '>'), and 'nc -ulvp 4444 < payload.exe' incorrectly includes the '-u' flag, which is used for UDP protocol instead of TCP.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What does 'nc' stand for and what is its purpose?
Can you explain the flags used in the command 'nc -lvp 4444'?
What is the difference between using TCP and UDP with Netcat?
You are conducting a security audit on a web page and have found a section where user input is dynamically inserted into the document without proper sanitation. To confirm the existence of this client-side security flaw, you intend to inject code that creates a dialog box displaying 'Test'. Which of the following JavaScript snippets would be correctly executed to demonstrate the vulnerability?
alert('Test');
confirm('Test');
aler't('Test');
Alert('Test');
Answer Description
The correct answer is snippet A, alert('Test');
, which is a standard method in JavaScript for invoking a dialog box with specified text content. This method is suitable for testing the insertion of malicious scripts, as it should only trigger when JavaScript is executed within the client's browser context. Snippet B, Alert('Test');
, is incorrect due to the use of a capital 'A' in 'Alert', which is not recognized in JavaScript due to case sensitivity. Snippet C, aler't('Test');
, contains a misplaced single quote, resulting in invalid syntax, thus, the script would not run. Snippet D, confirm('Test');
, would indeed create a dialog box but one that asks for confirmation (OK/Cancel) and is typically used to demonstrate a different form of interaction than just providing an alert.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is the purpose of the alert() function in JavaScript?
Why is JavaScript case-sensitive, and how does that affect coding?
What are some common client-side security vulnerabilities related to JavaScript?
Your penetration testing firm has been contracted to conduct a security assessment of a web application. The client has specified the use of recognized industry standards. As part of your scoping document, you decide to incorporate the OWASP Top 10 to structure the testing methodology. Which of the following best describes the relevance of including the OWASP Top 10 in your scoping document?
It sets the legal framework for conducting penetration tests, ensuring compliance with international laws and regulations.
It mandates a mandatory checklist that the client must resolve before a penetration test can be considered valid.
It helps prioritize the focus of the penetration test on common web application vulnerabilities recognized as significant industry-wide.
It provides a complete list of all possible vulnerabilities in any given web application, ensuring a penetration test will cover every known vulnerability.
Answer Description
The OWASP Top 10 provides a list of the most critical security risks to web applications, which serves as a standard to guide the testing process towards the most relevant and common vulnerabilities that attackers are likely to exploit. It helps to align the objectives of the penetration test with industry-recognized security risks, ensuring a comprehensive security assessment specifically for web applications. Mentioning OWASP in the scoping document indicates a structured and knowledgeable approach to web application security.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is OWASP and what role does it play in web application security?
How often is the OWASP Top 10 updated, and why is this important?
Can you explain the significance of prioritizing vulnerabilities during a penetration test?
Is it the sole responsibility of the client to perform a retest to verify that the issued recommendations have been effectively implemented after the initial penetration test?
No
Yes
Answer Description
While clients may perform their own verification checks after implementing remediation strategies, it is a best practice for penetration testers to offer and sometimes conduct a retest. This helps to ensure that the changes were effective and that no additional vulnerabilities were introduced during the remediation process. It also provides the client with third-party validation of their security enhancements.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
Why is it important for penetration testers to conduct a retest after initial findings?
What are some common remediation strategies clients might implement after a penetration test?
What is the difference between a penetration test and a vulnerability assessment?
During a penetration testing contract, the client has specifically requested an evaluation of existing physical security measures. Your assessment reveals that the current video surveillance system only covers entry and exit points but does not monitor the server room, which houses critical infrastructure. When compiling your findings report, how should this observation be presented to the client?
A recommendation for increasing surveillance to include critical areas such as the server room
Reducing the hours of surveillance to conserve resources during business hours
Upgrading the resolution of current cameras to capture clearer imagery
Maintaining the current surveillance setup since it adequately covers all necessary areas
Answer Description
The correct answer is A recommendation for increasing surveillance to include critical areas such as the server room
. A comprehensive security program includes surveillance of all sensitive areas, not just entry/exit points. By highlighting the lack of coverage in the server room, you align the physical security recommendation with the protective needs of critical infrastructure. The other options are incorrect because they either do not address the issue identified (maintaining the current surveillance setup), contradict best practices (reducing usage during business hours), or are unrelated to the issue (upgrading the resolution on existing cameras is not the main concern if critical areas are not under surveillance).
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What are physical security measures?
Why is it important to monitor server rooms specifically?
What best practices should be included in a comprehensive security program?
A penetration tester is assessing an organization's susceptibility to information leakage via steganography. The tester suspects that sensitive data might be secreted within ASCII text using whitespace. Which steganography tool would be most appropriate to analyze the texts for hidden messages?
Coagula
Openstego
Steghide
Snow
Answer Description
The correct answer is 'Snow,' as this tool is specifically designed for steganography in ASCII text using whitespace. Snow uses whitespace and tabulation characters to hide messages within the text, which would not be discernible at a glance. Other tools like Steghide and Openstego are more commonly used for hiding data in images or audio files, not in ASCII text using whitespace. Coagula is used for sound-based steganography and hence is not the right tool to analyze ASCII text.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is steganography and how is it used in cybersecurity?
How does the Snow tool specifically hide messages in ASCII text?
What are the limitations of using tools like Steghide or Openstego for ASCII text analysis?
You are conducting a penetration test against an organization and have obtained the following information from an Nmap scan: Nmap scan report for 192.168.1.105 Host is up (0.0010s latency). Not shown: 995 closed ports PORT STATE SERVICE VERSION 22/tcp open ssh OpenSSH 7.2p2 Ubuntu 4ubuntu2.4 (Ubuntu Linux; protocol 2.0) | ssh-hostkey: 2048 SHA256:XxXXXxxXxxxXxXxxxXxxXxxXxXXXxxXxX (RSA) 80/tcp open http Apache httpd 2.4.18 ((Ubuntu)) 111/tcp open rpcbind 2-4 (RPC #100000) 139/tcp open netbios-ssn Samba smbd 3.X - 4.X (workgroup: WORKGROUP) 445/tcp open microsoft-ds Microsoft Windows 7 - 10 microsoft-ds (workgroup: WORKGROUP)
Based on the fingerprinting data obtained from the scan, which of the following conclusions can be accurately drawn about the target system?
The target uses a custom operating system, as indicated by the mix of services.
The target system is likely running a Linux-based operating system.
The target system is a dedicated Microsoft Windows Server machine.
The target system is running outdated network services with no implications of the underlying OS.
Answer Description
The output from Nmap provides information about the services running and their versions. The correct answer can be deduced by examining the provided versions and services. OpenSSH 7.2p2 suggests a Linux-based system, as it mentions Ubuntu in the service version detail. Apache 2.4.18 further confirms this as it is running on Ubuntu. The presence of Samba smbd in the service versions also aligns with a Linux environment that is configured to share files with Windows systems. The incorrect answers indicate either a different operating system or a conclusion that is not directly supported by the information given.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is the significance of the Nmap scan output?
How can you determine the operating system from Nmap scan results?
What are the potential implications of running outdated services like Apache 2.4.18?
Which of the following options is the BEST method to identify assets hosted in the cloud as part of an organization's infrastructure during a penetration test?
Employing cloud service discovery tools designed to query cloud provider APIs and enumerate resources.
Utilizing traditional network scanners to scan IP ranges owned by the organization.
Conducting wardriving around the vicinity of the organization's physical location.
Reviewing job listings from the organization to infer cloud services in use.
Answer Description
Using dedicated cloud service discovery tools is the most effective method for identifying assets hosted in the cloud. These tools are designed specifically to detect and enumerate resources running in cloud environments. Scanning with conventional network scanners without cloud-specific functionality may not reveal all the cloud-based assets, as they might not be able to interact with cloud APIs or understand cloud-specific resource conventions and services. Wardriving is a technique used for discovering wireless networks and is not applicable to cloud asset discovery. Checking job listings might incidentally reveal some technologies being used but is not a systematic approach to discovering cloud-hosted assets.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What are cloud service discovery tools and how do they work?
Why can't traditional network scanners effectively identify cloud assets?
What are the limitations of using job listings to discover cloud services?
During a penetration testing exercise, you have gained access to a Windows server and intend to use a post-exploitation tool to extract credential data from the system memory. Which command would you use with the tool to retrieve this sensitive information?
tokenselevate sekurlsacredentials
privilegedebug sekurlsalogonpasswords
mimikatz::export cache
kerberos::list_creds
Answer Description
The correct answer is privilege::debug sekurlsa::logonpasswords
because when using Mimikatz, one must first obtain the proper privileges to interact with the system processes. The privilege::debug
command grants the necessary rights to access sensitive areas of the operating system, and the sekurlsa::logonpasswords
command then extracts the plaintext passwords, hashes, and other details for accounts that are logged in or have logged in previously. The other options listed either represent incorrect or non-existent commands in the context of Mimikatz and thus would not achieve the desired outcome.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is Mimikatz and how does it work?
Why do I need to use 'privilege::debug' before 'sekurlsa::logonpasswords'?
What types of information can 'sekurlsa::logonpasswords' extract?
During a penetration test, you have successfully exploited a vulnerability on a Windows server and have gained access to the cmd.exe command shell. You want to upgrade this shell to have enhanced capabilities, including the ability to transfer files securely and manipulate the Windows Registry from your attack platform. Which of the following actions would BEST accomplish this?
Open a PowerShell session to utilize its native features
Deploy an additional cmd.exe shell for registry manipulation
Use the cmd.exe shell to manually transfer files using FTP
Generate a Meterpreter payload and execute it on the target system to upgrade the shell
Connect to the server with a Telnet client to achieve persistent access
Initiate an SSH connection to the server to enable secure file transfers
Answer Description
Upgrading from a basic cmd.exe command shell to a Meterpreter shell would provide the most versatile and powerful functionalities for a penetration test. Meterpreter, as part of the Metasploit framework, offers enhanced features including the ability to upload/download files, manipulate the Windows Registry, interact with the file system, and use advanced pivoting techniques. Other types of shells or access methods, such as a simple SSH or Telnet connection, would not offer the same level of functionality and control over the Windows environment that the Meterpreter shell provides.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is Meterpreter?
What does it mean to upgrade a shell in penetration testing?
What is the Metasploit framework?
Gnarly!
Looks like that's it! You can go back and review your answers or click the button below to grade your test.