Skip to content

Commit 3c16f8d

Browse files
author
Brent Cook
committed
Land rapid7#5618, fix unique session URIs for stageless http/s
2 parents 10a6945 + bb43f7e commit 3c16f8d

File tree

5 files changed

+7
-2
lines changed

5 files changed

+7
-2
lines changed

lib/msf/core/payload/transport_config.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ def transport_config_reverse_http(opts={})
4848
# going up as part of the stage.
4949
uri = opts[:uri]
5050
unless uri
51-
sum = uri_checksum_lookup(:connect)
51+
type = opts[:stageless] == true ? :init_connect : :connect
52+
sum = uri_checksum_lookup(type)
5253
uri = generate_uri_uuid(sum, opts[:uuid])
5354
end
5455

modules/payloads/singles/windows/meterpreter_reverse_http.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ def generate
4545

4646
def generate_config(opts={})
4747
opts[:uuid] ||= generate_payload_uuid
48+
opts[:stageless] = true
4849

4950
# create the configuration block
5051
config_opts = {

modules/payloads/singles/windows/meterpreter_reverse_https.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ def generate
4545

4646
def generate_config(opts={})
4747
opts[:uuid] ||= generate_payload_uuid
48+
opts[:stageless] = true
4849

4950
# create the configuration block
5051
config_opts = {

modules/payloads/singles/windows/x64/meterpreter_reverse_http.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ def generate
4545

4646
def generate_config(opts={})
4747
opts[:uuid] ||= generate_payload_uuid
48+
opts[:stageless] = true
4849

4950
# create the configuration block
5051
config_opts = {

modules/payloads/singles/windows/x64/meterpreter_reverse_https.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,15 @@ def generate
4545

4646
def generate_config(opts={})
4747
opts[:uuid] ||= generate_payload_uuid
48+
opts[:stageless] = true
4849

4950
# create the configuration block
5051
config_opts = {
5152
arch: opts[:uuid].arch,
5253
exitfunk: datastore['EXITFUNC'],
5354
expiration: datastore['SessionExpirationTimeout'].to_i,
5455
uuid: opts[:uuid],
55-
transports: [transport_config_reverse_http(opts)],
56+
transports: [transport_config_reverse_https(opts)],
5657
extensions: (datastore['EXTENSIONS'] || '').split(',')
5758
}
5859

0 commit comments

Comments
 (0)