CAPEC-221 詳細資料

CAPEC-221

Data Serialization External Entities Blowup
2014-06-23
00h00 +00:00
Draft
2022-09-29
00h00 +00:00
指定 CAPEC 提醒
掌握特定 CAPEC 的任何變更。
管理通知

CAPEC 描述

This attack takes advantage of the entity replacement property of certain data serialization languages (e.g., XML, YAML, etc.) where the value of the replacement is a URI. A well-crafted file could have the entity refer to a URI that consumes a large amount of resources to create a denial of service condition. This can cause the system to either freeze, crash, or execute arbitrary code depending on the URI.

CAPEC 資訊

執行流程

1) Explore

[Find target web service] The adversary must first find a web service that takes input data in the form of a serialized language such as XML or YAML.

2) Experiment

[Host malicious file on a server] The adversary will create a web server that contains a malicious file. This file will be extremely large, so that if a web service were to try to load it, the service would most likely hang.

2) Experiment

[Craft malicious data] Using the serialization language that the web service takes as input, the adversary will craft data that links to the malicious file using an external entity reference to the URL of the file.

4) Exploit

[Send serialized data containing URI] The adversary will send specially crafted serialized data to the web service. When the web service loads the input, it will attempt to download the malicious file. Depending on the amount of memory the web service has, this could either crash the service or cause it to hang, resulting in a Denial of Service attack.

前置條件

A server that has an implementation that accepts entities containing URI values.

緩解措施

This attack may be mitigated by tweaking the XML parser to not resolve external entities. If external entities are needed, then implement a custom XmlResolver that has a request timeout, data retrieval limit, and restrict resources it can retrieve locally.
This attack may be mitigated by tweaking the serialized data parser to not resolve external entities. If external entities are needed, then implement a custom resolver that has a request timeout, data retrieval limit, and restrict resources it can retrieve locally.

相關弱點

CWE-ID 弱點名稱

CWE-611

Improper Restriction of XML External Entity Reference
The product processes an XML document that can contain XML entities with URIs that resolve to documents outside of the intended sphere of control, causing the product to embed incorrect documents into its output.

提交

名稱 機構 日期 發布日期
CAPEC Content Team The MITRE Corporation 2014-06-23 +00:00

修改記錄

名稱 機構 日期 備註
CAPEC Content Team The MITRE Corporation 2017-08-04 +00:00 Updated Related_Attack_Patterns
CAPEC Content Team The MITRE Corporation 2018-07-31 +00:00 Updated Related_Weaknesses
CAPEC Content Team The MITRE Corporation 2020-07-30 +00:00 Updated @Name, Description, Mitigations, Related_Attack_Patterns
CAPEC Content Team The MITRE Corporation 2020-12-17 +00:00 Updated Consequences, Taxonomy_Mappings
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, Related_Attack_Patterns