From 919b96e4cf7605779fdd8cdcd1f75e96f58067b3 Mon Sep 17 00:00:00 2001 From: OJ Date: Tue, 28 Apr 2015 21:59:19 +1000 Subject: [PATCH] Fix up UUID handling --- lib/rex/payloads/meterpreter/config.rb | 4 ++-- lib/rex/post/meterpreter/client_core.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/rex/payloads/meterpreter/config.rb b/lib/rex/payloads/meterpreter/config.rb index a7c537e9ff..740b5db6c7 100644 --- a/lib/rex/payloads/meterpreter/config.rb +++ b/lib/rex/payloads/meterpreter/config.rb @@ -35,14 +35,14 @@ private end def session_block(opts) - uuid = to_wchar_t(opts[:uuid], UUID_SIZE) + uuid = to_wchar_t(opts[:uuid].to_raw, UUID_SIZE) exit_func = Msf::Payload::Windows.exit_types[opts[:exitfunk]] session_data = [ 0, # comms socket, patched in by the stager exit_func, # exit function identifer opts[:expiration], # Session expiry - uuid, # the URL to use + uuid # the UUID ] session_data.pack("VVVA*") diff --git a/lib/rex/post/meterpreter/client_core.rb b/lib/rex/post/meterpreter/client_core.rb index 38c9d59722..686bd0600f 100644 --- a/lib/rex/post/meterpreter/client_core.rb +++ b/lib/rex/post/meterpreter/client_core.rb @@ -280,7 +280,7 @@ class ClientCore < Extension id = response.get_tlv_value(TLV_TYPE_UUID) - return id + return Msf::Payload::UUID.new({:raw => id}) end def machine_id