CAPEC-11: Cause Web Server Misclassification

Detailed Draft 严重程度: High 攻击可能性: Medium

CAPEC版本: 3.9

更新日期: 2023-01-24

攻击模式描述

An attack of this type exploits a Web server's decision to take action based on filename or file extension. Because different file types are handled by different server processes, misclassification may force the Web server to take unexpected action, or expected actions in an unexpected sequence. This may cause the server to exhaust resources, supply debug or system data to the attacker, or bind an attacker to a remote process.

执行流程

步骤 1 Explore

[Footprint file input vectors] Manually or using an automated tool, an attacker searches for all input locations where a user has control over the filenames or MIME types of files submitted to the web server.

技术:
  • Attacker manually crawls application to identify file inputs
  • Attacker uses an automated tool to crawl application identify file inputs
  • Attacker manually assesses strength of access control protecting native application files from user control
  • Attacker explores potential for submitting files directly to the web server via independently constructed HTTP Requests
步骤 2 Experiment

[File misclassification shotgunning] An attacker makes changes to file extensions and MIME types typically processed by web servers and looks for abnormal behavior.

技术:
  • Attacker submits files with switched extensions (e.g. .php on a .jsp file) to web server.
  • Attacker adds extra characters (e.g. adding an extra . after the file extension) to filenames of files submitted to web server.
步骤 3 Experiment

[File misclassification sniping] Understanding how certain file types are processed by web servers, an attacker crafts varying file payloads and modifies their file extension or MIME type to be that of the targeted type to see if the web server is vulnerable to misclassification of that type.

技术:
  • Craft a malicious file payload, modify file extension to the targeted file type and submit it to the web server.
  • Craft a malicious file payload, modify its associated MIME type to the targeted file type and submit it to the web server.
步骤 4 Exploit

[Disclose information] The attacker, by manipulating a file extension or MIME type is able to make the web server return raw information (not executed).

技术:
  • Manipulate the file names that are explicitly sent to the server.
  • Manipulate the MIME sent in order to confuse the web server.

前提条件

  • Web server software must rely on file name or file extension for processing.
  • The attacker must be able to make HTTP requests to the web server.

所需技能

Low To modify file name or file extension
Medium To use misclassification to force the Web server to disclose configuration information, source, or binary data

所需资源

  • None: No specialized resources are required to execute this type of attack.

后果影响

影响范围: Confidentiality

技术影响: Read Data

影响范围: Confidentiality Access Control Authorization

技术影响: Gain Privileges

缓解措施

Implementation: Server routines should be determined by content not determined by filename or file extension.

分类映射

分类名称 条目ID 条目名称
ATTACK 1036.006 Masquerading: Space after Filename
关键信息

CAPEC ID: CAPEC-11

抽象级别: Detailed

状态: Draft

典型严重程度: High

攻击可能性: Medium

相关攻击模式
相关CWE弱点