CAPEC-175: Code Inclusion
An adversary exploits a weakness on the target to force arbitrary code to be retrieved locally or from a remote location and executed. This differs from code injection in that code injection involves the direct inclusion of 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.
Last updated
Overview
CAPEC-175 (Code Inclusion) is a meta-level attack pattern catalogued by MITRE in the Common Attack Pattern Enumeration and Classification (CAPEC). It describes a recurring method attackers use to exploit software weaknesses.
What the attacker needs
Prerequisites
- The target application must include external code/libraries that are executed when the application runs and the adversary 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 adversary uses to identify the code to include.
Resources required
- The adversary may need the capability to host code modules if they wish their own code files to be included.
Examples
One example of this type of attack pattern 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.
Frequently asked questions
Common questions about CAPEC-175.
- What is CAPEC-175?
- An adversary exploits a weakness on the target to force arbitrary code to be retrieved locally or from a remote location and executed. This differs from code injection in that code injection involves the direct inclusion of 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.
- What weaknesses does CAPEC-175 target?
- CAPEC-175 exploits 1 CWE weakness, including CWE-829 (Inclusion of Functionality from Untrusted Control Sphere).
- How severe is CAPEC-175?
- MITRE rates CAPEC-175 as Very High severity with medium likelihood of attack.
References
Attack-pattern data is sourced from the MITRE CAPEC catalog (v3.9). Weakness associations link to the corresponding CWE entries on RadicalNotion.AI.
Defend against CAPEC-175
Track the CVEs and weaknesses attackers exploit with this technique, with AI-written analysis and remediation guidance.