Skip to content

Commit 20ad2a8

Browse files
author
Brent Cook
committed
Land rapid7#5357, switch UUID to be binary rather than string
2 parents 636d815 + d804f5f commit 20ad2a8

15 files changed

+16
-19
lines changed

Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ PATH
99
json
1010
metasploit-concern (~> 1.0)
1111
metasploit-model (~> 1.0)
12-
metasploit-payloads (= 0.0.6)
12+
metasploit-payloads (= 0.0.7)
1313
msgpack
1414
nokogiri
1515
packetfu (= 1.1.9)
@@ -123,7 +123,7 @@ GEM
123123
activemodel (>= 4.0.9, < 4.1.0)
124124
activesupport (>= 4.0.9, < 4.1.0)
125125
railties (>= 4.0.9, < 4.1.0)
126-
metasploit-payloads (0.0.6)
126+
metasploit-payloads (0.0.7)
127127
metasploit_data_models (1.0.1)
128128
activerecord (>= 4.0.9, < 4.1.0)
129129
activesupport (>= 4.0.9, < 4.1.0)

lib/msf/base/sessions/meterpreter.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -307,9 +307,7 @@ def is_valid_session?(timeout=10)
307307

308308
begin
309309
self.machine_id = self.core.machine_id(timeout)
310-
# This is causing breakages thanks to Meterpeter not doing what it should
311-
# be doing with the uuid.
312-
#self.payload_uuid ||= self.core.uuid(timeout)
310+
self.payload_uuid ||= self.core.uuid(timeout)
313311

314312
return true
315313
rescue ::Rex::Post::Meterpreter::RequestError

lib/rex/payloads/meterpreter/config.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ class Rex::Payloads::Meterpreter::Config
88

99
include Msf::ReflectiveDLLLoader
1010

11-
UUID_SIZE = 64
1211
URL_SIZE = 512
1312
UA_SIZE = 256
1413
PROXY_HOST_SIZE = 128
@@ -48,7 +47,7 @@ def to_ascii(item, size)
4847
end
4948

5049
def session_block(opts)
51-
uuid = to_str(opts[:uuid].to_raw, UUID_SIZE)
50+
uuid = opts[:uuid].to_raw
5251
exit_func = Msf::Payload::Windows.exit_types[opts[:exitfunk]]
5352

5453
session_data = [

lib/rex/post/meterpreter/packet.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ module Meterpreter
102102
TLV_TYPE_TRANS_GROUP = TLV_META_TYPE_GROUP | 441
103103

104104
TLV_TYPE_MACHINE_ID = TLV_META_TYPE_STRING | 460
105-
TLV_TYPE_UUID = TLV_META_TYPE_STRING | 461
105+
TLV_TYPE_UUID = TLV_META_TYPE_RAW | 461
106106

107107
TLV_TYPE_CIPHER_NAME = TLV_META_TYPE_STRING | 500
108108
TLV_TYPE_CIPHER_PARAMETERS = TLV_META_TYPE_GROUP | 501

metasploit-framework.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Gem::Specification.new do |spec|
6464
# are needed when there's no database
6565
spec.add_runtime_dependency 'metasploit-model', '~> 1.0'
6666
# Needed for Meterpreter on Windows, soon others.
67-
spec.add_runtime_dependency 'metasploit-payloads', '0.0.6'
67+
spec.add_runtime_dependency 'metasploit-payloads', '0.0.7'
6868
# Needed by msfgui and other rpc components
6969
spec.add_runtime_dependency 'msgpack'
7070
# Needed by anemone crawler

modules/payloads/singles/windows/meterpreter_bind_tcp.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
module Metasploit4
1515

16-
CachedSize = 884382
16+
CachedSize = 884270
1717

1818
include Msf::Payload::TransportConfig
1919
include Msf::Payload::Windows

modules/payloads/singles/windows/meterpreter_reverse_http.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
module Metasploit4
1515

16-
CachedSize = 885426
16+
CachedSize = 885314
1717

1818
include Msf::Payload::TransportConfig
1919
include Msf::Payload::Windows

modules/payloads/singles/windows/meterpreter_reverse_https.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
module Metasploit4
1515

16-
CachedSize = 885426
16+
CachedSize = 885314
1717

1818
include Msf::Payload::TransportConfig
1919
include Msf::Payload::Windows

modules/payloads/singles/windows/meterpreter_reverse_ipv6_tcp.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
module Metasploit4
1515

16-
CachedSize = 884382
16+
CachedSize = 884270
1717

1818
include Msf::Payload::TransportConfig
1919
include Msf::Payload::Windows

modules/payloads/singles/windows/meterpreter_reverse_tcp.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
module Metasploit3
1515

16-
CachedSize = 884382
16+
CachedSize = 884270
1717

1818
include Msf::Payload::TransportConfig
1919
include Msf::Payload::Windows

0 commit comments

Comments
 (0)