An adversary exploits the temporary, insecure storage of information by monitoring the content of files used to store temp data during an application's routine execution flow. Many applications use temporary files to accelerate processing or to provide records of state across multiple executions of the application. Sometimes, however, these temporary files may end up storing sensitive information. By screening an application's temporary files, an adversary might be able to discover such sensitive information. For example, web browsers often cache content to accelerate subsequent lookups. If the content contains sensitive information then the adversary could recover this from the web cache.
Description
Attack Execution Flow
Step 1
Explore[Look for temporary files in target application] An adversary will try to discover temporary files in a target application. Knowledge of where the temporary files are being stored is important information.
[Ricerca di file temporanei nell'applicazione target] Un adversary tenterà di scoprire i file temporanei presenti in un'applicazione target. La conoscenza di dove vengono archiviati i file temporanei è un'informazione importante.
Step 2
Experiment[Attempt to read temporary files] An adversary will attempt to read any temporary files they may have discovered through normal means.
Attempt to get the file by querying the file path to a web server
Using a remote shell into an application, read temporary files and send out information remotely if necessary
Recover temporary information from a user's browser cache
[Tentativo di leggere file temporanei] Un avversario tenterà di leggere eventuali file temporanei che potrebbe aver scoperto tramite metodi normali.
Tentare di ottenere il file interrogando il percorso del file su un server web
Utilizzando una shell remota all’interno di un’applicazione, leggere i file temporanei e inviare informazioni in remoto se necessario
Recuperare informazioni temporanee dalla cache del browser di un utente
Attack Techniques
-
Recover temporary information from a user's browser cache
-
Attempt to get the file by querying the file path to a web serverIT: Recuperare informazioni temporanee dalla cache del browser di un utente
-
Using a remote shell into an application, read temporary files and send out information remotely if necessaryIT: Recuperare informazioni temporanee dalla cache del browser di un utente
Step 3
Exploit[Use function weaknesses to gain access to temporary files] If normal means to read temporary files did not work, an adversary will attempt to exploit weak temporary file functions to gain access to temporary files.
Some C functions such as tmpnam(), tempnam(), and mktemp() will create a temporary file with a unique name, but do not stop an adversary from creating a file of the same name before it is opened by the application. Because these functions do not create file names that are sufficiently random, an adversary will try to make a file of the same name, causing a collision, and possibly altering file permissions for the temporary file so that it is able to be read.
Similar to the last technique, an adversary might also create a file name collision using a linked file in a unix system such that the temporary file contents written out by the application write to a file of the adversaries choosing, allowing them to read the file contents.
[Sfruttare vulnerabilità nelle funzioni per ottenere accesso ai file temporanei] Se i metodi normali per leggere i file temporanei non funzionano, un adversary tenterà di sfruttare le vulnerabilità delle funzioni per i file temporanei per ottenere accesso ai file temporanei.
Alcune funzioni C come tmpnam(), tempnam() e mktemp() creano un file temporaneo con un nome univoco, ma non impediscono a un adversary di creare un file con lo stesso nome prima che venga aperto dall'applicazione. Poiché queste funzioni non generano nomi di file sufficientemente casuali, un adversary cercherà di creare un file con lo stesso nome, causando una collisione, e possibilmente modificando i permessi del file temporaneo in modo che possa essere letto.
Simile alla tecnica precedente, un adversary potrebbe anche creare una collisione di nomi di file utilizzando un file collegato in un sistema Unix, in modo che il contenuto del file temporaneo scritto dall'applicazione venga scritto in un file scelto dall'adversary, consentendogli di leggere il contenuto del file.
Attack Techniques
-
Some C functions such as tmpnam(), tempnam(), and mktemp() will create a temporary file with a unique name, but do not stop an adversary from creating a file of the same name before it is opened by the application. Because these functions do not create file names that are sufficiently random, an adversary will try to make a file of the same name, causing a collision, and possibly altering file permissions for the temporary file so that it is able to be read.
-
Similar to the last technique, an adversary might also create a file name collision using a linked file in a unix system such that the temporary file contents written out by the application write to a file of the adversaries choosing, allowing them to read the file contents.IT: Alcune funzioni C come tmpnam(), tempnam() e mktemp() creeranno un file temporaneo con un nome univoco, ma non impediscono a un adversary di creare un file con lo stesso nome prima che venga aperto dall'applicazione. Poiché queste funzioni non generano nomi di file sufficientemente casuali, un adversary tenterà di creare un file con lo stesso nome, causando una collisione e, possibilmente, modificando i permessi del file temporaneo in modo che possa essere letto.
Consequences
Consequence Information
{'impacts': [], 'impacts_translate': [], 'scopes': [], 'scopes_translate': []}