CAPEC-42

MIME Conversion
2014-06-23
00h00 +00:00
Cao
Cao
Draft
2022-09-29
00h00 +00:00
Cảnh báo cho một CAPEC
Luôn được thông báo về mọi thay đổi đối với một CAPEC cụ thể.
Quản lý thông báo

Mô tả 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.

Thông tin CAPEC

Luồng thực thi

1) Explore

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

Kỹ thuật
  • 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.

Kỹ thuật
  • 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.

Điều kiện tiên quyết

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.

Kỹ năng cần thiết

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

Các biện pháp giảm thiểu

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

Điểm yếu liên quan

CWE-ID Tên điểm yếu

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.

Tài liệu tham khảo

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

Gửi

Tên Tổ chức Ngày Ngày phát hành
CAPEC Content Team The MITRE Corporation 2014-06-23 +00:00

Sửa đổi

Tên Tổ chức Ngày Bình luận
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