CAPECattack pattern

CAPEC-251 Local Code Inclusion

Medium Official page ↗
Abstraction
Standard
Status
Stable
Typical severity
Medium
CAPEC version
3.9

Description

The attacker forces an application to load arbitrary code files from the local machine. The attacker could use this to try to load old versions of library files that have known vulnerabilities, to load files that the attacker placed on the local machine during a prior attack, or to otherwise change the functionality of the targeted application in unexpected ways.

Prerequisites

• The targeted application must have a bug that allows an adversary to control which code file is loaded at some juncture. • Some variants of this attack may require that old versions of some code files be present and in predictable locations.

Consequences

• Integrity: Execute Unauthorized Commands • Confidentiality: Read Data

Mitigations

• Implementation: Avoid passing user input to filesystem or framework API. If necessary to do so, implement a specific, allowlist approach.

Related

Att&ck technique · MITRE ATT&CK (1)

  • T1055 Process Injection technique

Child of · CAPEC (1)

Weakness · CWE (1)

  • CWE-829 Inclusion of Functionality from Untrusted Control Sphere weakness

Referenced by CAPEC · child of (3)

  • CAPEC-252 PHP Local File Inclusion attack pattern
  • CAPEC-640 Inclusion of Code in Existing Process attack pattern
  • CAPEC-660 Root/Jailbreak Detection Evasion via Hooking attack pattern

Referenced by CWE · attack pattern (1)

  • CWE-829 Inclusion of Functionality from Untrusted Control Sphere weakness