CAPEC-664

Server Side Request Forgery
2021-06-24
00h00 +00:00
Cao
Cao
Stable
2022-09-29
00h00 +00:00
Cảnh báo cho một CAPEC
Luôn được thông báo về mọi thay đổi đối với một CAPEC cụ thể.
Quản lý thông báo

Thông tin CAPEC

Luồng thực thi

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

Kỹ thuật
  • 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

Điều kiện tiên quyết

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

Kỹ năng cần thiết

The adversary will have to detect the vulnerability through an intermediary service or specify maliciously crafted URLs and analyze the server response.
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.

Tài nguyên cần thiết

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

Các biện pháp giảm thiểu

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.

Điểm yếu liên quan

CWE-ID Tên điểm yếu

CWE-918

Server-Side Request Forgery
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.

CWE-20

Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.

Tài liệu tham khảo

REF-644

OWASP SSRF Bible
https://cheatsheetseries.owasp.org/assets/Server_Side_Request_Forgery_Prevention_Cheat_Sheet_SSRF_Bible.pdf

REF-645

Server Side Request Forgery
https://portswigger.net/web-security/ssrf

REF-646

CallStranger Vulnerability
https://github.com/yunuscadirci/CallStranger

Gửi

Tên Tổ chức Ngày Ngày phát hành
CAPEC Content Team The MITRE Corporation 2021-06-24 +00:00

Sửa đổi

Tên Tổ chức Ngày Bình luận
CAPEC Content Team The MITRE Corporation 2021-10-21 +00:00 Updated Execution_Flow
CAPEC Content Team The MITRE Corporation 2022-09-29 +00:00 Updated Example_Instances