|
|
|
CAPEC-160: Exploit Script-Based APIs |
Description 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. Typical Severity Execution Flow Explore Identify API: Discover an API of interest by exploring application documentation or observing responses to API calls Techniques |
---|
Search via internet for known, published APIs that support scripting instructions as arguments |
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. Techniques |
---|
Create a general script to be taken as input by the API |
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. Techniques |
---|
Crafting a malicious script to be run on a system based on priveleges and capabilities of the system |
Prerequisites
The target application must include the use of APIs that execute scripts. |
The target application must allow the attacker to provide some or all of the arguments to one of these script interpretation methods and must fail to adequately filter these arguments for dangerous or unwanted script commands. |
Resources Required
None: No specialized resources are required to execute this type of attack. |
Content History Submissions |
---|
Submission Date | Submitter | Organization |
---|
2014-06-23 (Version 2.6) | CAPEC Content Team | The MITRE Corporation | | Modifications |
---|
Modification Date | Modifier | Organization |
---|
2015-12-07 (Version 2.8) | CAPEC Content Team | The MITRE Corporation | Updated Description Summary | 2017-08-04 (Version 2.11) | CAPEC Content Team | The MITRE Corporation | Updated Resources_Required | 2019-04-04 (Version 3.1) | CAPEC Content Team | The MITRE Corporation | Updated Related_Weaknesses | 2020-07-30 (Version 3.3) | CAPEC Content Team | The MITRE Corporation | Updated Related_Attack_Patterns | 2021-10-21 (Version 3.6) | CAPEC Content Team | The MITRE Corporation | Updated Execution_Flow | Previous Entry Names |
---|
Change Date | Previous Entry Name |
---|
2015-12-07 (Version 2.8) | Programming to included script-based APIs | |
More information is available — Please select a different filter.
|