CAPEC-540: Overread Buffers
An adversary attacks a target by providing input that causes an application to read beyond the boundary of a defined buffer. This typically occurs when a value influencing where to start or stop reading is set to reflect positions outside of the valid memory location of the buffer. This type of attack may result in exposure of sensitive information, a system crash, or arbitrary code execution.
Last updated
Overview
CAPEC-540 (Overread Buffers) is a standard-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.
How the attack works
The phases an attacker typically follows.
- Step 1Explore
[Identify target application] The adversary identifies a target application or program to perform the buffer overread on. Adversaries often look for applications that accept user input and that perform manual memory management.
- Step 2Experiment
[Find attack vector] The adversary identifies an attack vector by looking for areas in the application where they can specify to read more data than is required.
- Step 3Exploit
[Overread the buffer] The adversary provides input to the application that gets it to read past the bounds of a buffer, possibly revealing sensitive information that was not intended to be given to the adversary.
What the attacker needs
Prerequisites
- For this type of attack to be successful, a few prerequisites must be met. First, the targeted software must be written in a language that enables fine grained buffer control. (e.g., c, c++) Second, the targeted software must actually perform buffer operations and inadequately perform bounds-checking on those buffer operations. Finally, the adversary must have the capability to influence the input that guides these buffer operations.
Consequences
What a successful CAPEC-540 attack can achieve.
Read Data
Affects: Confidentiality
By reading outside the boundary of the intended buffer, the adversary is potentially able to see any data that is stored on the disk. This could include secret keys, personal information, and sensitive files.
Unreliable Execution
Affects: Availability
Depending on the use of the target buffer, an application or system crash can be achieved.
Frequently asked questions
Common questions about CAPEC-540.
- What is CAPEC-540?
- An adversary attacks a target by providing input that causes an application to read beyond the boundary of a defined buffer. This typically occurs when a value influencing where to start or stop reading is set to reflect positions outside of the valid memory location of the buffer. This type of attack may result in exposure of sensitive information, a system crash, or arbitrary code execution.
- How does a Overread Buffers attack work?
- It typically unfolds over 3 phases. It begins with: [Identify target application] The adversary identifies a target application or program to perform the buffer overread on. Adversaries often look for applications that accept user input and that perform manual memory management.
- What weaknesses does CAPEC-540 target?
- CAPEC-540 exploits 1 CWE weakness, including CWE-125 (Out-of-bounds Read).
- How severe is CAPEC-540?
- MITRE rates CAPEC-540 as High severity with low 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-540
Track the CVEs and weaknesses this technique exploits, with AI-written analysis and remediation steps.