Module: Msf::Payload::Adapter::Fetch::Server::Https

Includes:
HTTP
Included in:
Https
Defined in:
lib/msf/core/payload/adapter/fetch/server/https.rb

Instance Method Summary collapse

Instance Method Details

#fetch_protocolObject



25
26
27
# File 'lib/msf/core/payload/adapter/fetch/server/https.rb', line 25

def fetch_protocol
  'HTTPS'
end

#initialize(*args) ⇒ Object

This mixin supports both HTTP and HTTPS fetch handlers. If you only want HTTP, use the HTTP mixin that imports this, but removes the HTTPS options



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/msf/core/payload/adapter/fetch/server/https.rb', line 6

def initialize(*args)
  super
  register_options(
    [
      Msf::OptBool.new('FETCH_CHECK_CERT', [true, 'Check SSL certificate', false])
    ]
  )
  register_advanced_options(
    [
      Msf::OptPath.new('FetchSSLCert', [ false, 'Path to a custom SSL certificate (default is randomly generated)', '']),
      Msf::OptBool.new('FetchSSLCompression', [ false, 'Enable SSL/TLS-level compression', false ]),
      Msf::OptString.new('FetchSSLCipher', [ false, 'String for SSL cipher spec - "DHE-RSA-AES256-SHA" or "ADH"']),
      Msf::OptEnum.new('FetchSSLVersion',
                       'Specify the version of SSL/TLS to be used (Auto, TLS and SSL23 are auto-negotiate)',
                       enums: Rex::Socket::SslTcp.supported_ssl_methods)
    ]
  )
end

#ssl_certObject



29
30
31
# File 'lib/msf/core/payload/adapter/fetch/server/https.rb', line 29

def ssl_cert
  datastore['FetchSSLCert']
end

#ssl_cipherObject



37
38
39
# File 'lib/msf/core/payload/adapter/fetch/server/https.rb', line 37

def ssl_cipher
  datastore['FetchSSLCipher']
end

#ssl_compressionObject



33
34
35
# File 'lib/msf/core/payload/adapter/fetch/server/https.rb', line 33

def ssl_compression
  datastore['FetchSSLCompression']
end

#ssl_versionObject



41
42
43
# File 'lib/msf/core/payload/adapter/fetch/server/https.rb', line 41

def ssl_version
  datastore['FetchSSLVersion']
end

#start_https_fetch_handler(srvname, srvexe) ⇒ Object



45
46
47
# File 'lib/msf/core/payload/adapter/fetch/server/https.rb', line 45

def start_https_fetch_handler(srvname, srvexe)
  start_http_fetch_handler(srvname, srvexe, true, ssl_cert, ssl_compression, ssl_cipher, ssl_version)
end