From 007da4af41cadf97ca59fc9542c0779e4c6fe2f5 Mon Sep 17 00:00:00 2001 From: OJ Date: Sat, 27 Jun 2015 18:21:15 +1000 Subject: [PATCH] Force :init_connect for stageless --- lib/msf/core/payload/transport_config.rb | 3 ++- modules/payloads/singles/windows/meterpreter_reverse_http.rb | 1 + modules/payloads/singles/windows/meterpreter_reverse_https.rb | 1 + .../payloads/singles/windows/x64/meterpreter_reverse_http.rb | 1 + .../payloads/singles/windows/x64/meterpreter_reverse_https.rb | 1 + 5 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/msf/core/payload/transport_config.rb b/lib/msf/core/payload/transport_config.rb index f75c5c3db2..c0647a26ea 100644 --- a/lib/msf/core/payload/transport_config.rb +++ b/lib/msf/core/payload/transport_config.rb @@ -48,7 +48,8 @@ module Msf::Payload::TransportConfig # going up as part of the stage. uri = opts[:uri] unless uri - sum = uri_checksum_lookup(:connect) + type = opts[:stageless] == true ? :init_connect : :connect + sum = uri_checksum_lookup(type) uri = generate_uri_uuid(sum, opts[:uuid]) end diff --git a/modules/payloads/singles/windows/meterpreter_reverse_http.rb b/modules/payloads/singles/windows/meterpreter_reverse_http.rb index 78561d56b4..de0b7c4e10 100644 --- a/modules/payloads/singles/windows/meterpreter_reverse_http.rb +++ b/modules/payloads/singles/windows/meterpreter_reverse_http.rb @@ -45,6 +45,7 @@ module Metasploit4 def generate_config(opts={}) opts[:uuid] ||= generate_payload_uuid + opts[:stageless] = true # create the configuration block config_opts = { diff --git a/modules/payloads/singles/windows/meterpreter_reverse_https.rb b/modules/payloads/singles/windows/meterpreter_reverse_https.rb index 195a176b98..690604981a 100644 --- a/modules/payloads/singles/windows/meterpreter_reverse_https.rb +++ b/modules/payloads/singles/windows/meterpreter_reverse_https.rb @@ -45,6 +45,7 @@ module Metasploit4 def generate_config(opts={}) opts[:uuid] ||= generate_payload_uuid + opts[:stageless] = true # create the configuration block config_opts = { diff --git a/modules/payloads/singles/windows/x64/meterpreter_reverse_http.rb b/modules/payloads/singles/windows/x64/meterpreter_reverse_http.rb index e978b16c97..b84ce4f7fb 100644 --- a/modules/payloads/singles/windows/x64/meterpreter_reverse_http.rb +++ b/modules/payloads/singles/windows/x64/meterpreter_reverse_http.rb @@ -45,6 +45,7 @@ module Metasploit4 def generate_config(opts={}) opts[:uuid] ||= generate_payload_uuid + opts[:stageless] = true # create the configuration block config_opts = { diff --git a/modules/payloads/singles/windows/x64/meterpreter_reverse_https.rb b/modules/payloads/singles/windows/x64/meterpreter_reverse_https.rb index 45f9d53014..a8b2260db6 100644 --- a/modules/payloads/singles/windows/x64/meterpreter_reverse_https.rb +++ b/modules/payloads/singles/windows/x64/meterpreter_reverse_https.rb @@ -45,6 +45,7 @@ module Metasploit4 def generate_config(opts={}) opts[:uuid] ||= generate_payload_uuid + opts[:stageless] = true # create the configuration block config_opts = {