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.
Description
Attack Execution Flow
Step 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.
[Identifica l'applicazione target] L'attore malevolo identifica un'applicazione target su cui eseguire il buffer overflow. In questo attacco, gli aggressori cercano applicazioni che utilizzano SOAP come meccanismo di comunicazione.
Step 2
Experiment[Find injection vector] The adversary identifies an injection vector to deliver the excessive content to the targeted application's buffer.
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.
[Trova vettore di injection] L'attaccante identifica un vettore di injection per consegnare il contenuto eccessivo nel buffer dell'applicazione target.
L'attaccante crea un messaggio SOAP che specifica in modo errato la dimensione del suo array, rendendola più piccola rispetto alla dimensione effettiva del contenuto di molto, e lo invia all'applicazione. Se ciò provoca un crash o un comportamento indesiderato, è probabile che questo sia un vettore di injection valido.
Attack Techniques
-
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.
Step 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.
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.
[Craft overflow content] L'attaccante crea il contenuto da iniettare. Se l'intento è semplicemente causare il crash del software, il contenuto può consistere in una quantità eccessiva di dati casuali. Se l'obiettivo è sfruttare l'overflow per l'esecuzione di codice arbitrario, l'attaccante crea il payload in modo tale che l'indirizzo di ritorno sovrascritto venga sostituito con uno a sua scelta.
Creare shellcode dannoso che verrà eseguito quando l'esecuzione del programma viene restituita a esso.
Utilizzare un NOP-sled nel contenuto dell'overflow per facilitare il "scivolamento" nel codice dannoso. Questo permette che l'indirizzo di ritorno esatto non debba essere corretto, purché rientri nell'intervallo di tutti i NOP.
L'attaccante sceglierà un tipo SOAP che consenta di inserire shellcode nel buffer quando l'array viene letto nell'applicazione.
Attack Techniques
-
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
-
Create malicious shellcode that will execute when the program execution is returned to it.IT: Utilizzare una NOP-sled nel contenuto dell'overflow per facilitare il "scivolamento" nel codice malevolo. Questo viene fatto in modo che l'indirizzo di ritorno esatto non sia necessario, basta che rientri nell'intervallo di tutte le 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.IT: Utilizzare una NOP-sled nel contenuto dell'overflow per facilitare il "scivolamento" nel codice malevolo. Questo viene fatto in modo che l'indirizzo di ritorno esatto non sia necessario, basta che rientri nell'intervallo di tutte le NOPs.
Step 4
Exploit[Overflow the buffer] Using the injection vector, the adversary sends the crafted SOAP message to the program, overflowing the buffer.
[Overflow del buffer] Utilizzando il vettore di injection, l'attore malevolo invia il messaggio SOAP manipolato al programma, causando il overflow del buffer.
Mitigations
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.
Consequences
Consequence Information
{'impacts': [], 'impacts_translate': [], 'scopes': [], 'scopes_translate': []}