Code Inclusion |
Attack Pattern ID: 175 (Standard Attack Pattern Completeness: Stub) | Typical Severity: Very High | Status: Draft |
Summary
An attacker exploits a weakness in input validation on the target to force arbitrary code to be retrieved from a remote location and executed. This differs from script injection in that script injection involves the direct inclusion of scripting code while code inclusion involves the addition or replacement of a reference to a code file, which is subsequently loaded by the target and used as part of the code of some application. One example of this sort of attack is PHP file include attacks where the parameter of an include() function is set by a variable that an attacker is able to control. The result is that arbitrary code could be loaded into the PHP application and executed.
The target application must include external code/libraries that are executed when the application runs and the attacker must be able to influence the specific files that get included.
The victim must run the targeted application, possibly using the crafted parameters that the attacker uses to identify the code to include.
The attacker may need to be able to host code modules if they wish their own code files to be included.
Nature | Type | ID | Name | Description | View(s) this relationship pertains to |
---|---|---|---|---|---|
ChildOf | Category | 152 | Injection (Injecting Control Plane content through the Data Plane) | Mechanism of Attack (primary)1000 | |
ParentOf | Attack Pattern | 190 | Reverse Engineer an Executable to Expose Assumed Hidden Functionality or Content | Mechanism of Attack (primary)1000 | |
ParentOf | Attack Pattern | 251 | Local Code Inclusion | Mechanism of Attack (primary)1000 |