CAPEC-273: HTTP Response Smuggling

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

CAPEC版本: 3.9

更新日期: 2023-01-24

攻击模式描述

执行流程

步骤 1 Explore

[Survey network to identify target] The adversary performs network reconnaissance by monitoring relevant traffic to identify the network path and parsing of the HTTP messages with the goal of identifying potential targets.

技术:
  • Scan networks to fingerprint HTTP infrastructure and monitor HTTP traffic to identify HTTP network path with a tool such as a Network Protocol Analyzer.
步骤 1 Experiment

[Identify vulnerabilities in targeted HTTP infrastructure and technologies] The adversary sends a variety of benign/ambiguous HTTP requests to observe responses from HTTP infrastructure to intended targets in order to identify differences/discrepancies in the interpretation and parsing of HTTP requests by examining supported HTTP protocol versions, message sizes, and HTTP headers.

步骤 2 Experiment

[Cause differential HTTP responses by experimenting with identified HTTP Response vulnerabilities] The adversary sends maliciously crafted HTTP request to back-end HTTP infrastructure to inject adversary data into HTTP responses (intended for intermediary and/or front-end client/victim HTTP agents communicating with back-end HTTP infrastructure) for the purpose of interfering with the parsing of HTTP response. The intended consequences of the malicious HTTP request and the subsequent adversary injection and manipulation of HTTP responses will be observed to confirm applicability of identified vulnerabilities in the adversary's plan of attack.

技术:
  • Continue the monitoring of HTTP traffic.
  • Monitor HTTP traffic using a tool such as a Network Protocol Analyzer.
步骤 1 Exploit

[Perform HTTP Response Smuggling attack] Using knowledge discovered in the experiment section above, smuggle a message to cause one of the consequences.

技术:
  • Leverage techniques identified in the Experiment Phase.

前提条件

  • A vulnerable or compromised server or domain/site capable of allowing adversary to insert/inject malicious content that will appear in the server's response to target HTTP agents (e.g., proxies and users' web browsers).
  • Differences in the way the two HTTP agents parse and interpret HTTP responses and its headers.
  • HTTP agents running on HTTP/1.1 that allow for Keep Alive mode, Pipelined queries, and Chunked queries and responses.

所需技能

Medium Detailed knowledge on HTTP protocol: request and response messages structure and usage of specific headers.
Medium Detailed knowledge on how specific HTTP agents receive, send, process, interpret, and parse a variety of HTTP messages and headers.
Medium Possess knowledge on the exact details in the discrepancies between several targeted HTTP agents in path of an HTTP message in parsing its message structure and individual headers.

所需资源

  • Tools capable of monitoring HTTP messages, and crafting malicious HTTP messages and/or injecting malicious content into HTTP messages.

后果影响

影响范围: Confidentiality Integrity Availability

技术影响: Execute Unauthorized Commands

影响范围: Confidentiality Access Control Authorization

技术影响: Gain Privileges

影响范围: Integrity

技术影响: Modify Data

缓解措施

Design: evaluate HTTP agents prior to deployment for parsing/interpretation discrepancies.

Configuration: front-end HTTP agents notice ambiguous requests.

Configuration: back-end HTTP agents reject ambiguous requests and close the network connection.

Configuration: Disable reuse of back-end connections.

Configuration: Use HTTP/2 for back-end connections.

Configuration: Use the same web server software for front-end and back-end server.

Implementation: Utilize a Web Application Firewall (WAF) that has built-in mitigation to detect abnormal requests/responses.

Configuration: Prioritize Transfer-Encoding header over Content-Length, whenever an HTTP message contains both.

Configuration: Disallow HTTP messages with both Transfer-Encoding and Content-Length or Double Content-Length Headers.

Configuration: Disallow Malformed/Invalid Transfer-Encoding Headers used in obfuscation, such as:

Configuration: Install latest vendor security patches available for both intermediary and back-end HTTP infrastructure (i.e. proxies and web servers)

Configuration: Ensure that HTTP infrastructure in the chain or network path utilize a strict uniform parsing process.

Implementation: Utilize intermediary HTTP infrastructure capable of filtering and/or sanitizing user-input.

分类映射

分类名称 条目ID 条目名称
WASC 27 HTTP Response Smuggling
关键信息

CAPEC ID: CAPEC-273

抽象级别: Detailed

状态: Stable

典型严重程度: High

攻击可能性: Medium

相关攻击模式