Free PT0-003 Exam Braindumps
CompTIA PenTest+ Questions 153–160 (page: 21)

Updated On: 20-Aug-2026

During an assessment, a penetration tester sends the following request: POST /services/v1/users/create HTTP/1.1 Host: target-application.com -Content-Type: application/json -Content-Length: [dynamic] Authorization: Bearer [FUZZE] Which of the following attacks is the penetration tester performing?

  1. Directory traversal
  2. API abuse
  3. Server-side request forgery
  4. Privilege escalation

Answer(s): B

Explanation:

The penetration tester is performing API abuse. The request POST /services/v1/users/create HTTP/1.1 indicates an attempt to create a user via an API endpoint. The presence of Authorization: Bearer [FUZZE] strongly suggests the tester is attempting to bypass or exploit authentication mechanisms within the API. Fuzzing the Authorization header with [FUZZE] implies the tester is trying different values to find vulnerabilities in how the
API handles authentication and authorization. This could include bypassing authentication altogether, escalating privileges, or exploiting weaknesses in the JWT or token validation process. Directory traversal (A) involves manipulating file paths, which isn't directly indicated by the request. Server-side request forgery (SSRF) (C) involves manipulating the server to make requests to other internal or external resources. Privilege escalation (D) might be a consequence of successful API abuse, but the immediate action is attempting to exploit the API itself. The focus on Authorization and a user creation endpoint points directly to abusing the
API for unauthorized access or functionality. The fuzzed bearer token is a common method when testing APIs.
Therefore, the most accurate answer is API abuse because the tester is actively trying to manipulate an API endpoint to potentially create a user without proper authorization by fuzzing the authentication token. This action is most directly related to finding vulnerabilities in the API layer.
Reference link for API Security:
OWASP API Security Project: https://owasp.org/www-project-api-security/



During a penetration test, the tester identifies several unused services that are listening on all targeted internal laptops:

Which of the following technical controls should the tester recommend to reduce the risk of compromise?

  1. Multifactor authentication
  2. Patch management
  3. System hardening
  4. Network segmentation

Answer(s): C

Explanation:

C: System hardening: This involves reducing a system's attack surface by disabling unnecessary services, closing unused ports, and implementing secure configurations. It is a proactive measure to make a system more resilient to various types of attacks.



Which of the following elements of a penetration test report can be used to most effectively prioritize the remediation efforts for all the findings?

  1. Methodology
  2. Detailed findings list
  3. Risk score
  4. Executive summary

Answer(s): C

Explanation:

The correct answer is C, Risk score. Here's why:
A risk score is a numerical or qualitative representation of the potential damage a vulnerability could cause, combined with the likelihood of exploitation. This calculation allows organizations to understand the true impact of each finding. Prioritizing remediation based on risk scores ensures the most critical vulnerabilities, those posing the greatest threat to the organization, are addressed first. For example, a high risk score might indicate a vulnerability that is easily exploitable and could lead to a significant data breach.
A methodology outlines the approach used during the penetration test.
While important for transparency and reproducibility, it doesn't directly inform prioritization. A detailed findings list provides comprehensive information about each vulnerability, but lacks a consolidated measure for comparative risk assessment. An executive summary provides a high-level overview, but typically lacks the granularity needed for detailed prioritization.
Risk scoring, often employing frameworks like CVSS (Common Vulnerability Scoring System) or similar custom systems, integrates vulnerability severity with contextual factors specific to the organization's environment, such as asset value and existing security controls. By focusing on risk scores, security teams can efficiently allocate resources to address the most impactful weaknesses, optimizing remediation efforts and improving the overall security posture. A risk-based approach is a standard practice in cybersecurity for efficient resource allocation.
Further research:
NIST Risk Management Framework: https://csrc.nist.gov/Projects/risk-management CVSS: https://www.first.org/cvss/



A penetration tester observes the following output from an Nmap command while attempting to troubleshoot connectivity to a Linux server.
Which of the following is the most likely reason for the connectivity issue?

  1. The SSH service is running on a different port.
  2. The SSH service is blocked by a firewall.
  3. The SSH service requires certificate authentication.
  4. The SSH service is not active.

Answer(s): A

Explanation:

the SSH service is running on a different port.
When an SSH connection fails with a "Connection refused" or similar error, it's often because the client is attempting to connect to the standard SSH port (22), but the server is listening on a different, non-standard port. This is a common security practice known as "security through obscurity," used to prevent automated bots and attackers from easily finding the service.



Which of the following methods should a physical penetration tester employ to access a rarely used door that has electronic locking mechanisms?

  1. Lock picking
  2. Impersonating
  3. Jamming
  4. Tailgating
  5. Bypassing

Answer(s): E

Explanation:

The answer is E (Bypassing). Here's why:
Bypassing generally involves circumventing a security control without breaking or exploiting it in a traditional sense. In the context of an electronic locking mechanism on a rarely used door, bypassing could involve finding a vulnerability or alternative entry method that doesn't involve picking the lock, social engineering, or force. This could be using an emergency override, finding a misconfigured setting, or exploiting a design flaw. Lock picking (A) is a relevant physical security method, but in this scenario, electronic locks are present.
While some electronic locks might be vulnerable to physical manipulation, bypassing offers a broader approach. Impersonating (B) or social engineering involves posing as someone authorized to gain access. This is a potential method, but the question specifies a "physical penetration tester" and a "rarely used door," implying a more direct technical approach. Jamming (C) might disrupt the electronic lock's functionality, but it's more likely to trigger alarms and attract attention. Also, jamming a signal is illegal in many jurisdictions. Tailgating (D) involves following an authorized person through the door. Since the door is "rarely used," finding an opportunity to tailgate would be difficult.
Bypassing, in this case, aligns best with a physical penetration test where the tester would look for weaknesses in the implementation of the electronic locking mechanism itself, such as a hidden maintenance access point, an easily manipulated emergency release, or a software flaw. A physical pen tester would be searching for such things.
Supporting Resources:
OWASP (Open Web Application Security Project) - Testing for Bypassing Authorization Schema: [ https://owasp.org/www-project-web-security-testing-guide/latest/4-Authentication_Testing/05-Testing_for_Bypassing_Authorization_Schema\] SANS Institute - Penetration Testing: [ https://www.sans.org/information-security/glossary/penetration-testing/\]



A penetration tester finds an un authenticated RCE vulnerability on a web server and wants to use it to enumerate other servers on the local network. The web server is behind a firewall that allows only an incoming connection to TCP ports 443 and 53 and unrestricted outbound TCP connections. The target web server is https://target.comptia.org.
Which of the following should the tester use to perform the task with the fewest web requests?

  1. nc -e /bin/sh -lp 53
  2. /bin/sh -c 'nc -l -p 443'
  3. nc -e /bin/sh 53
  4. /bin/sh -c 'nc 443'

Answer(s): A

Explanation:

A is correct because it utilizes a reverse shell via a DNS query over port 53, thus circumventing firewall restrictions while requiring only one outbound connection.
Reasoning for Selected Answer A:
The command nc -e /bin/sh -lp 53 facilitates a listener on port 53 (DNS), utilizing the unfiltered outbound connection to deliver a reverse shell. This approach leverages the commonity of DNS traffic, which is generally allowed through firewalls, reducing the number of web requests required to establish a shell and subsequently enumerate other servers on the local network. By operating on port 53, it exploits the established firewall rules effectively, ensuring a covert and swift execution.
Evaluation of Incorrect Options:
Option B: ./bin/sh -c 'nc -l -p 443' - This option attempts to listen on port 443, which may not be effective as firewalls typically filter inbound traffic unless specifically configured to allow it. Consequently, it won't facilitate enumeration from the target server.
Option C: nc -e /bin/sh 53 - While it tries to execute a reverse shell, it would depend on the listener being correctly set up elsewhere, failing here to provide the necessary interaction directly from the compromised web server. As such, it requires more connection complexity.
Option D: ./bin/sh -c 'nc 443' - This merely initiates a connection to port 443 without establishing any functional command for reverse shell or enumeration capabilities, leading to an unproductive request with no effective data transmission or shell acquisition.
Overall, option A is the only method that effectively balances stealth and operability under the specified restrictions, making it the most efficient in terms of web request minimization.
References:
https://www.sans.org/white-papers/40012/ https://www.owasp.org/index.php/Category:Web_Application_Penetration_Testing https://www.pentest-standard.org/index.php/Main_Page


Reference:

References:
https://www.sans.org/white-papers/40012/ https://www.owasp.org/index.php/Category:Web_Application_Penetration_Testing https://www.pentest-standard.org/index.php/Main_Page



With one day left to complete the testing phase of an engagement, a penetration tester obtains the following results from an Nmap scan:

Which of the following tools should the tester use to quickly identify a potential attack path?

  1. msfvenom
  2. SearchSploit
  3. sqlmap
  4. BeEF

Answer(s): B

Explanation:

SearchSploit.
SearchSploit is a command-line tool that acts as a local database for the Exploit-DB, a repository of public exploits. It's an essential part of the information gathering and vulnerability analysis phase of a penetration test.



A tester is working on an engagement that has evasion and stealth requirements.
Which of the following enumeration methods is the least likely to be detected by the IDS?

  1. curl https://api.shodan.io/shodan/host/search?key=&query=hostname:
  2. proxychains nmap -sV -T2
  3. for i in ; do curl -k $i; done
  4. nmap -sV -T2

Answer(s): A

Explanation:

Option A is correct because it leverages the Shodan API, which performs reconnaissance externally without generating significant traffic that could trigger IDS alerts.
Reasoning
Using the Shodan API allows for access to existing data and eliminates the need for intensive network scanning, which is often monitored by Intrusion Detection Systems (IDS). Since Shodan queries return information directly from the database rather than probing a target network, this method minimizes the footprint and visibility in the target environment. Additionally, the API supports high-level queries that avoid detection mechanisms typically employed in the scanning process.
Evaluation of Other Options
B: proxychains nmap -sV -T2 : This method employs Nmap’s service version detection and a proxy chain,
increasing the likelihood of detection. The -T2 timing template is slower, but any Nmap scan can still generate identifiable patterns that IDS can flag as suspicious activity, particularly where multiple connection attempts are made.
C: for i in ; do curl -k $i; done : This command indicates a loop intended to perform multiple cURL requests potentially derived from a list of URLs.
While cURL is less detectable than Nmap, executing multiple requests can still aggregate to a signature that IDS could recognize as suspicious behavior, especially with a significant volume of requests.
D: nmap -sV -T2 : Similar to option B, this command directly employs Nmap's service detection capabilities.
Despite the timing set to slow ( -T2 ), network scans inherently create a detectable pattern due to their probing nature. IDS systems are specifically tuned to identify these types of network scans, making this method highly visible.


Reference:

https://www.sans.org/white-papers/39338/ https://www.interhacktive.com/intrusion-detection-systems-ids/ https://www.securityweek.com/iot-vulnerabilities-exposed-shodan



Viewing page 21 of 44
Viewing questions 161 - 168 out of 372 questions


Post your Comments and Discuss CompTIA PT0-003 exam prep with other Community members:

AI Tutor AI Tutor 👋 I’m here to help!