nerdexam
CompTIA

PT0-002 · Question #613

A penetration tester is receiving an HTTP code 403 when using Postman to test an API directly. However, the penetration tester can normally interact with the web application when using the browser…

The correct answer is C. Configure Postman to send the session cookie. A 403 Forbidden error indicates an authorization issue, and successful interaction via a browser suggests the browser is sending necessary authentication information, likely a session cookie, which Postman is not.

Attacks and Exploits

Question

A penetration tester is receiving an HTTP code 403 when using Postman to test an API directly. However, the penetration tester can normally interact with the web application when using the browser proxy through Burp Suite. Which of the following should the penetration tester do to use Postman to test the API?

Options

  • AConfigure Burp Suite to use Postman as proxy.
  • BConfigure Postman to use Burp Suite as proxy.
  • CConfigure Postman to send the session cookie.
  • DConfigure Burp Suite to send the Content-Type: application/json header.

How the community answered

(21 responses)
  • A
    10% (2)
  • B
    5% (1)
  • C
    81% (17)
  • D
    5% (1)

Why each option

A 403 Forbidden error indicates an authorization issue, and successful interaction via a browser suggests the browser is sending necessary authentication information, likely a session cookie, which Postman is not.

AConfigure Burp Suite to use Postman as proxy.

Configuring Burp Suite to use Postman as a proxy is an incorrect proxy chain setup and not relevant to the authorization issue.

BConfigure Postman to use Burp Suite as proxy.

Configuring Postman to use Burp Suite as a proxy would only route Postman's requests through Burp but wouldn't automatically add missing authentication headers like session cookies unless manually configured.

CConfigure Postman to send the session cookie.Correct

When a browser interacts with a web application, it automatically manages and sends session cookies, which authenticate the user. A 403 Forbidden error in Postman, contrasted with successful interaction via a browser (even proxied through Burp Suite), strongly suggests that Postman is missing the required session cookie for authentication or authorization. Therefore, configuring Postman to send the correct session cookie, obtained from the successful browser interaction, would resolve the 403 error and allow API access.

DConfigure Burp Suite to send the Content-Type: application/json header.

Configuring Burp Suite to send the Content-Type: application/json header is irrelevant because the issue is with Postman directly, and the 403 error is typically an authorization issue, not a content type issue.

Concept tested: API testing, HTTP authentication (session cookies)

Source: https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies

Topics

#HTTP status codes#Session management#API testing#Web proxies

Community Discussion

No community discussion yet for this question.

Full PT0-002 Practice