CAPEC-42 詳細資料

CAPEC-42

MIME Conversion
2014-06-23
00h00 +00:00
高危
高危
Draft
2022-09-29
00h00 +00:00
指定 CAPEC 提醒
掌握特定 CAPEC 的任何變更。
管理通知

CAPEC 描述

An attacker exploits a weakness in the MIME conversion routine to cause a buffer overflow and gain control over the mail server machine. The MIME system is designed to allow various different information formats to be interpreted and sent via e-mail. Attack points exist when data are converted to MIME compatible format and back.

CAPEC 資訊

執行流程

1) Explore

[Identify target mail server] The adversary identifies a target mail server that they wish to attack.

技術
  • Use Nmap on a system to identify a mail server service.
2) Explore

[Determine viability of attack] Determine whether the mail server is unpatched and is potentially vulnerable to one of the known MIME conversion buffer overflows (e.g. Sendmail 8.8.3 and 8.8.4).

3) Experiment

[Find injection vector] Identify places in the system where vulnerable MIME conversion routines may be used.

4) Experiment

[Craft overflow content] The adversary crafts e-mail messages with special headers that will cause a buffer overflow for the vulnerable MIME conversion routine. The intent of this attack is to leverage the overflow for execution of arbitrary code and gain access to the mail server machine, so the adversary will craft an email that not only overflows the targeted buffer but does so in such a way that the overwritten return address is replaced with one of the adversary's choosing.

技術
  • Create malicious shellcode that will execute when the program execution is returned to it.
  • Use a NOP-sled in the overflow content to more easily "slide" into the malicious code. This is done so that the exact return address need not be correct, only in the range of all of the NOPs
4) Exploit

[Overflow the buffer] Send e-mail messages to the target system with specially crafted headers that trigger the buffer overflow and execute the shell code.

前置條件

The target system uses a mail server.
Mail server vendor has not released a patch for the MIME conversion routine, the patch itself has a security hole or does not fix the original problem, or the patch has not been applied to the user's system.

所需技能

It may be trivial to cause a DoS via this attack pattern
Causing arbitrary code to execute on the target system.

緩解措施

Stay up to date with third party vendor patches
Use the sendmail restricted shell program (smrsh)
Use mail.local

相關弱點

CWE-ID 弱點名稱

CWE-120

Buffer Copy without Checking Size of Input
The product copies an input buffer to an output buffer without verifying that the size of the input buffer is less than the size of the output buffer.

CWE-119

Improper Restriction of Operations within the Bounds of a Memory Buffer
The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary.

CWE-74

Improper Neutralization of Special Elements in Output Used by a Downstream Component
The product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component.

CWE-20

Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.

參考資料

REF-1

Exploiting Software: How to Break Code
G. Hoglund, G. McGraw.

REF-364

CERT Advisory CA-1997-05 MIME Conversion Buffer Overflow in Sendmail Versions 8.8.3 and 8.8.4
http://www.cert.org/advisories/CA-1997-05.html

提交

名稱 機構 日期 發布日期
CAPEC Content Team The MITRE Corporation 2014-06-23 +00:00

修改記錄

名稱 機構 日期 備註
CAPEC Content Team The MITRE Corporation 2021-10-21 +00:00 Updated Execution_Flow
CAPEC Content Team The MITRE Corporation 2022-09-29 +00:00 Updated Example_Instances, Mitigations