CWE

Common Weakness Enumeration

社区开发的软件和硬件弱点类型清单

2021 CWE Most Important Hardware Weaknesses
CWE Top 25 Most Dangerous Weaknesses
Home>CWE List> cwe-单个字典定义(4.10)
ID

CWE-498: Cloneable Class Containing Sensitive Information

弱点ID:498
Abstraction:变体
Structure:Simple
View customized information:
+描述
该代码包含一个带有敏感数据的类,但是该类是可克的。然后可以通过克隆类访问数据。
+Extended Description
Cloneable classes are effectively open classes, since data cannot be hidden in them. Classes that do not explicitly deny cloning can be cloned by any other class without running the constructor.
+Relationships
Section HelpThis table shows the weaknesses and high level categories that are related to this weakness. These relationships are defined as ChildOf, ParentOf, MemberOf and give insight to similar items that may exist at higher and lower levels of abstraction. In addition, relationships such as PeerOf and CanAlsoBe are defined to show similar weaknesses that the user may want to explore.
+与观点“研究概念”相关(CWE-1000)
Nature 类型 ID Name
ChildOf Class班级 - 以非常抽象的方式描述的弱点,通常与任何特定的语言或技术无关。比支柱弱点更具体,但比基本弱点更一般。班级弱点通常用以下维度的1或2来描述问题:行为,属性和资源。 668 Exposure of Resource to Wrong Sphere
canpreceede Class班级 - 以非常抽象的方式描述的弱点,通常与任何特定的语言或技术无关。比支柱弱点更具体,但比基本弱点更一般。班级弱点通常用以下维度的1或2来描述问题:行为,属性和资源。 200 将敏感信息暴露于未经授权的演员
+Modes Of Introduction
Section HelpThe different Modes of Introduction provide information about how and when this weakness may be introduced. The Phase identifies a point in the life cycle at which introduction may occur, while the Note provides a typical scenario related to introduction during the given phase.
阶段 Note
执行
+Applicable Platforms
Section HelpThis listing shows possible areas for which the given weakness could appear. These may be for specific named Languages, Operating Systems, Architectures, Paradigms, Technologies, or a class of such platforms. The platform is listed along with how frequently the given weakness appears for that instance.

Languages

C++(Undetermined Prevalence)

Java(Undetermined Prevalence)

C#(Undetermined Prevalence)

+Common Consequences
Section HelpThis table specifies different individual consequences associated with the weakness. The Scope identifies the application security area that is violated, while the Impact describes the negative technical impact that arises if an adversary succeeds in exploiting this weakness. The Likelihood provides information about how likely the specific consequence is expected to be seen relative to the other consequences in the list. For example, there may be high likelihood that a weakness will be exploited to achieve a certain impact, but a low likelihood that it will be exploited to achieve a different impact.
Scope 影响 Likelihood
Access Control

Technical Impact:旁路保护机制

可以克隆的类可以在不执行构造函数的情况下产生。这是危险的,因为构造函数可以执行与安全有关的检查。通过允许克隆对象,可以绕过这些检查。
+Likelihood Of Exploit
Medium
+示例的例子

示例1

The following example demonstrates the weakness.

(bad code)
示例语言:Java
public class CloneClient {
公共cloneclient()//抛出
java.lang.clonotsupportedexception {

Teacher t1 = new Teacher("guddu","22,nagar road");
//...
//做一些事情来删除老师。
老师t2 =(老师)t1.clone();
system.out.println(t2.name);
}
公共静态void main(String args []){

new CloneClient();
}
}
class Teacher implements Cloneable {

公共对象clone(){

尝试 {
return super.clone();
}
catch (java.lang.CloneNotSupportedException e) {

抛出新的RuntimeException(e.ToString());
}
}
公共字符串名称;
public String clas;
public Teacher(String name,String clas) {

this.name = name;
this.clas = clas;
}
}

通过定义克隆函数,使类无容易失败:

(good code)
示例语言:Java
public final void clone() throws java.lang.CloneNotSupportedException {
扔新的Java.lang.clonotsupportedException();
}
+潜在的缓解

阶段:实施

如果您确实使您的课程可以克隆,请确保您的克隆方法是最终的,并抛出super.clone()。
+会员资格
Section HelpThis MemberOf Relationships table shows additional CWE Categories and Views that reference this weakness as a member. This information is often useful in understanding where a weakness fits within the context of external information sources.
Nature 类型 ID Name
MemberOf 类别类别 - 包含共享共同特征的其他条目的CWE条目。 849 The CERT Oracle Secure Coding Standard for Java (2011) Chapter 6 - Object Orientation (OBJ)
MemberOf ViewView - a subset of CWE entries that provides a way of examining CWE content. The two main view structures are Slices (flat lists) and Graphs (containing relationships between entries). 884 CWE横截面
MemberOf 类别类别 - 包含共享共同特征的其他条目的CWE条目。 963 SFP Secondary Cluster: Exposed Data
MemberOf 类别类别 - 包含共享共同特征的其他条目的CWE条目。 1139 Java的SEI CERT ORACLE SECURE编码标准 - 指南05.对象方向(OBJ)
+分类映射
Mapped Taxonomy Name Node ID 合身 Mapped Node Name
CLASP 通过上课克隆的信息泄漏
The CERT Oracle Secure Coding Standard for Java (2011) OBJ07-J Sensitive classes must not let themselves be copied
Software Fault Patterns SFP23 暴露数据
+参考
[Ref-18] Secure Software,Inc.。“ The CLASP应用程序安全过程”。2005年。<https://cwe.mitre.org/documents/sources/TheCLASPApplicationSecurityProcess.pdf>。
+Content History
+提交
提交日期 Submitter 组织
2006-07-19 CLASP
+Modifications
Modification Date 修饰符 组织
2008-07-01 Eric Dalci 雪茄
updated Time_of_Introduction
2008-09-08 CWE Content Team MITRE
updated Applicable_Platforms, Common_Consequences, Description, Relationships, Other_Notes, Taxonomy_Mappings
2008-10-14 CWE Content Team MITRE
更新其他_notes
2009-10-29 CWE Content Team MITRE
更新的common_cconsquences,Description,other_notes,势_MITIGATIONS
2011-03-29 CWE Content Team MITRE
updated Name
2011-06-01 CWE Content Team MITRE
updated Common_Consequences, Relationships, Taxonomy_Mappings
2012-05-11 CWE Content Team MITRE
更新的关系,分类_mappings
2014-07-30 CWE Content Team MITRE
更新的关系,分类_mappings
2017-11-08 CWE Content Team MITRE
updated Demonstrative_Examples, Potential_Mitigations, Relationships
2019-01-03 CWE Content Team MITRE
更新的关系,分类_mappings
2020-02-24 CWE Content Team MITRE
更新的引用,关系
2021-03-15 CWE Content Team MITRE
更新的关系
+先前的输入名称
Change Date Previous Entry Name
2011-03-29 通过上课克隆的信息泄漏
提供更多信息 - 请选择其他过滤器。
Page Last Updated:January 31, 2023