Skip to content

Commit bdfaaf0

Browse files
committed
Make multi work with https
1 parent bd8f8fd commit bdfaaf0

File tree

3 files changed

+37
-6
lines changed

3 files changed

+37
-6
lines changed

lib/msf/core/payload/multi/reverse_https.rb

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,10 @@ module Payload::Multi::ReverseHttps
1818
include Msf::Payload::Multi::ReverseHttp
1919

2020
#
21-
# Generate the first stage
21+
# Generate the transport-specific configuration
2222
#
23-
def generate(opts={})
24-
opts[:ssl] = true
25-
super(opts)
23+
def transport_config(opts={})
24+
transport_config_reverse_https(opts)
2625
end
2726

2827
end
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
##
2+
# This module requires Metasploit: http://metasploit.com/download
3+
# Current source: https://github.com/rapid7/metasploit-framework
4+
##
5+
6+
require 'msf/core'
7+
require 'msf/core/handler/reverse_https'
8+
require 'msf/core/payload/multi/reverse_https'
9+
10+
module MetasploitModule
11+
12+
CachedSize = :dynamic
13+
14+
include Msf::Payload::Stager
15+
include Msf::Payload::Multi
16+
include Msf::Payload::Multi::ReverseHttps
17+
18+
def initialize(info={})
19+
super(merge_info(info,
20+
'Name' => 'Reverse HTTPS Stager (Mulitple Architectures)',
21+
'Description' => 'Tunnel communication over HTTPS',
22+
'Author' => 'OJ Reeves',
23+
'License' => MSF_LICENSE,
24+
'Platform' => ['multi'],
25+
'Arch' => ARCH_ALL,
26+
'Handler' => Msf::Handler::ReverseHttps,
27+
'Stager' => {'Payload' => ''},
28+
'Convention' => 'https'
29+
))
30+
end
31+
end

modules/payloads/stages/multi/meterpreter.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,12 @@ def initialize(info = {})
2323
'Name' => 'Architecture-Independent Meterpreter Stage',
2424
'Description' => 'Handle Meterpreter sessions regardless of the target arch/platform',
2525
'Author' => ['OJ Reeves'],
26-
'PayloadCompat' => {'Convention' => 'http'},
26+
'PayloadCompat' => {'Convention' => 'http https'},
2727
'License' => MSF_LICENSE,
2828
'Platform' => ['multi'],
2929
'Arch' => ARCH_ALL,
30-
'Session' => Msf::Sessions::Meterpreter_Multi))
30+
'Session' => Msf::Sessions::Meterpreter_Multi
31+
))
3132
end
3233

3334
def stage_payload(opts={})

0 commit comments

Comments
 (0)