CWE-385 隐蔽时间通道

admin 2021年12月16日16:01:29评论70 views字数 2572阅读8分34秒阅读模式

CWE-385 隐蔽时间通道

Covert Timing Channel

结构: Simple

Abstraction: Base

状态: Incomplete

被利用可能性: Medium

基本描述

Covert timing channels convey information by modulating some aspect of system behavior over time, so that the program receiving the information can observe system behavior and infer protected information.

扩展描述

In some instances, knowing when data is transmitted between parties can provide a malicious user with privileged information. Also, externally monitoring the timing of operations can potentially reveal sensitive data. For example, a cryptographic operation can expose its internal state if the time it takes to perform the operation varies, based on the state.

Covert channels are frequently classified as either storage or timing channels. Some examples of covert timing channels are the system's paging rate, the time a certain transaction requires to execute, and the time it takes to gain access to a shared bus.

相关缺陷

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

  • cwe_Nature: ChildOf cwe_CWE_ID: 514 cwe_View_ID: 699

适用平台

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

常见的影响

范围 影响 注释
['Confidentiality', 'Other'] ['Read Application Data', 'Other'] Information exposure.

可能的缓解方案

Architecture and Design

策略:

Whenever possible, specify implementation strategies that do not introduce time variances in operations.

Implementation

策略:

Often one can artificially manipulate the time which operations take or -- when operations occur -- can remove information from the attacker.

Implementation

策略:

It is reasonable to add artificial or random delays so that the amount of CPU time consumed is independent of the action being taken by the application.

示例代码

In this example, the attacker observes how long an authentication takes when the user types in the correct password.

When the attacker tries their own values, they can first try strings of various length. When they find a string of the right length, the computation will take a bit longer, because the for loop will run at least once. Additionally, with this code, the attacker can possibly learn one character of the password at a time, because when they guess the first character right, the computation will take longer than a wrong guesses. Such an attack can break even the most sophisticated password with a few hundred guesses.

bad Python

def validate_password(actual_pw, typed_pw):

if len(actual_pw) len(typed_pw):

return 0

for i in len(actual_pw):

if actual_pw[i] typed_pw[i]:

return 0

return 1

Note that, in this example, the actual password must be handled in constant time, as far as the attacker is concerned, even if the actual password is of an unusual length. This is one reason why it is good to use an algorithm that, among other things, stores a seeded cryptographic one-way hash of the password, then compare the hashes, which will always be of the same length.

分类映射

映射的分类名 ImNode ID Fit Mapped Node Name
Landwehr Timing
CLASP Covert Timing Channel

相关攻击模式

  • CAPEC-462

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

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2021年12月16日16:01:29
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   CWE-385 隐蔽时间通道http://cn-sec.com/archives/613153.html

发表评论

匿名网友 填写信息