CAPEC-96: Block Access to Libraries
An application typically makes calls to functions that are a part of libraries external to the application. These libraries may be part of the operating system or they may be third party libraries. It is possible that the application does not handle situations properly where access to these libraries has been blocked. Depending on the error handling within the application, blocked access to libraries may leave the system in an insecure state that could be leveraged by an attacker.
Last updated
Overview
CAPEC-96 (Block Access to Libraries) is a detailed-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 to carry out this attack.
- Step 1Explore
Determine what external libraries the application accesses.
- Step 2Experiment
Block access to the external libraries accessed by the application.
- Step 3Experiment
Monitor the behavior of the system to see if it goes into an insecure/inconsistent state.
- Step 4Experiment
If the system does go into an insecure/inconsistent state, leverage that to obtain information about the system functionality or data, elevate access control, etc. The rest of this attack will depend on the context and the desired goal.
What the attacker needs
Prerequisites
- An application requires access to external libraries.
- An attacker has the privileges to block application access to external libraries.
Skills required
- Low skill: Knowledge of how to block access to libraries, as well as knowledge of how to leverage the resulting state of the application based on the failed call.
Consequences
What a successful CAPEC-96 attack can achieve.
Alter Execution Logic
Affects: Availability
Other
Affects: Confidentiality
Bypass Protection Mechanism
Affects: Confidentiality, Access Control, Authorization
How to mitigate it
Defenses that reduce the risk of CAPEC-96.
- Ensure that application handles situations where access to APIs in external libraries is not available securely. If the application cannot continue its execution safely it should fail in a consistent and secure fashion.
Examples
A web-based system uses a third party cryptographic random number generation library that derives entropy from machine's hardware. This library is used in generation of user session ids used by the application. If the library is inaccessible, the application instead uses a software based weak pseudo random number generation library. An attacker of the system blocks access of the application to the third party cryptographic random number generation library (by renaming it). The application in turn uses the weak pseudo random number generation library to generate session ids that are predictable. An attacker then leverages this weakness to guess a session id of another user to perform a horizontal elevation of privilege escalation and gain access to another user's account.
Frequently asked questions
Common questions about CAPEC-96.
- What is CAPEC-96?
- An application typically makes calls to functions that are a part of libraries external to the application. These libraries may be part of the operating system or they may be third party libraries. It is possible that the application does not handle situations properly where access to these libraries has been blocked. Depending on the error handling within the application, blocked access to libraries may leave the system in an insecure state that could be leveraged by an attacker.
- How does a Block Access to Libraries attack work?
- It typically unfolds over 4 phases. It begins with: Determine what external libraries the application accesses.
- How do you prevent CAPEC-96?
- Ensure that application handles situations where access to APIs in external libraries is not available securely. If the application cannot continue its execution safely it should fail in a consistent and secure fashion.
- What weaknesses does CAPEC-96 target?
- CAPEC-96 exploits 1 CWE weakness, including CWE-589 (Call to Non-ubiquitous API).
- How severe is CAPEC-96?
- MITRE rates CAPEC-96 as Medium 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-96
Track the CVEs and weaknesses attackers exploit with this technique, with AI-written analysis and remediation guidance.