Fix UUID code so that it always deals with 16 bytes

Also re-add the payload ID to session validation now that the UUID stuff
is reliable.
unstable
OJ 2015-05-17 17:29:47 +10:00
parent 636d8151d0
commit d725554a87
3 changed files with 3 additions and 6 deletions

View File

@ -307,9 +307,7 @@ class Meterpreter < Rex::Post::Meterpreter::Client
begin
self.machine_id = self.core.machine_id(timeout)
# This is causing breakages thanks to Meterpeter not doing what it should
# be doing with the uuid.
#self.payload_uuid ||= self.core.uuid(timeout)
self.payload_uuid ||= self.core.uuid(timeout)
return true
rescue ::Rex::Post::Meterpreter::RequestError

View File

@ -8,7 +8,6 @@ class Rex::Payloads::Meterpreter::Config
include Msf::ReflectiveDLLLoader
UUID_SIZE = 64
URL_SIZE = 512
UA_SIZE = 256
PROXY_HOST_SIZE = 128
@ -48,7 +47,7 @@ private
end
def session_block(opts)
uuid = to_str(opts[:uuid].to_raw, UUID_SIZE)
uuid = opts[:uuid].to_raw
exit_func = Msf::Payload::Windows.exit_types[opts[:exitfunk]]
session_data = [

View File

@ -102,7 +102,7 @@ TLV_TYPE_TRANS_RETRY_WAIT = TLV_META_TYPE_UINT | 440
TLV_TYPE_TRANS_GROUP = TLV_META_TYPE_GROUP | 441
TLV_TYPE_MACHINE_ID = TLV_META_TYPE_STRING | 460
TLV_TYPE_UUID = TLV_META_TYPE_STRING | 461
TLV_TYPE_UUID = TLV_META_TYPE_RAW | 461
TLV_TYPE_CIPHER_NAME = TLV_META_TYPE_STRING | 500
TLV_TYPE_CIPHER_PARAMETERS = TLV_META_TYPE_GROUP | 501