CWE-283 未经验证的属主

admin 2022年1月5日21:05:27评论89 views字数 1758阅读5分51秒阅读模式

CWE-283 未经验证的属主

Unverified Ownership

结构: Simple

Abstraction: Base

状态: Draft

被利用可能性: unkown

基本描述

The software does not properly verify that a critical resource is owned by the proper entity.

相关缺陷

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

  • cwe_Nature: ChildOf cwe_CWE_ID: 282 cwe_View_ID: 699 cwe_Ordinal: Primary

适用平台

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

常见的影响

范围 影响 注释
Access Control Gain Privileges or Assume Identity An attacker could gain unauthorized access to system resources.

可能的缓解方案

MIT-1 ['Architecture and Design', 'Operation']

策略:

Very carefully manage the setting, management, and handling of privileges. Explicitly manage trust zones in the software.

MIT-49 Architecture and Design

策略: Separation of Privilege

Consider following the principle of separation of privilege. Require multiple conditions to be met before permitting access to a system resource.

示例代码

This function is part of a privileged program that takes input from users with potentially lower privileges.

bad Python

def killProcess(processID):

os.kill(processID, signal.SIGKILL)

This code does not confirm that the process to be killed is owned by the requesting user, thus allowing an attacker to kill arbitrary processes.

This function remedies the problem by checking the owner of the process before killing it:

good Python

def killProcess(processID):

user = getCurrentUser()

#Check process owner against requesting user

if getProcessOwner(processID) == user:

os.kill(processID, signal.SIGKILL)
return

else:

print("You cannot kill a process you don't own")
return

分析过的案例

标识 说明 链接
CVE-2001-0178 Program does not verify the owner of a UNIX socket that is used for sending a password. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2001-0178
CVE-2004-2012 Owner of special device not checked, allowing root. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2004-2012

Notes

分类映射

映射的分类名 ImNode ID Fit Mapped Node Name
PLOVER Unverified Ownership

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

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2022年1月5日21:05:27
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   CWE-283 未经验证的属主http://cn-sec.com/archives/612796.html

发表评论

匿名网友 填写信息