Some APIs support scripting instructions as arguments. Methods that take scripted instructions (or references to scripted instructions) can be very flexible and powerful. However, if an attacker can specify the script that serves as input to these methods they can gain access to a great deal of functionality. For example, HTML pages support <script> tags that allow scripting languages to be embedded in the page and then interpreted by the receiving web browser. If the content provider is malicious, these scripts can compromise the client application. Some applications may even execute the scripts under their own identity (rather than the identity of the user providing the script) which can allow attackers to perform activities that would otherwise be denied to them.
Description
Attack Execution Flow
Step 1
Explore[Identify API] Discover an API of interest by exploring application documentation or observing responses to API calls
Search via internet for known, published APIs that support scripting instructions as arguments
[Identifica API] Scopri un'API di interesse esplorando la documentazione dell'applicazione o osservando le risposte alle chiamate API
Cerca su internet API conosciute e pubblicate che supportano istruzioni di scripting come argomenti
Attack Techniques
-
Search via internet for known, published APIs that support scripting instructions as arguments
Step 2
Experiment[Test simple script] Adversaries will attempt to give a smaller script as input to the API, such as simply printing to the console, to see if the attack is viable.
Create a general script to be taken as input by the API
[Test semplice script] Gli avversari tenteranno di fornire come input all'API uno script più piccolo, come semplicemente stampare sulla console, per verificare se l'attacco è praticabile.
Creare uno script generico da fornire come input all'API
Attack Techniques
-
Create a general script to be taken as input by the API
Step 3
Exploit[Give malicious scripting instructions to API] Adversaries will now craft custom scripts to do malicious behavior. Depending on the setup of the application this script could be run with user or admin level priveleges.
Crafting a malicious script to be run on a system based on priveleges and capabilities of the system
[Forni istruzioni di scripting malevolo all'API] Gli avversari creeranno ora script personalizzati per compiere comportamenti dannosi. A seconda della configurazione dell'applicazione, questo script potrebbe essere eseguito con privilegi utente o amministratore.
Creazione di uno script malevolo da eseguire su un sistema in base ai privilegi e alle capacità del sistema
Attack Techniques
-
Crafting a malicious script to be run on a system based on priveleges and capabilities of the system
Consequences
Consequence Information
{'impacts': [], 'impacts_translate': [], 'scopes': [], 'scopes_translate': []}