Topic · 44 of 148 questions freeAttacks and Exploits
Question 11Choose 1
Which of the following tasks would ensure the key outputs from a penetration test are not lost as part of the cleanup and restoration activities?
Correct answer:
A. Preserving artifacts
Explanation:
The goal is to ensure that key outputs from a penetration test are not lost during cleanup and restoration activities. Let’s evaluate each option to determine which best addresses this requirement:
A. Preserving artifacts: Description:
Artifacts in a penetration test include logs, screenshots, scan results, reports, and other evidence generated during the assessment. Preserving artifacts involves securely storing these outputs to maintain a record of findings, vulnerabilities, and evidence for reporting and future reference.
Why Correct:
Cleanup and restoration activities often involve reverting systems to their original state, which may include deleting temporary files, logs, or other test-related data. Preserving artifacts ensures that critical outputs, such as proof of exploitation or vulnerability scan results, are saved before cleanup, preventing loss of key information needed for the final report or audit purposes.
B. Reverting configuration changes: Description:
Reverting configuration changes involves restoring systems to their pre-test state, such as undoing changes to firewall rules, user accounts, or system settings made during the penetration test.
Why Incorrect:
While reverting configuration changes is a standard part of cleanup, it does not focus on preserving the outputs of the test. In fact, this process may involve deleting test-related data, which could lead to the loss of key outputs if not properly preserved beforehand.
C. Keeping chain of custody: Description:
Chain of custody refers to documenting the handling and storage of evidence to ensure its integrity, typically in forensic investigations or legal contexts. It tracks who accessed evidence and how it was stored or transferred.
Why Incorrect:
While maintaining chain of custody is important for ensuring evidence integrity in legal or forensic scenarios, it is not directly related to preventing the loss of key outputs during cleanup. It focuses on tracking rather than preserving the artifacts themselves.
D. Exporting credential data: Description:
Exporting credential data involves saving usernames, passwords, or other authentication details discovered during the penetration test.
Why Incorrect:
While exporting credential data may be part of preserving specific findings, it is too narrow in scope. Key outputs of a penetration test include a broader range of artifacts (e.g., logs, screenshots, scan results), not just credentials. Focusing solely on credentials does not ensure all critical outputs are preserved.
Why Preserving Artifacts is the Best Choice:
Comprehensive Preservation:
Artifacts encompass all key outputs of a penetration test, including scan results, logs, screenshots, and documentation of vulnerabilities or exploits. Preserving these ensures that nothing critical is lost during cleanup activities, such as system restoration or deletion of temporary files.
Penetration Testing Best Practices:
According to industry standards, such as those outlined in the CompTIA PenTest+ objectives and the Penetration Testing Execution Standard (PTES), preserving artifacts is a critical step to maintain evidence for reporting, remediation validation, and compliance purposes.
Cleanup Context:
Cleanup activities often involve removing test accounts, logs, or tools from the target environment. Without preserving artifacts beforehand, these outputs could be inadvertently deleted, undermining the test’s value.
References:
CompTIA PenTest+ PT0-003 Objectives:
The exam emphasizes the importance of documentation and reporting, including preserving evidence and artifacts to support findings and recommendations.
Penetration Testing Execution Standard (PTES):
The PTES highlights the need to collect and preserve artifacts during the reporting phase to ensure all findings are documented before cleanup.
NIST SP 800-115:
The NIST Technical Guide to Information Security Testing and Assessment recommends retaining test data and artifacts for reporting and audit purposes.
Question 12Choose 1
During a security assessment, a penetration tester needs to exploit a vulnerability in a wireless network's authentication mechanism to gain unauthorized access to the network. Which of the following attacks would the tester most likely perform to gain access?
Correct answer:
A. KARMA attack
Explanation:
The goal of the penetration tester is to exploit a vulnerability in the wireless network’s authentication mechanism to gain unauthorized access. Let’s analyze each option to determine which attack is most likely to achieve this objective:
A. KARMA attack: Description: A KARMA (Karma Attacks Radioed Machines Automatically) attack exploits weaknesses in how wireless clients authenticate to access points. It involves setting up a rogue access point (AP) that mimics a legitimate AP’s SSID. Vulnerable devices, configured to automatically connect to known networks, may connect to the rogue AP without user intervention. The tester can then capture credentials or manipulate traffic to gain unauthorized access to the network.
Why Correct:
A KARMA attack directly targets the authentication mechanism by tricking devices into connecting to a malicious AP, allowing the tester to intercept authentication credentials (e.g., WPA2-PSK handshakes) or bypass authentication to access the network. This aligns with exploiting vulnerabilities in the authentication process to gain unauthorized access.
B. Beacon flooding: Description: Beacon flooding involves broadcasting a large number of fake beacon frames with different SSIDs to overwhelm nearby wireless clients and tools, causing confusion or denial-of-service (DoS) conditions.
Why Incorrect:
Beacon flooding is primarily a DoS attack, not an attack designed to exploit authentication mechanisms or gain unauthorized access. It disrupts network discovery but does not directly facilitate access to the network.
C. MAC address spoofing: Description: MAC address spoofing involves changing a device’s MAC address to impersonate an authorized device, potentially bypassing MAC-based filtering on a wireless network.
Why Incorrect:
While MAC address spoofing can help bypass MAC filtering, it does not directly exploit vulnerabilities in the authentication mechanism (e.g., WPA2 or 802.1X). MAC filtering is a weak security control, and modern wireless networks typically rely on stronger authentication protocols, making this less relevant to the question’s focus on authentication vulnerabilities.
D. Eavesdropping: Description: Eavesdropping involves passively capturing wireless network traffic to gather sensitive information, such as credentials or data, without actively interacting with the network.
Why Incorrect:
Eavesdropping is a passive attack that does not actively exploit the authentication mechanism to gain unauthorized access. While it may allow the tester to capture credentials in some cases (e.g., unencrypted traffic), it is not an active exploitation technique and is less likely to directly result in network access compared to a KARMA attack.
Why KARMA Attack is the Best Choice:
Exploits Authentication Mechanism:
A KARMA attack specifically targets vulnerabilities in how wireless clients authenticate to access points, exploiting trust in known SSIDs to trick devices into connecting to a rogue AP. This can allow the tester to capture credentials or manipulate authentication to gain access.
Direct Access to the Network:
By setting up a rogue AP, the tester can intercept traffic or authenticate clients, providing a pathway to gain unauthorized access to the network, which aligns with the question’s objective.
Penetration Testing Relevance:
The CompTIA PenTest+ PT0-003 exam includes wireless network attacks, and KARMA attacks are a well-known method for exploiting authentication vulnerabilities in wireless environments, especially in scenarios involving misconfigured or overly trusting clients.
References:
CompTIA PenTest+ PT0-003 Objectives:
The exam covers wireless network attacks, including exploiting authentication mechanisms, with KARMA attacks being a recognized technique for targeting client authentication behavior.
OWASP Wireless Attacks:
The Open Web Application Security Project (OWASP) and other security resources describe KARMA attacks as a method to exploit client-side wireless vulnerabilities.
Kali Linux Tools Documentation:
Tools like airbase-ng (part of the Aircrack-ng suite) are used to perform KARMA attacks, as documented in resources like https://www.aircrack-ng.org/.
Question 13Choose 1
A penetration tester identifies an exposed corporate directory containing first and last names and phone numbers for employees. Which of the following attack techniques would be the most effective to pursue if the penetration tester wants to compromise user accounts?
Correct answer:
A. Smishing
Explanation:
The penetration tester has identified an exposed corporate directory containing employees’ first and last names and phone numbers, which is sensitive information that can be leveraged for social engineering attacks. The goal is to compromise user accounts, meaning the tester needs an attack technique that effectively uses this information to trick employees into revealing credentials or taking actions that lead to account compromise. Let’s evaluate the options:
A. Smishing: Description: Smishing (SMS phishing) involves sending fraudulent text messages that appear to come from a legitimate source to trick recipients into providing sensitive information (e.g., login credentials) or clicking malicious links that could install malware or lead to phishing pages.
Why Correct:
The exposed directory provides phone numbers, which are ideal for launching smishing attacks. The tester can craft targeted text messages using employees’ names to make the messages appear legitimate (e.g., “Hi John, your corporate account needs verification. Click here to log in”). These messages can trick employees into revealing credentials or installing malware, directly leading to user account compromise. Smishing is highly effective given the availability of phone numbers and the personal nature of SMS communication.
B. Impersonation: Description: Impersonation involves pretending to be a trusted entity (e.g., IT staff or a manager) to deceive employees into providing sensitive information or performing actions that compromise security.
Why Incorrect:
While impersonation could leverage the names from the directory to make interactions seem credible, it typically relies on direct communication (e.g., phone calls, emails, or in-person interactions) rather than phone numbers alone. Without email addresses or direct access to employees, impersonation is less directly applicable than smishing, which explicitly uses phone numbers for SMS-based attacks.
C. Tailgating: Description: Tailgating involves physically following an authorized person into a restricted area to gain unauthorized access, often by exploiting social courtesy (e.g., holding a door open).
Why Incorrect:
Tailgating is a physical attack that requires the tester to be on-site and does not directly leverage the exposed directory’s information (names and phone numbers). It is unrelated to compromising user accounts in a digital context, making it ineffective for this scenario.
D. Whaling: Description: Whaling is a targeted phishing attack aimed at high-profile individuals, such as executives, to steal sensitive information or credentials.
Why Incorrect:
While whaling could use names to target specific employees, it typically involves email-based phishing rather than SMS, and the directory does not provide email addresses. Additionally, whaling focuses on high-value targets, whereas the directory likely includes all employees, making a broader smishing campaign more effective for compromising multiple user accounts.
Why Smishing is the Most Effective:
Direct Use of Phone Numbers:
The exposed directory provides phone numbers, which are the primary requirement for smishing. This makes smishing the most straightforward and effective attack to exploit the available information.
Personalized Attacks:
Including employees’ first and last names in smishing messages increases their credibility, improving the likelihood of success in tricking users into revealing credentials or clicking malicious links.
Account Compromise:
Smishing can lead to credential theft (e.g., via fake login pages) or malware installation, both of which directly facilitate compromising user accounts, aligning with the tester’s goal.
PenTest+ Context:
The CompTIA PenTest+ PT0-003 exam emphasizes social engineering techniques, including smishing, as a method to exploit exposed personal information for account compromise.
References:
CompTIA PenTest+ PT0-003 Objectives:
The exam covers social engineering attacks, including smishing, as a technique for exploiting personal information to compromise accounts.
OWASP Social Engineering:
The Open Web Application Security Project (OWASP) discusses smishing as a prevalent attack vector for leveraging phone numbers in phishing campaigns.
SANS Institute:
Resources on social engineering, such as those from SANS, highlight smishing as an effective method for targeting individuals with stolen contact information.
Question 14Choose 1
A penetration tester needs to help create a threat model of a custom application. Which of the following is the most likely framework the tester will use?
Correct answer:
D. DREAD
Explanation
The correct answer is D. DREAD because it is a classic and practical threat-modeling framework specifically designed for categorizing and prioritizing risks associated with software applications.
What is DREAD? DREAD is an acronym that stands for five key questions used to calculate a risk score for a potential threat:
Damage Potential: How great is the damage if the vulnerability is exploited?
Reproducibility: How easy is it to reproduce the attack?
Exploitability: How easy is it to launch an attack?
Affected Users: How many users are affected?
Discoverability: How easy is it to find the vulnerability?
Application to Custom Applications:
When threat modeling a custom application, the goal is to identify potential threats (e.g., "an attacker could perform SQL injection on the login form") and then systematically evaluate the risk they pose to the business. DREAD provides a simple, quantitative method to do this, making it ideal for application-focused threat modeling.
Reference to Exam Objective:
This falls under the "Planning and Scoping" domain, where understanding risk assessment and threat modeling frameworks is essential for scoping an engagement and focusing efforts on the highest-risk areas.
Analysis of Incorrect Options
A. MITRE ATT&CK:
This is a comprehensive knowledge base of adversary tactics and techniques based on real-world observations. While incredibly valuable for understanding how advanced persistent threats (APTs) operate and for mapping findings to a common framework, it is broader in scope. It is more focused on enterprise-level security postures and detecting/posturing against specific adversary behaviors than on the specific, granular threat modeling of a single custom application's code and design.
B. OSSTMM (Open Source Security Testing Methodology Manual):
This is a methodology for security testing, not specifically for threat modeling. It provides a framework for conducting operational security tests (like penetration tests) by defining rules of engagement, channels to test, and metrics. It tells you how to test, but it is not a framework for systematically identifying and ranking threats before testing begins.
C. CI/CD (Continuous Integration/Continuous Deployment):
This is a software development practice, not a threat-modeling framework. It involves automating the steps of building, testing, and deploying code. While integrating security (e.g., SAST, DAST) into a CI/CD pipeline is a best practice (DevSecOps), the pipeline itself is not a framework for analyzing threats.
In summary, while MITRE ATT&CK is a powerful framework, DREAD is the most directly applicable and commonly used framework for the specific task of modeling threats against a custom application's features and components.
Question 15Choose 1
A penetration tester wants to check the security awareness of specific workers in the company with targeted attacks. Which of the following attacks should the penetration tester perform?
Correct answer:
D. Spear phishing
Explanation
The correct answer is D. Spear phishing because it is defined as a highly targeted phishing attack directed at specific individuals or groups within an organization.
How it works:
Spear phishing emails are carefully crafted to appear legitimate to the targeted employees. They often use the target's name, position, work phone number, and other information gathered from sources like LinkedIn or the company website to build trust. The goal is to trick that specific person into clicking a malicious link, opening a malicious attachment, or revealing credentials.
Why it's correct for this scenario:
The question explicitly states the tester wants to target "specific workers." Spear phishing is the perfect social engineering attack for this purpose, as it tests whether those particular individuals can identify a sophisticated, personalized malicious email.
Reference to Exam Objective:
This falls under the "Attacks and Exploits" domain, specifically social engineering attacks. A penetration tester must know the differences between various phishing techniques.
Analysis of Incorrect Options
A. Phishing:
This is a broad-term for sending fraudulent emails to a large number of recipients indiscriminately. While it tests general awareness, it is not "targeted." A typical phishing campaign might be sent to every employee in the company (e.g., "Your password is expiring, click here"). It does not meet the requirement of testing "specific workers."
B. Tailgating:
This is a physical security attack, not a digital one. It involves an unauthorized person following an authorized person into a restricted area. While it tests employee awareness of physical security policies, it does not align with the context of a targeted attack against "specific workers" in the way the question is framed, which implies a technical/email-based attack.
C. Whaling:
This is a type of spear phishing that targets high-profile individuals like CEOs, CFOs, or other executives ("big fish"). While it is targeted, it is a subset of spear phishing. The term "specific workers" is more general and could refer to any employee, not necessarily the "whales" or top executives. Spear phishing is the broader and more accurate term for any targeted phishing against specific individuals, regardless of their rank.
In summary, Spear phishing is the most precise term for a targeted email-based social engineering attack against specific employees, making it the best choice for testing their security awareness.
Question 16Choose 1
A penetration tester is testing a power plant's network and needs to avoid disruption to the grid. Which of the following methods is most appropriate to identify vulnerabilities in the network?
Correct answer:
C. Configure a port mirror and review the network traffic.
Explanation
The correct answer is C because it represents the most passive and non-intrusive method of gathering information, which is critical when testing critical infrastructure like a power plant where any disruption could have severe consequences.
How it works:
A port mirror (also known as SPAN - Switched Port Analyzer) copies all network traffic from one or more switch ports to another port where a monitoring device is connected. The penetration tester can connect their analysis machine to this mirrored port and passively capture traffic using a tool like Wireshark or tcpdump.
Why it's most appropriate:
This method involves zero interaction with the target devices. The tester does not send any probes or packets that could potentially cause a malfunction in sensitive Industrial Control Systems (ICS) or Supervisory Control and Data Acquisition (SCADA) systems. By analyzing the traffic, the tester can identify:
Active hosts and their IP/MAC addresses.
Services and protocols in use.
Potential cleartext credentials.
Unusual network patterns that might indicate misconfigurations.
Reference to Exam Objective:
This falls under the "Planning and Scoping" and "Information Gathering" domains. It highlights the importance of selecting appropriate techniques based on the target environment's criticality and the rules of engagement, a key concept for the exam.
Analysis of Incorrect Options
A. Configure a network scanner engine and execute the scan. and D. Run a network mapper tool to get an understanding of the devices.
Why they are incorrect:
Both of these options involve active scanning. Tools like Nmap or Nessus send a large number of packets to discover hosts and probe for open ports and services. These packets can be misinterpreted by fragile ICS/SCADA devices as malicious attacks or malformed data, potentially causing them to crash, hang, or enter an error state. This could lead to the very disruption (power grid outage) the tester is mandated to avoid. They are too risky for this environment.
B. Execute a testing framework to validate vulnerabilities on the devices.
Why it's incorrect:
This is the most intrusive option. "Validating vulnerabilities" often involves exploit frameworks like Metasploit to attempt to exploit a suspected vulnerability. This carries an extremely high risk of disrupting the target system, especially if it is a critical control system with unknown stability. This step would only be considered after extensive passive and very careful active testing, and only with explicit permission for such intrusive actions, which is not implied here.
In summary, when the primary constraint is to avoid any disruption, passive traffic analysis via a port mirror is the safest and most appropriate initial method for identifying potential vulnerabilities and understanding the network landscape.
Question 17Choose 1
During a penetration test, a tester captures information about an SPN account. Which of the following attacks requires this information as a prerequisite to proceed?
Correct answer:
B. Kerberoasting
Explanation:
Kerberoasting is an attack technique that specifically requires Service Principal Name (SPN) accounts as a prerequisite. Here’s why:
In Active Directory, SPNs are used to associate a service instance with a service account.
Attackers (or penetration testers) can request service tickets for these SPNs. The tickets are encrypted with the service account’s password hash.
By capturing these tickets, the tester can attempt offline brute-force or dictionary attacks to recover the plaintext password of the service account.
This is valuable because service accounts often have elevated privileges, making them prime targets for lateral movement or privilege escalation.
Other options explained:
A. Golden Ticket
Requires access to the KRBTGT account hash, not SPN information.
C. DCShadow
Involves manipulating domain controller replication, unrelated to SPNs.
D. LSASS dumping
Extracts credentials from memory, not dependent on SPNs.
Thus, the attack that requires SPN account information is Kerberoasting.
Reference
CompTIA PenTest+ PT0-003 Exam Objectives: Domain 3.0 – Attacks and Exploits (covers Kerberoasting as a credential attack).
MITRE ATT&CK Technique T1558.003: Steal or Forge Kerberos Tickets – Kerberoasting.
Question 18Choose 1
While performing an internal assessment, a tester uses the following command: crackmapexec smb 192.168.1.0/24 -u user.txt -p Summer123@ Which of the following is the main purpose of the command?
Correct answer:
C. To perform password spraying on internal systems
Explanation:
This question asks for the main purpose of the given CrackMapExec command.
Understanding the command:
crackmapexec smb 192.168.1.0/24 -u user.txt -p Summer123@
Let’s break down each part:
crackmapexec : The tool being used
smb : The protocol to use (SMB)
192.168.1.0/24 : The target network range
-u user.txt : A file containing a list of usernames
-p Summer123@ : A single password to try
What this command does:
CrackMapExec will attempt to authenticate to every SMB server in the 192.168.1.0/24 network using every username from user.txt with the single password Summer123@.
This is the classic pattern of a password spraying attack:
One password
Many usernames
Many targets
Analysis of options:
A. To perform a pass-the-hash attack
Pass-the-hash uses password hashes (NTLM hashes), not plaintext passwords. The command uses a plaintext password (-p Summer123@), not a hash. Incorrect.
B. To perform common protocol scanning
While CrackMapExec does check if the SMB port is open, the primary purpose of this command is authentication testing, not just port scanning. Incorrect.
C. To perform password spraying on internal systems
This is exactly correct. Password spraying involves trying a single common password against many usernames across many systems to avoid account lockouts. Correct.
D. To execute a command in multiple endpoints
CrackMapExec can execute commands (using the -x parameter), but this command does not include any command to execute. It only attempts authentication. Incorrect.
Conclusion:
The command is attempting to authenticate using one password against multiple usernames across multiple hosts, which is the definition of password spraying.
Correct Answer:
C. To perform password spraying on internal systems
Question 19Choose 1
A penetration tester needs to confirm the version number of a client's web application server. Which of the following techniques should the penetration tester use?
Correct answer:
C. Banner grabbing
Explanation:
Banner grabbing is a technique used to gather information about a service running on an open port, which often includes the version number of the application or server.
Here’s why banner grabbing is the correct answer:
Banner Grabbing: It involves connecting to a service and reading the welcome banner or response, which typically includes version information. This is a direct method to identify the version number of a web application server.
SSL Certificate Inspection: While it can provide information about the server, it is not reliable for identifying specific application versions.
URL Spidering: This is used for discovering URLs and resources within a web application, not for version identification.
Directory Brute Forcing: This is used to discover hidden directories and files, not for identifying version information.
References from Pentest:
Luke HTB: Shows how banner grabbing can be used to identify the versions of services running on a server.
Writeup HTB: Demonstrates the importance of gathering version information through techniques like banner grabbing during enumeration phases.
Conclusion: Option C, banner grabbing, is the most appropriate technique for confirming the version number of a web application server.
Question 20Choose 1
During a security assessment, a penetration tester gains access to an internal server and manipulates some data to hide its presence. Which of the following is the best way for the penetration tester to hide the activities performed?
Correct answer:
A. Clear the Windows event logs.
Explanation:
The scenario describes a tester who has:
Gained access to an internal server
Manipulated data
Wants to hide evidence of activity
✅ A. Clear the Windows event logs — Correct
Windows Event Logs record:
Logins and authentication events
Privilege escalation
Process execution
Service creation
System changes
By clearing logs, the tester removes:
Evidence of access
Command execution traces
Security alerts
Timeline indicators
Common commands:
wevtutil cl Security
wevtutil cl System
wevtutil cl Application
MITRE ATT&CK:
Indicator Removal on Host (T1070)
This is the most direct method to hide activities already performed.
❌ Why the Other Options Are Wrong
B. Modify the system time
Can disrupt timelines but does not remove logged events.
Often creates suspicious inconsistencies.
C. Alter the log permissions
May prevent future logging access.
Does not remove existing evidence.
D. Reduce the log retention settings
Affects future log storage.
Does not immediately hide past activity.
🎯 PenTest+ Exam Tip
When CompTIA asks about covering tracks, think:
Clear logs ✅
Delete artifacts
Remove tools
Disable auditing
If the question focuses on immediate concealment, clearing logs is usually the best answer.
Practice Like It's Exam Day
Get exam-ready with a timed PT0 003 CompTIA PenTest+ mock exam designed to match the official exam's question format, question count, and time limit.