This attack targets applications and software that uses the syslog() function insecurely. If an application does not explicitely use a format string parameter in a call to syslog(), user input can be placed in the format string parameter leading to a format string injection attack. Adversaries can then inject malicious format string commands into the function call leading to a buffer overflow. There are many reported software vulnerabilities with the root cause being a misuse of the syslog() function.
Description
Attack Execution Flow
Step 1
Explore[Identify target application] The adversary identifies a target application or program to perform the buffer overflow on. In this attack, adversaries look for applications that use syslog() incorrectly.
[Identifica l'applicazione target] L'avversario identifica un'applicazione o un programma target su cui eseguire il buffer overflow. In questo attacco, gli avversari cercano applicazioni che utilizzano syslog() in modo scorretto.
Step 2
Experiment[Find injection vector] The adversary identifies an injection vector to deliver the excessive content to the targeted application's buffer. For each user-controllable input that the adversary suspects is vulnerable to format string injection, attempt to inject formatting characters such as %n, %s, etc.. The goal is to manipulate the string creation using these formatting characters.
Inject probe payload which contains formatting characters (%s, %d, %n, etc.) through input parameters.
[Trova vettore di injection] L'attore malevolo identifica un vettore di injection per consegnare il contenuto eccessivo nel buffer dell'applicazione target. Per ogni input controllabile dall'utente che l'attore sospetta sia vulnerabile a injection di stringhe di formato, tenta di iniettare caratteri di formattazione come %n, %s, ecc.. L'obiettivo è manipolare la creazione della stringa utilizzando questi caratteri di formattazione.
Inietta payload di probe contenenti caratteri di formattazione (%s, %d, %n, ecc.) attraverso i parametri di input.
Attack Techniques
-
Inject probe payload which contains formatting characters (%s, %d, %n, etc.) through input parameters.
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 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.
The formatting characters %s and %d are useful for observing memory and trying to print memory addresses. If an adversary has access to the log being written to they can observer this output and use it to help craft their attack.
The formatting character %n is useful for adding extra data onto the buffer.
[Contenuto di overflow di crafting] L'attaccante crea il contenuto da iniettare. Se l'intento è semplicemente causare il crash del software, il contenuto può consistere solo in una quantità eccessiva di dati casuali. Se l'obiettivo è sfruttare l'overflow per l'esecuzione di codice arbitrario, l'attaccante realizzerà un insieme di contenuti che non solo supera il buffer mirato, ma lo fa in modo tale che l'indirizzo di ritorno sovrascritto venga sostituito con uno scelto dall'attaccante che punta al codice iniettato dall'attaccante stesso.
I caratteri di formattazione %s e %d sono utili per osservare la memoria e tentare di stampare gli indirizzi di memoria. Se un attaccante ha accesso ai log in scrittura, può osservare questo output e usarlo per aiutare a creare il proprio attacco.
Il carattere di formattazione %n è utile per aggiungere dati extra al buffer.
Attack Techniques
-
The formatting characters %s and %d are useful for observing memory and trying to print memory addresses. If an adversary has access to the log being written to they can observer this output and use it to help craft their attack.
-
The formatting character %n is useful for adding extra data onto the buffer.IT: I caratteri di formattazione %s e %d sono utili per osservare la memoria e tentare di stampare gli indirizzi di memoria. Se un adversary ha accesso ai log in fase di scrittura, può osservare questo output e usarlo per aiutare a pianificare il proprio attacco.
Step 4
Exploit[Overflow the buffer] Using the injection vector, the adversary supplies the program with the crafted format string injection, causing a buffer.
[Overflow del buffer] Utilizzando il vettore di injection, l'attaccante fornisce al programma la stringa di formato manipolata, causando un overflow del buffer.