In this attack, the target software is given input that the adversary knows will be modified and expanded in size during processing. This attack relies on the target software failing to anticipate that the expanded data may exceed some internal limit, thereby creating a buffer overflow.
Description
Attack Execution Flow
Step 1
Explore[Identify target application] The adversary identifies a target application or program to perform the buffer overflow on. Adversaries often look for applications that accept user input and that perform manual memory management.
[Identifica applicazione target] L'avversario individua un'applicazione o un programma target su cui eseguire il buffer overflow. Gli avversari cercano spesso applicazioni che accettano input dall'utente e che gestiscono manualmente la memoria.
Step 2
Experiment[Find injection vector] The adversary identifies an injection vector to deliver the excessive content to the targeted application's buffer.
In this attack, the normal method of providing large user input does not work. The program performs bounds checking on the user input, but not the expanded user input. The adversary needs to provide input that they believe will be expanded by the program to overflow a buffer. To identify where this is possible, an adversary either needs to have knowledge of the inner workings of the program or use a disassembler and other reverse engineering tools to guide the search.
[Trova vettore di injection] L'attaccante identifica un vettore di injection per consegnare il contenuto eccessivo al buffer dell'applicazione target.
In questo attacco, il metodo normale di fornire un input utente di grandi dimensioni non funziona. Il programma esegue un controllo dei limiti sull'input utente, ma non sull'input utente espanso. L'attaccante deve fornire un input che ritiene verrà espanso dal programma per far sì che superi la capacità di un buffer. Per identificare dove ciò sia possibile, un attaccante ha bisogno di conoscere il funzionamento interno del programma o di utilizzare un disassembler e altri strumenti di reverse engineering per guidare la ricerca.
Attack Techniques
-
In this attack, the normal method of providing large user input does not work. The program performs bounds checking on the user input, but not the expanded user input. The adversary needs to provide input that they believe will be expanded by the program to overflow a buffer. To identify where this is possible, an adversary either needs to have knowledge of the inner workings of the program or use a disassembler and other reverse engineering tools to guide the search.
Step 3
Experiment[Craft overflow content] The adversary crafts the input to be given to the program. If the intent is to simply cause the software to crash, the input needs only to expand to an excessive quantity of random data. If the intent is to leverage the overflow for execution of arbitrary code, the adversary will craft input that expands in a way 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 specific files and directories on the system and then give input using path traversal shortcuts to those directories that could expand past an input buffer.
[Contenuto di overflow di craft] L'attaccante crea l'input da fornire al programma. Se l'obiettivo è semplicemente causare il crash del software, l'input deve solo espandersi a una quantità eccessiva di dati casuali. Se l'obiettivo è sfruttare l'overflow per l'esecuzione di codice arbitrario, l'attaccante creerà un input che si espande in modo tale da non solo superare il buffer mirato, ma anche da sostituire l'indirizzo di ritorno sovrascritto con uno scelto dall'attaccante che punta al codice iniettato dall'attaccante stesso.
Crea file e directory specifici sul sistema e poi fornisci input utilizzando scorciatoie di traversal del percorso verso quelle directory che potrebbero espandersi oltre un buffer di input.
Attack Techniques
-
Create specific files and directories on the system and then give input using path traversal shortcuts to those directories that could expand past an input buffer.
Step 4
Exploit[Overflow the buffer] Using the injection vector, the adversary gives the crafted input to the program, overflowing the buffer.
[Overflow del buffer] Utilizzando il vettore di injection, l'attaccante fornisce all'applicazione l'input appositamente creato, causando il overflow del buffer.