CompTIA PenTest+ PT0-003 Practice Test 58
Question 570
A template engine fetches file content from user-controlled include paths under a privileged web process. The reviewer asks for the underlying reason, not a list of tools. Which technical distinction makes the selected approach appropriate?
- Untrusted file paths can expose local data or load unintended resources
- Misconfigured certificate services can create unintended authentication trust paths
- Resource identifiers do not replace per-record access checks
- Server-side URL retrieval can cross network boundaries on behalf of a user
Explanation
Correct Answer
A:Untrusted file paths can expose local data or load unintended resources. It directly supports Restrict file inclusion to known local templates and prohibit remote includes under the scenario constraints.
Incorrect Answers
B:Misconfigured certificate services can create unintended authentication trust paths. That applies when a test domain has a certificate enrollment template with excessive requester rights. It does not establish the particular requirement here.
C:Resource identifiers do not replace per-record access checks. That applies when a user can change an invoice number in an API request and receive another customer's record despite normal authentication. It does not establish the particular requirement here.
D:Server-side URL retrieval can cross network boundaries on behalf of a user. That applies when an image-fetch API accepts an arbitrary URL and can be used to request private network destinations. It does not establish the particular requirement here.
Question 571
A template engine fetches file content from user-controlled include paths under a privileged web process. A reviewer instead suggests: "Trust a remote include because it ends in .html." Why is that proposed shortcut insufficient?
- Client-side presentation changes do not enforce filesystem restrictions
- Filename suffixes do not establish content trust
- Interface obscurity does not sever a fixed session token
- Disruptive layer-two manipulation is unnecessary to evaluate isolation
Explanation
Correct Answer
B:Filename suffixes do not establish content trust. The named proposal is Trust a remote include because it ends in .html, which leaves the original requirement unresolved; use Restrict file inclusion to known local templates and prohibit remote includes instead.
Incorrect Answers
A:Client-side presentation changes do not enforce filesystem restrictions. That reasoning concerns the different shortcut Remove path separators from the UI only in the case A static download endpoint resolves user-supplied paths without constraining them to the intended documents directory.
C:Interface obscurity does not sever a fixed session token. That reasoning concerns the different shortcut Make the login form harder to find in the case A web portal reuses the same session identifier before and after login, allowing an attacker-set identifier to remain active.
D:Disruptive layer-two manipulation is unnecessary to evaluate isolation. That reasoning concerns the different shortcut Attempt switch flooding during business hours in the case A network team claims VLAN separation is complete because hosts have different VLAN IDs.
Question 572
A template engine fetches file content from user-controlled include paths under a privileged web process. The approved step is complete and the client requests proof. Which observation best validates the intended outcome?
- The app renders approved templates and rejects external or out-of-root paths
- Test users can export only their entitled bounded dataset
- The plan maps the chosen target to business processes and escalation contacts
- Private and metadata endpoints are blocked while approved images still load
Explanation
Correct Answer
A:The app renders approved templates and rejects external or out-of-root paths. That validates Restrict file inclusion to known local templates and prohibit remote includes without relying on an unsupported or out-of-scope conclusion.
Incorrect Answers
B:Test users can export only their entitled bounded dataset. This validates Apply authorization, rate limits and export controls to the API in the separate situation An API accepts unlimited data exports from a low-privilege user and has no pagination or per-user quota. It does not verify this case.
C:The plan maps the chosen target to business processes and escalation contacts. This validates Align test priority with asset criticality and dependency impact in the separate situation A test team can choose between a minor demo server and the organization's high-value identity service within the same signed scope. It does not verify this case.
D:Private and metadata endpoints are blocked while approved images still load. This validates Treat the feature as an SSRF risk and restrict egress and allowed destinations in the separate situation An image-fetch API accepts an arbitrary URL and can be used to request private network destinations. It does not verify this case.
Question 573
An API accepts unlimited data exports from a low-privilege user and has no pagination or per-user quota. What should the assessor recommend?
- Use canonical path validation and approved directory allowlists
- Add an HTTP cache without checking privileges
- Treat the feature as an SSRF risk and restrict egress and allowed destinations
- Apply authorization, rate limits and export controls to the API
Explanation
Correct Answer
D:Apply authorization, rate limits and export controls to the API. API abuse can reveal excessive data even when individual requests are syntactically valid. The relevant evidence is that test users can export only their entitled bounded dataset.
Incorrect Answers
A:Use canonical path validation and approved directory allowlists. This would address a different authorized case: A static download endpoint resolves user-supplied paths without constraining them to the intended documents directory. Directory traversal risk arises when path resolution escapes the intended root.
B:Caching does not enforce per-user data access or quota. The proposed shortcut does not satisfy the exact condition in this case.
C:Treat the feature as an SSRF risk and restrict egress and allowed destinations. This would address a different authorized case: An image-fetch API accepts an arbitrary URL and can be used to request private network destinations. Server-side URL retrieval can cross network boundaries on behalf of a user.
Question 574
An API accepts unlimited data exports from a low-privilege user and has no pagination or per-user quota. The reviewer asks for the underlying reason, not a list of tools. Which security property most directly supports the recommendation?
- Correct cryptographic and claim validation is required before authorizing token claims
- VLAN tags alone do not prove trunk configurations prevent boundary crossing
- Ambient browser cookies do not by themselves establish user intent for a state change
- API abuse can reveal excessive data even when individual requests are syntactically valid
Explanation
Correct Answer
D:API abuse can reveal excessive data even when individual requests are syntactically valid. It directly supports Apply authorization, rate limits and export controls to the API under the scenario constraints.
Incorrect Answers
A:Correct cryptographic and claim validation is required before authorizing token claims. That applies when a web backend accepts a JSON Web Token with an unexpected signing algorithm and does not verify its issuer correctly. It does not establish the particular requirement here.
B:VLAN tags alone do not prove trunk configurations prevent boundary crossing. That applies when a network team claims VLAN separation is complete because hosts have different VLAN IDs. It does not establish the particular requirement here.
C:Ambient browser cookies do not by themselves establish user intent for a state change. That applies when a banking web app changes beneficiary details based on a cookie-authenticated request but lacks a request-specific anti-CSRF control. It does not establish the particular requirement here.
Question 575
An API accepts unlimited data exports from a low-privilege user and has no pagination or per-user quota. A reviewer instead suggests: "Add an HTTP cache without checking privileges." Why is that proposed shortcut insufficient?
- Caching does not enforce per-user data access or quota
- Hiding errors does not prevent crafted input changing a dynamic query
- Readable token claims are not authenticated without signature validation
- A new resource name does not revoke anonymous access
Explanation
Correct Answer
A:Caching does not enforce per-user data access or quota. The named proposal is Add an HTTP cache without checking privileges, which leaves the original requirement unresolved; use Apply authorization, rate limits and export controls to the API instead.
Incorrect Answers
B:Hiding errors does not prevent crafted input changing a dynamic query. That reasoning concerns the different shortcut Disable database error text as the only fix in the case An authorized staging API dynamically concatenates request parameters into an SQL query and returns unfiltered database errors.
C:Readable token claims are not authenticated without signature validation. That reasoning concerns the different shortcut Decode the JWT payload and trust its fields in the case A web backend accepts a JSON Web Token with an unexpected signing algorithm and does not verify its issuer correctly.
D:A new resource name does not revoke anonymous access. That reasoning concerns the different shortcut Rename the bucket without changing permissions in the case A cloud storage account is unintentionally readable anonymously although the business data is confidential.
Question 576
An API accepts unlimited data exports from a low-privilege user and has no pagination or per-user quota. The approved step is complete and the client requests proof. What outcome would most directly verify the finding or mitigation?
- Test users can export only their entitled bounded dataset
- A test object outside the allowed schema is rejected without side effects
- The read-only test identity can invoke only the authorized helper action
- Private and metadata endpoints are blocked while approved images still load
Explanation
Correct Answer
A:Test users can export only their entitled bounded dataset. That validates Apply authorization, rate limits and export controls to the API without relying on an unsupported or out-of-scope conclusion.
Incorrect Answers
B:A test object outside the allowed schema is rejected without side effects. This validates Replace unsafe object deserialization with strict data schemas in the separate situation A service processes untrusted serialized objects with a runtime capable of instantiating arbitrary application classes. It does not verify this case.
C:The read-only test identity can invoke only the authorized helper action. This validates Document least-privilege sudo rule changes and test the permitted command boundary in the separate situation A Linux lab service runs a privileged helper through an overly broad sudo rule that permits unexpected commands. It does not verify this case.
D:Private and metadata endpoints are blocked while approved images still load. This validates Treat the feature as an SSRF risk and restrict egress and allowed destinations in the separate situation An image-fetch API accepts an arbitrary URL and can be used to request private network destinations. It does not verify this case.
Question 577
A web portal reuses the same session identifier before and after login, allowing an attacker-set identifier to remain active. What is the most appropriate next step?
- Rotate session identifiers on authentication and apply secure cookie controls
- Classify SQL injection risk and implement parameterized query execution
- Enforce an allowlist of trusted JWT algorithms, keys and issuer/audience claims
- Make the login form harder to find
Explanation
Correct Answer
A:Rotate session identifiers on authentication and apply secure cookie controls. Session fixation risks arise when a known pre-login token becomes authenticated. The relevant evidence is that a pre-login token is invalidated after a successful sign-in.
Incorrect Answers
B:Classify SQL injection risk and implement parameterized query execution. This would address a different authorized case: An authorized staging API dynamically concatenates request parameters into an SQL query and returns unfiltered database errors. Input must remain data rather than altering a database statement's structure.
C:Enforce an allowlist of trusted JWT algorithms, keys and issuer/audience claims. This would address a different authorized case: A web backend accepts a JSON Web Token with an unexpected signing algorithm and does not verify its issuer correctly. Correct cryptographic and claim validation is required before authorizing token claims.
D:Interface obscurity does not sever a fixed session token. The proposed shortcut does not satisfy the exact condition in this case.
Question 578
A web portal reuses the same session identifier before and after login, allowing an attacker-set identifier to remain active. The reviewer asks for the underlying reason, not a list of tools. Which security property most directly supports the recommendation?
- Directory traversal risk arises when path resolution escapes the intended root
- Session fixation risks arise when a known pre-login token becomes authenticated
- CVE identifies a particular disclosed flaw; CWE categorizes classes of insecure design
- Command injection occurs when data becomes part of command interpretation
Explanation
Correct Answer
B:Session fixation risks arise when a known pre-login token becomes authenticated. It directly supports Rotate session identifiers on authentication and apply secure cookie controls under the scenario constraints.
Incorrect Answers
A:Directory traversal risk arises when path resolution escapes the intended root. That applies when a static download endpoint resolves user-supplied paths without constraining them to the intended documents directory. It does not establish the particular requirement here.
C:CVE identifies a particular disclosed flaw; CWE categorizes classes of insecure design. That applies when an analyst confuses the identifier of a disclosed vulnerability with the weakness class that caused it. It does not establish the particular requirement here.
D:Command injection occurs when data becomes part of command interpretation. That applies when an image-processing web endpoint passes a filename to a shell command without safe argument separation. It does not establish the particular requirement here.
Question 579
A web portal reuses the same session identifier before and after login, allowing an attacker-set identifier to remain active. A reviewer instead suggests: "Make the login form harder to find." Which risk would that shortcut leave unresolved?
- Interface obscurity does not sever a fixed session token
- Untrusted input should not select privileged server network destinations
- Stealing accounts is unnecessary to establish deprecated protocol support
- A valid cookie cannot prove the user deliberately initiated a request
Explanation
Correct Answer
A:Interface obscurity does not sever a fixed session token. The named proposal is Make the login form harder to find, which leaves the original requirement unresolved; use Rotate session identifiers on authentication and apply secure cookie controls instead.
Incorrect Answers
B:Untrusted input should not select privileged server network destinations. That reasoning concerns the different shortcut Trust the URL because the client submitted it in the case An image-fetch API accepts an arbitrary URL and can be used to request private network destinations.
C:Stealing accounts is unnecessary to establish deprecated protocol support. That reasoning concerns the different shortcut Run credential harvesting to prove weak encryption in the case An approved lab demonstrates a web service configured with outdated transport encryption.
D:A valid cookie cannot prove the user deliberately initiated a request. That reasoning concerns the different shortcut Check only whether the user has a valid session in the case A banking web app changes beneficiary details based on a cookie-authenticated request but lacks a request-specific anti-CSRF control.
Question 580
A web portal reuses the same session identifier before and after login, allowing an attacker-set identifier to remain active. The approved step is complete and the client requests proof. What evidence should the client request at review?
- A pre-login token is invalidated after a successful sign-in
- A safe relative-path probe cannot retrieve a test file outside the document root
- The lab result records accepted packet classes and zero production impact
- A harmless test parameter cannot change SQL query logic after remediation
Explanation
Correct Answer
A:A pre-login token is invalidated after a successful sign-in. That validates Rotate session identifiers on authentication and apply secure cookie controls without relying on an unsupported or out-of-scope conclusion.
Incorrect Answers
B:A safe relative-path probe cannot retrieve a test file outside the document root. This validates Use canonical path validation and approved directory allowlists in the separate situation A static download endpoint resolves user-supplied paths without constraining them to the intended documents directory. It does not verify this case.
C:The lab result records accepted packet classes and zero production impact. This validates Use approved bounded packet-construction tests on an isolated target in the separate situation A test protocol is rejecting malformed packets and the tester needs to assess parsing robustness safely. It does not verify this case.
D:A harmless test parameter cannot change SQL query logic after remediation. This validates Classify SQL injection risk and implement parameterized query execution in the separate situation An authorized staging API dynamically concatenates request parameters into an SQL query and returns unfiltered database errors. It does not verify this case.