CAPEC-256

SOAP Array Overflow
Wysoki
Draft
2014-06-23
00h00 +00:00
2021-10-21
00h00 +00:00
Alert dla konkretnego CAPEC
Bądź na bieżąco z wszelkimi zmianami dotyczącymi konkretnego CAPEC.
Zarządzaj powiadomieniami

Opisy CAPEC

An attacker sends a SOAP request with an array whose actual length exceeds the length indicated in the request. If the server processing the transmission naively trusts the specified size, then an attacker can intentionally understate the size of the array, possibly resulting in a buffer overflow if the server attempts to read the entire data set into the memory it allocated for a smaller array.

Informacje CAPEC

Przebieg wykonania

1) Explore

[Identify target application] The adversary identifies a target application to perform the buffer overflow on. In this attack, adversaries look for applications that utilize SOAP as a communication mechanism.

2) Experiment

[Find injection vector] The adversary identifies an injection vector to deliver the excessive content to the targeted application's buffer.

Technika
  • The adversary creates a SOAP message that incorrectly specifies the size of its array to be smaller than the size of the actual content by a large margin and sends it to the application. If this causes a crash or some unintended behavior, it is likely that this is a valid injection vector.
3) Experiment

[Craft overflow content] The adversary crafts the content to be injected. If the intent is to simply cause the software to crash, the content need only consist of an excessive quantity of random data. If the intent is to leverage the overflow for execution of arbitrary code, the adversary crafts the payload in such a way that the overwritten return address is replaced with one of the adversary's choosing.

Technika
  • Create malicious shellcode that will execute when the program execution is returned to it.
  • Use a NOP-sled in the overflow content to more easily "slide" into the malicious code. This is done so that the exact return address need not be correct, only in the range of all of the NOPs
  • The adversary will choose a SOAP type that allows them to put shellcode into the buffer when the array is read into the application.
4) Exploit

[Overflow the buffer] Using the injection vector, the adversary sends the crafted SOAP message to the program, overflowing the buffer.

Wymagania wstępne

The targeted SOAP server must trust that the array size as stated in messages it receives is correct, but read through the entire content of the message regardless of the stated size of the array.

Wymagane zasoby

The attacker must be able to craft malformed SOAP messages, specifically, messages with arrays where the stated array size understates the actual size of the array in the message.

Łagodzenie

If the server either verifies the correctness of the stated array size or if the server stops processing an array once the stated number of elements have been read, regardless of the actual array size, then this attack will fail. The former detects the malformed SOAP message while the latter ensures that the server does not attempt to load more data than was allocated for.

Powiązane słabości

CWE-ID Nazwa słabości

CWE-805

Buffer Access with Incorrect Length Value
The product uses a sequential operation to read or write a buffer, but it uses an incorrect length value that causes it to access memory that is outside of the bounds of the buffer.

Odniesienia

REF-102

XML and Web Services In The News
Robin Cover, ed..
http://www.xml.org/xml/news/archives/archive.11292006.shtml

REF-103

Simple Object Access Protocol (SOAP) 1.1
http://www.w3.org/TR/2000/NOTE-SOAP-20000508/#_Toc478383522

Zgłoszenie

Nazwa Organizacja Data Data wydania
CAPEC Content Team The MITRE Corporation 2014-06-23 +00:00

Modyfikacje

Nazwa Organizacja Data Komentarz
CAPEC Content Team The MITRE Corporation 2017-08-04 +00:00 Updated Related_Attack_Patterns
CAPEC Content Team The MITRE Corporation 2019-04-04 +00:00 Updated Related_Weaknesses
CAPEC Content Team The MITRE Corporation 2020-12-17 +00:00 Updated Taxonomy_Mappings
CAPEC Content Team The MITRE Corporation 2021-10-21 +00:00 Updated Description, Execution_Flow