PT0-002 · Question #315
While performing an assessment on a web application, a penetration tester notices the web browser creates the following request when clicking on the stock status for an item: POST /product/stock…
The correct answer is D. Server-side request forgery. The storeId=1 parameter in the POST request suggests the web application might be querying an internal resource based on this ID, making it a prime candidate for a Server-Side Request Forgery (SSRF) attack.
Question
While performing an assessment on a web application, a penetration tester notices the web browser creates the following request when clicking on the stock status for an item:
POST /product/stock HTTP/1.0 Content-Type: application/x-www-form-urlencoded Content-Length: 118 %26storeId%3D1 Which of the following types of attacks would the penetration tester most likely try NEXT?
Options
- ACross-site scripting
- BCommand injection
- CLocal file inclusion
- DServer-side request forgery
How the community answered
(47 responses)- A6% (3)
- B17% (8)
- C4% (2)
- D72% (34)
Why each option
The storeId=1 parameter in the POST request suggests the web application might be querying an internal resource based on this ID, making it a prime candidate for a Server-Side Request Forgery (SSRF) attack.
Cross-site scripting (XSS) typically involves injecting scripts into rendered content, which is not directly indicated by a storeId parameter in a POST request.
Command injection occurs when user input is executed as an operating system command; a numeric storeId parameter is less likely to be directly passed to an OS command.
Local file inclusion (LFI) involves incorporating local files based on user input, usually through parameters designed for file paths, which does not directly align with a storeId parameter.
The storeId=1 parameter in the POST request suggests the web application might be using this ID to query or interact with an internal resource or service. An attacker would likely attempt to manipulate this parameter to point to internal network addresses or arbitrary URLs, exploiting the server-side logic to perform requests on behalf of the attacker, characteristic of a Server-Side Request Forgery (SSRF) attack.
Concept tested: Web application attacks - Server-Side Request Forgery (SSRF)
Source: https://owasp.org/www-community/attacks/Server_Side_Request_Forgeries
Topics
Community Discussion
No community discussion yet for this question.