COMMON ATTACK PATTERN ENUMERATION AND CLASSIFICATIONLive MITRE record

CAPEC-230

Serialized Data with Nested Payloads

Applications often need to transform data in and out of a data format (e.g., XML and YAML) by using a parser. It may be possible for an adversary to inject data that may have an adverse effect on the parser when it is being processed. Many data format languages allow the definition of macro-like structures that can be used to simplify the creation of complex structures. By nesting these structures, causing the data to be repeatedly substituted, an adversary can cause the parser to consume more resources while processing, causing excessive memory consumption and CPU utilization.

Abstraction

Standard

Typical severity

High

Likelihood of attack

Medium

Understand the attack

What is this attack pattern?

Applications often need to transform data in and out of a data format (e.g., XML and YAML) by using a parser. It may be possible for an adversary to inject data that may have an adverse effect on the parser when it is being processed. Many data format languages allow the definition of macro-like structures that can be used to simplify the creation of complex structures. By nesting these structures, causing the data to be repeatedly substituted, an adversary can cause the parser to consume more resources while processing, causing excessive memory consumption and CPU utilization.

Extended description

An adversary's goal is to leverage parser failure to their advantage. In most cases this type of an attack will result in a Denial of Service due to an application becoming unstable, freezing, or crashing. However it may be possible to cause a crash resulting in arbitrary code execution, leading to a jump from the data plane to the control plane [ REF-89 ]. This attack is most closely associated with web services using SOAP or a Rest API, because remote service requesters can post malicious payloads to the service provider. The main weakness is that the service provider generally must inspect, parse, and validate the messages to determine routing, workflow, security considerations, and so on. It is exactly these inspection, parsing, and validation routines that this attack targets. This attack exploits the loosely coupled nature of web services, where the service provider has little to no control over the service requester and any messages the service requester sends.

Execution flow

How does the attack proceed, step by step?

1

Explore

Attack step

An adversary determines the input data stream that is being processed by a data parser that supports using substitution on the victim's side.
2

Exploit

Attack step

An adversary crafts input data that may have an adverse effect on the operation of the parser when the data is parsed on the victim's system.

Requirements

What does the attack require?

Prerequisites

  • An application's user-controllable data is expressed in a language that supports subsitution.
  • An application does not perform sufficient validation to ensure that user-controllable data is not malicious.

Skills required

Not stated in the MITRE record.

Resources required

Not stated in the MITRE record.

Detection

What are the indicators of the attack?

Bad data is passed to the data parser (possibly repeatedly), possibly making it crash or execute arbitrary code.

Impact

What does a successful attack lead to?

Resource Consumption

Affected scopes: Availability

Read Data

Affected scopes: Confidentiality

Execute Unauthorized Commands

Affected scopes: Confidentiality, Integrity, Availability

Gain Privileges

Affected scopes: Confidentiality, Access Control, Authorization

Defence

How is it prevented and mitigated?

1
Carefully validate and sanitize all user-controllable data prior to passing it to the data parser routine. Ensure that the resultant data is safe to pass to the data parser.
2
Perform validation on canonical data.
3
Pick a robust implementation of the data parser.
CAPEC-230: Serialized Data with Nested Payloads — DayBreach Saldırı Sözlüğü · DayBreach