CWE一覧に戻る
CWE-648

特権APIの誤った使用

Incorrect Use of Privileged APIs
脆弱性 作成中
JA

本製品は、特別な特権を必要とする関数呼び出しに関する API 要件に準拠していません。このため、攻撃者が関数を不正に呼び出すことで、特権を獲得できる可能性があります。

製品に高度な特権レベルを必要とする操作を実行する特定の関数が含まれている場合、特権APIの呼び出し元は以下の点に注意しなければならない:

APIの呼び出し元がこれらの要件に従わない場合、悪意のあるユーザーやプロセスが特権を昇格させたり、プロセスを乗っ取ったり、機密データを盗んだりする可能性があります。

例えば、特権APIが呼び出し元に戻る前に特権を解放しないかどうか、あるいは特権関数が呼び出し元から渡されたデータ、コンテキスト、状態情報について特定の仮定をする可能性があるかどうかを知ることが重要です。特権APIがいつ、どのように呼び出されるかを常に把握しておくことは、特権レベルの高さを悪用されないようにするために重要である。

EN

The product 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 a product 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.

Scope: Access Control / Impact: Gain Privileges or Assume Identity
Scope: Confidentiality / Impact: Read Application Data
Scope: Integrity, Confidentiality, Availability / Impact: Execute Unauthorized Code or Commands
Before calling privileged APIs, always ensure that the assumptions made by the privileged code hold true prior to making the call.
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.
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.
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.
Only call privileged APIs from safe, consistent and expected state.
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).
MITRE公式ページ — CWE-648