Passed on the first try! High quality questions with accurate explanations. Highly recommended.
Every question comes with the verified correct answer and detailed rationale.
During a penetration testing engagement, a tester targets the internet-facing services used by the client. Which of the following describes the type of assessment that should be considered in this scope of work?
Correct answer: C
An external assessment focuses on testing the security of internet-facing services. Here’s why option C is correct:
External Assessment: It involves evaluating the security posture of services exposed to the internet, such as web servers, mail servers, and other public-facing infrastructure. The goal is to identify vulnerabilities that could be exploited by attackers from outside the organization’s network.
Segmentation: This type of assessment focuses on ensuring that different parts of a network are appropriately segmented to limit the spread of attacks. It’s more relevant to internal network architecture.
Mobile: This assessment targets mobile applications and devices, not general internet-facing services.
Web: While web assessments focus on web applications, the scope of an external assessment is broader and includes all types of internet-facing services.
Reference from Pentest:
Horizontall HTB: Highlights the importance of assessing external services to identify vulnerabilities that could be exploited from outside the network.
Luke HTB: Demonstrates the process of evaluating public-facing services to ensure their security. Conclusion:
Option C, External, is the most appropriate type of assessment for targeting internet-facing services used by the client.
During an engagement, a penetration tester needs to break the key for the Wi-Fi network that uses WPA2 encryption. Which of the following attacks would accomplish this objective?
Correct answer: D
KRACK (Key Reinstallation Attack) exploits a vulnerability in the WPA2 protocol to decrypt and inject packets, potentially allowing an attacker to break the encryption key and gain access to the Wi-Fi network.
Step-by-Step Explanation Understanding KRACK:
Vulnerability: KRACK exploits flaws in the WPA2 handshake process, specifically the four-way handshake.
Mechanism: The attack tricks the victim into reinstalling an already-in-use key by manipulating and replaying handshake messages.
Attack Steps:
Interception: Capture the four-way handshake packets between the client and the access point. Reinstallation: Force the client to reinstall the encryption key by replaying specific handshake messages.
Decryption: Once the key is reinstalled, it can be used to decrypt packets and potentially inject malicious packets.
Impact:
Decryption: Allows an attacker to decrypt packets, potentially revealing sensitive information. Injection: Enables the attacker to inject malicious packets into the network.
Mitigation:
Patching: Ensure all devices and access points are patched with the latest firmware that addresses KRACK vulnerabilities.
Encryption: Use additional encryption layers, such as HTTPS, to protect data in transit. Reference from Pentesting Literature:
The KRACK attack is a significant topic in wireless security and penetration testing guides, illustrating the importance of securing wireless communications.
HTB write-ups and other security assessments frequently reference KRACK when discussing vulnerabilities in WPA2.
Reference:Penetration Testing - A Hands-on Introduction to Hacking HTB Official Writeups
Which of the following post-exploitation activities allows a penetration tester to maintain persistent access in a compromised system?
Correct answer: A
Maintaining persistent access in a compromised system is a crucial goal for a penetration tester after achieving initial access. Here’s an explanation of each option and why creating registry keys is the preferred method:
Creating registry keys (Answer A):
Explanation:
Explanation: Modifying or adding specific registry keys can ensure that malicious code or backdoors are executed every time the system starts, thus maintaining persistence.
Advantages: This method is stealthy and can be effective in maintaining access over long periods, especially on Windows systems.
Example: Adding a new entry to the HKLM\Software\Microsoft\Windows\CurrentVersion\Run registry key to execute a malicious script upon system boot.
Reference: Persistence techniques involving registry keys are common in penetration tests and are highlighted in various cybersecurity resources as effective methods to maintain access.Installing a bind shell (Option B):
Explanation: A bind shell listens on a specific port and waits for an incoming connection from the attacker.
Drawbacks: This method is less stealthy and can be easily detected by network monitoring tools. It also requires an open port, which might be closed or filtered by firewalls.
Executing a process injection (Option C):
Explanation: Process injection involves injecting malicious code into a running process to evade detection.
Drawbacks: While effective for evading detection, it doesn’t inherently provide persistence. The injected code will typically be lost when the process terminates or the system reboots.
Setting up a reverse SSH connection (Option D):
Explanation: A reverse SSH connection allows the attacker to connect back to their machine from the compromised system.
Drawbacks: This method can be useful for maintaining a session but is less reliable for long-term persistence. It can be disrupted by network changes or monitoring tools.
Conclusion: Creating registry keys is the most effective method for maintaining persistent access in a compromised system, particularly in Windows environments, due to its stealthiness and reliability.