CAPEC-155

Screen Temporary Files for Sensitive Information
2014-06-23
00h00 +00:00
中危
中危
Draft
2021-10-21
00h00 +00:00
指定 CAPEC 提醒
随时了解指定 CAPEC 的变更。
管理通知

CAPEC 描述

An adversary exploits the temporary, insecure storage of information by monitoring the content of files used to store temp data during an application's routine execution flow. Many applications use temporary files to accelerate processing or to provide records of state across multiple executions of the application. Sometimes, however, these temporary files may end up storing sensitive information. By screening an application's temporary files, an adversary might be able to discover such sensitive information. For example, web browsers often cache content to accelerate subsequent lookups. If the content contains sensitive information then the adversary could recover this from the web cache.

CAPEC 信息

执行流程

1) Explore

[Look for temporary files in target application] An adversary will try to discover temporary files in a target application. Knowledge of where the temporary files are being stored is important information.

2) Experiment

[Attempt to read temporary files] An adversary will attempt to read any temporary files they may have discovered through normal means.

技术手段
  • Attempt to get the file by querying the file path to a web server
  • Using a remote shell into an application, read temporary files and send out information remotely if necessary
  • Recover temporary information from a user's browser cache
3) Exploit

[Use function weaknesses to gain access to temporary files] If normal means to read temporary files did not work, an adversary will attempt to exploit weak temporary file functions to gain access to temporary files.

技术手段
  • Some C functions such as tmpnam(), tempnam(), and mktemp() will create a temporary file with a unique name, but do not stop an adversary from creating a file of the same name before it is opened by the application. Because these functions do not create file names that are sufficiently random, an adversary will try to make a file of the same name, causing a collision, and possibly altering file permissions for the temporary file so that it is able to be read.
  • Similar to the last technique, an adversary might also create a file name collision using a linked file in a unix system such that the temporary file contents written out by the application write to a file of the adversaries choosing, allowing them to read the file contents.

前提条件

The target application must utilize temporary files and must fail to adequately secure them against other parties reading them.

所需资源

Because some application may have a large number of temporary files and/or these temporary files may be very large, an adversary may need tools that help them quickly search these files for sensitive information. If the adversary can simply copy the files to another location and if the speed of the search is not important, the adversary can still perform the attack without any special resources.

相关弱点

CWE-ID 弱点名称

CWE-377

DEPRECATED: Insecure Temporary File
This entry has been deprecated. It was focused only on the affected resource (temporary file) and not the behavior or mistake that produced the insecure temporary file, which caused confusion and incorrect mappings.

提交记录

名称 组织 日期 发布日期
CAPEC Content Team The MITRE Corporation 2014-06-23 +00:00

修改记录

名称 组织 日期 备注
CAPEC Content Team The MITRE Corporation 2017-01-09 +00:00 Updated Related_Attack_Patterns
CAPEC Content Team The MITRE Corporation 2017-08-04 +00:00 Updated Activation_Zone, Description Summary, Injection_Vector, Payload, Payload_Activation_Impact, Related_Vulnerabilities, Resources_Required, Typical_Likelihood_of_Exploit
CAPEC Content Team The MITRE Corporation 2019-04-04 +00:00 Updated Related_Weaknesses
CAPEC Content Team The MITRE Corporation 2019-09-30 +00:00 Updated Related_Attack_Patterns
CAPEC Content Team The MITRE Corporation 2020-07-30 +00:00 Updated Related_Attack_Patterns
CAPEC Content Team The MITRE Corporation 2020-12-17 +00:00 Updated Related_Attack_Patterns
CAPEC Content Team The MITRE Corporation 2021-10-21 +00:00 Updated Execution_Flow