This attack targets libraries or shared code modules which are vulnerable to buffer overflow attacks. An adversary who has knowledge of known vulnerable libraries or shared code can easily target software that makes use of these libraries. All clients that make use of the code library thus become vulnerable by association. This has a very broad effect on security across a system, usually affecting more than one software process.
Description
Attack Execution Flow
Step 1
Explore[Identify target application] The adversary, with knowledge of vulnerable libraries or shared code modules, identifies a target application or program that makes use of these.
[Identifica applicazione target] L'avversario, con conoscenza delle librerie vulnerabili o dei moduli di codice condiviso, identifica un'applicazione o un programma target che le utilizza.
Step 2
Experiment[Find injection vector] The adversary attempts to use the API, and if they can they send a large amount of data to see if the buffer overflow attack really does work.
Provide large input to a program or application and observe the behavior. If there is a crash, this means that a buffer overflow attack is possible.
[Trova vettore di injection] L'attore malevolo tenta di utilizzare l'API e, se riesce, invia una grande quantità di dati per verificare se l'attacco di buffer overflow funziona realmente.
Fornisci un input di grandi dimensioni a un programma o applicazione e osserva il comportamento. Se si verifica un crash, ciò significa che è possibile un attacco di buffer overflow.
Attack Techniques
-
Provide large input to a program or application and observe the behavior. If there is a crash, this means that a buffer overflow attack is possible.
Step 3
Experiment[Craft overflow content] The adversary crafts the content to be injected based on their knowledge of the vulnerability and their desired outcome. 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 will craft a set of content that not only overflows the targeted buffer but does so in such a way that the overwritten return address is replaced with one of the adversaries' choosing which points to code injected by the adversary.
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
[Craft overflow content] L'avversario crea il contenuto da iniettare in base alla propria conoscenza della vulnerabilità e al risultato desiderato. Se l'intento è semplicemente causare il crash del software, il contenuto deve consistere solo in una quantità eccessiva di dati casuali. Se l'obiettivo è sfruttare l'overflow per l'esecuzione di codice arbitrario, l'avversario realizzerà un insieme di contenuti che non solo sovrascrivono il buffer mirato, ma lo fanno in modo tale che l'indirizzo di ritorno sovrascritto venga sostituito con uno scelto dall'avversario che punta al codice iniettato dall'attaccante.
Crea shellcode dannoso che verrà eseguito quando l'esecuzione del programma ritorna a esso.
Usa un NOP-sled nel contenuto dell'overflow per facilitare il "passaggio" nel codice dannoso. Questo viene fatto affinché l'indirizzo di ritorno esatto non debba essere corretto, ma solo essere nel range di tutti i NOP.
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.
Step 4
Exploit[Overflow the buffer] Using the API as the injection vector, the adversary injects the crafted overflow content into the buffer.
[Overflow del buffer] Utilizzando l'API come vettore di injection, l'attaccante inserisce il contenuto di overflow appositamente creato nel buffer.