An adversary exploits a weakness in the way an application searches for external libraries to manipulate the execution flow to point to an adversary supplied library or code base. This pattern of attack allows the adversary to compromise the application or server via the execution of unauthorized code. An application typically makes calls to functions that are a part of libraries external to the application. These libraries may be part of the operating system or they may be third party libraries. If an adversary can redirect an application's attempts to access these libraries to other libraries that the adversary supplies, the adversary will be able to force the targeted application to execute arbitrary code. This is especially dangerous if the targeted application has enhanced privileges. Access can be redirected through a number of techniques, including the use of symbolic links, search path modification, and relative path manipulation.
Description
Attack Execution Flow
Step 1
Explore[Identify Target] The adversary identifies the target application and determines what libraries are being used.
Find public source code and identify library dependencies.
Gain access to the system hosting the application and look for libraries in common locations.
[Identifica Obiettivo] L'attore malevolo identifica l'applicazione target e determina quali librerie vengono utilizzate.
Trova codice sorgente pubblico e identifica le dipendenze delle librerie.
Ottieni accesso al sistema che ospita l'applicazione e cerca le librerie nelle posizioni comuni.
Attack Techniques
-
Find public source code and identify library dependencies.
-
Gain access to the system hosting the application and look for libraries in common locations.IT: Trova il codice sorgente pubblico e identifica le dipendenze delle librerie.
Step 2
Experiment[Deploy Malicious Libraries] The adversary crafts malicious libraries and deploys them on the system where the application is running, or in a remote location that can be loaded by the application.
[Deploy Malicious Libraries] L'avversario crea librerie dannose e le distribuisce sul sistema in cui l'applicazione è in esecuzione, o in una posizione remota che può essere caricata dall'applicazione.
Step 3
Exploit[Redirect Library Calls to Malicious Library] Once the malicious library crafted by the adversary is deployed, the adversary will manipulate the flow of the application such that it calls the malicious library. This can be done in a variety of ways based on how the application is loading and calling libraries.
Poison the DNS cache of the system so that it loads a malicious library from a remote location hosted by the adversary instead of the legitimate location
Create a symlink that tricks the application into thinking that a malicious library is the legitimate library.
Use DLL side-loading to place a malicious verison of a DLL in the windows directory.
[Reindirizzamento delle chiamate alle librerie verso librerie dannose] Una volta distribuita la libreria dannosa creata dall’attaccante, quest’ultimo manipolerà il flusso dell’applicazione in modo che essa chiami la libreria dannosa. Ciò può essere realizzato in diversi modi, a seconda di come l’applicazione carica e utilizza le librerie.
Inquinare la cache DNS del sistema in modo che carichi una libreria dannosa da una posizione remota ospitata dall’attaccante invece che dalla posizione legittima
Creare un symlink che inganni l’applicazione facendole credere che una libreria dannosa sia quella legittima.
Utilizzare il DLL side-loading per posizionare una versione dannosa di un DLL nella directory di Windows.
Attack Techniques
-
Create a symlink that tricks the application into thinking that a malicious library is the legitimate library.
-
Poison the DNS cache of the system so that it loads a malicious library from a remote location hosted by the adversary instead of the legitimate locationIT: Crea un symlink che inganni l'applicazione facendole credere che una libreria dannosa sia la libreria legittima.
-
Use DLL side-loading to place a malicious verison of a DLL in the windows directory.IT: Crea un symlink che inganni l'applicazione facendole credere che una libreria dannosa sia la libreria legittima.