CAPEC-664: Server Side Request Forgery

Standard Stable 严重程度: High 攻击可能性: High

CAPEC版本: 3.9

更新日期: 2023-01-24

攻击模式描述

执行流程

步骤 1 Explore

[Find target application] Find target web application that accepts a user input and retrieves data from the server

步骤 2 Experiment

[Examine existing application requests] Examine HTTP/GET requests to view the URL query format. Adversaries test to see if this type of attack is possible through weaknesses in an application's protection to Server Side Request Forgery

技术:
  • Attempt manipulating the URL to retrieve an error response/code from the server to determine if URL/request validation is done.
  • Use a list of XSS probe strings to specify as parameters to known URLs. If possible, use probe strings with unique identifiers.
  • Create a GET request with a common server file path such as /etc/passwd as a parameter and examine output.
步骤 3 Exploit

[Malicious request] Adversary crafts a malicious URL request that assumes the privilege level of the server to query internal or external network services and sends the request to the application

前提条件

  • Server must be running a web application that processes HTTP requests.

所需技能

Medium The adversary will have to detect the vulnerability through an intermediary service or specify maliciously crafted URLs and analyze the server response.
High The adversary will be required to access internal resources, extract information, or leverage the services running on the server to perform unauthorized actions such as traversing the local network or routing a reflected TCP DDoS through them.

所需资源

  • [None] No specialized resources are required to execute this type of attack.

后果影响

影响范围: Integrity Confidentiality Availability

技术影响: Modify Data

影响范围: Confidentiality

技术影响: Read Data

影响范围: Availability

技术影响: Resource Consumption

缓解措施

Handling incoming requests securely is the first line of action to mitigate this vulnerability. This can be done through URL validation.

Further down the process flow, examining the response and verifying that it is as expected before sending would be another way to secure the server.

Allowlist the DNS name or IP address of every service the web application is required to access is another effective security measure. This ensures the server cannot make external requests to arbitrary services.

Requiring authentication for local services adds another layer of security between the adversary and internal services running on the server. By enforcing local authentication, an adversary will not gain access to all internal services only with access to the server.

Enforce the usage of relevant URL schemas. By limiting requests be made only through HTTP or HTTPS, for example, attacks made through insecure schemas such as file://, ftp://, etc. can be prevented.

关键信息

CAPEC ID: CAPEC-664

抽象级别: Standard

状态: Stable

典型严重程度: High

攻击可能性: High

相关攻击模式
相关CWE弱点