CAPECattack pattern

CAPEC-679 Exploitation of Improperly Configured or Implemented Memory Protections

Very High Official page ↗
Abstraction
Detailed
Status
Draft
Likelihood of attack
Medium
Typical severity
Very High
CAPEC version
3.9

Description

An adversary takes advantage of missing or incorrectly configured access control within memory to read/write data or inject malicious code into said memory.

Extended description

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.

Prerequisites

• Access to the hardware being leveraged.

Skills required

• [Medium] Ability to craft malicious code to inject into the memory region. • [High] Intricate knowledge of memory structures.

Consequences

• Integrity: Modify Data • Confidentiality: Read Data • Confidentiality, Integrity, Availability: Execute Unauthorized Commands • Confidentiality, Access Control, Authorization: Gain Privileges

Mitigations

• 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.

Related

Child of · CAPEC (2)

  • CAPEC-1 Accessing Functionality Not Properly Constrained by ACLs attack pattern
  • CAPEC-180 Exploiting Incorrectly Configured Access Control Security Levels attack pattern

Weakness · CWE (9)

  • CWE-1222 Insufficient Granularity of Address Regions Protected by Register Locks weakness
  • CWE-1252 CPU Hardware Not Configured to Support Exclusivity of Write and Execute Operations weakness
  • CWE-1257 Improper Access Control Applied to Mirrored or Aliased Memory Regions weakness
  • CWE-1260 Improper Handling of Overlap Between Protected Memory Ranges weakness
  • CWE-1274 Improper Access Control for Volatile Memory Containing Boot Code weakness
  • CWE-1282 Assumed-Immutable Data is Stored in Writable Memory weakness
  • CWE-1312 Missing Protection for Mirrored Regions in On-Chip Fabric Firewall weakness
  • CWE-1316 Fabric-Address Map Allows Programming of Unwarranted Overlaps of Protected and Unprotected Ranges weakness
  • CWE-1326 Missing Immutable Root of Trust in Hardware weakness

Referenced by CWE · attack pattern (9)

  • CWE-1222 Insufficient Granularity of Address Regions Protected by Register Locks weakness
  • CWE-1252 CPU Hardware Not Configured to Support Exclusivity of Write and Execute Operations weakness
  • CWE-1257 Improper Access Control Applied to Mirrored or Aliased Memory Regions weakness
  • CWE-1260 Improper Handling of Overlap Between Protected Memory Ranges weakness
  • CWE-1274 Improper Access Control for Volatile Memory Containing Boot Code weakness
  • CWE-1282 Assumed-Immutable Data is Stored in Writable Memory weakness
  • CWE-1312 Missing Protection for Mirrored Regions in On-Chip Fabric Firewall weakness
  • CWE-1316 Fabric-Address Map Allows Programming of Unwarranted Overlaps of Protected and Unprotected Ranges weakness
  • CWE-1326 Missing Immutable Root of Trust in Hardware weakness