CWE-648 特权API的不正确使用

admin 2021年11月6日14:50:56评论61 views字数 2497阅读8分19秒阅读模式

CWE-648 特权API的不正确使用

Incorrect Use of Privileged APIs

结构: Simple

Abstraction: Base

状态: Incomplete

被利用可能性: Low

基本描述

The application does not conform to the API requirements for a function call that requires extra privileges. This could allow attackers to gain privileges by causing the function to be called incorrectly.

扩展描述

When an application contains certain functions that perform operations requiring an elevated level of privilege, the caller of a privileged API must be careful to:

If the caller of the API does not follow these requirements, then it may allow a malicious user or process to elevate their privilege, hijack the process, or steal sensitive data.

For instance, it is important to know if privileged APIs do not shed their privileges before returning to the caller or if the privileged function might make certain assumptions about the data, context or state information passed to it by the caller. It is important to always know when and how privileged APIs can be called in order to ensure that their elevated level of privilege cannot be exploited.

相关缺陷

  • cwe_Nature: ChildOf cwe_CWE_ID: 269 cwe_View_ID: 1000 cwe_Ordinal: Primary

适用平台

Language: {'cwe_Class': 'Language-Independent', 'cwe_Prevalence': 'Undetermined'}

常见的影响

范围 影响 注释
Access Control Gain Privileges or Assume Identity An attacker may be able to elevate privileges.
Confidentiality Read Application Data An attacker may be able to obtain sensitive information.
['Integrity', 'Confidentiality', 'Availability'] Execute Unauthorized Code or Commands An attacker may be able to execute code.

可能的缓解方案

Implementation

策略:

Before calling privileged APIs, always ensure that the assumptions made by the privileged code hold true prior to making the call.

Architecture and Design

策略:

Know architecture and implementation weaknesses of the privileged APIs and make sure to account for these weaknesses before calling the privileged APIs to ensure that they can be called safely.

Implementation

策略:

If privileged APIs make certain assumptions about data, context or state validity that are passed by the caller, the calling code must ensure that these assumptions have been validated prior to making the call.

Implementation

策略:

If privileged APIs do not shed their privilege prior to returning to the calling code, then calling code needs to shed these privileges immediately and safely right after the call to the privileged APIs. In particular, the calling code needs to ensure that a privileged thread of execution will never be returned to the user or made available to user-controlled processes.

Implementation

策略:

Only call privileged APIs from safe, consistent and expected state.

Implementation

策略:

Ensure that a failure or an error will not leave a system in a state where privileges are not properly shed and privilege escalation is possible (i.e. fail securely with regards to handling of privileges).

分析过的案例

标识 说明 链接

相关攻击模式

  • CAPEC-107
  • CAPEC-234

文章来源于互联网:scap中文网

免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉。
  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2021年11月6日14:50:56
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   CWE-648 特权API的不正确使用http://cn-sec.com/archives/613653.html
                  免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉.

发表评论

匿名网友 填写信息