CAPEC-679: Exploitation of Improperly Configured or Implemented Memory Protections
An adversary takes advantage of missing or incorrectly configured access control within memory to read/write data or inject malicious code into said memory.
Last updated
Overview
Hardware product designs often need to implement memory protection features to prevent users from reading and modifying memory reserved for security operations such as secure booting, authenticating code, device attestation, and more. However, these protection features may be missing if not configured by developers. For example, this can occur if the developers assume these features are configured elsewhere. Additionally, developers often attempt to impose proper protection features, but may incorrectly configure these controls. One such example would be setting controls with insufficient granularity for protected address regions. If an adversary is able to discover improper access controls surrounding memory, it could result in the adversary obtaining sensitive data, executing code, circumventing security mechanisms, escalating privileges, or even denying service to higher privilege software.
What the attacker needs
Prerequisites
- Access to the hardware being leveraged.
Skills required
- Medium skill: Ability to craft malicious code to inject into the memory region.
- High skill: Intricate knowledge of memory structures.
Consequences
What a successful CAPEC-679 attack can achieve.
Modify Data
Affects: Integrity
Read Data
Affects: Confidentiality
Execute Unauthorized Commands
Affects: Confidentiality, Integrity, Availability
Run Arbitrary Code
Gain Privileges
Affects: Confidentiality, Access Control, Authorization
How to mitigate it
Defenses that reduce the risk of CAPEC-679.
- Ensure that protected and unprotected memory ranges are isolated and do not overlap.
- If memory regions must overlap, leverage memory priority schemes if memory regions can overlap.
- Ensure that original and mirrored memory regions apply the same protections.
- Ensure immutable code or data is programmed into ROM or write-once memory.
Examples
A hardware product contains non-volatile memory, which itself contains boot code that is insufficiently protected. An adversary then modifies this memory to either bypass the secure boot process or to execute their own code.
A hardware product leverages a CPU that does not possess a memory-protection unit (MPU) and a memory-management unit (MMU) nor a special bit to support write exclusivity, resulting in no write exclusivity. Because of this, an adversary is able to inject malicious code into the memory and later execute it to achieve the desired outcome.
Frequently asked questions
Common questions about CAPEC-679.
- What is CAPEC-679?
- An adversary takes advantage of missing or incorrectly configured access control within memory to read/write data or inject malicious code into said memory.
- How do you prevent CAPEC-679?
- Ensure that protected and unprotected memory ranges are isolated and do not overlap.
- What weaknesses does CAPEC-679 target?
- CAPEC-679 exploits 9 CWE weaknesses, including CWE-1222 (Insufficient Granularity of Address Regions Protected by Register Locks), CWE-1252 (CPU Hardware Not Configured to Support Exclusivity of Write and Execute Operations), CWE-1257 (Improper Access Control Applied to Mirrored or Aliased Memory Regions) and CWE-1260 (Improper Handling of Overlap Between Protected Memory Ranges).
- How severe is CAPEC-679?
- MITRE rates CAPEC-679 as Very High severity with medium likelihood of attack.
Sources
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-679
Track the CVEs and weaknesses this technique exploits, with AI-written analysis and remediation steps.