From 9d20d057dd6845ced9abf00ae60983c47a10577d Mon Sep 17 00:00:00 2001 From: OJ Date: Fri, 20 Mar 2015 13:16:43 +1000 Subject: [PATCH] Update Meterpreter URL length to 512 --- lib/msf/core/payload/windows/stageless_meterpreter.rb | 2 +- lib/rex/payloads/meterpreter/patch.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/msf/core/payload/windows/stageless_meterpreter.rb b/lib/msf/core/payload/windows/stageless_meterpreter.rb index f07659b0af..1c79d9ecd1 100644 --- a/lib/msf/core/payload/windows/stageless_meterpreter.rb +++ b/lib/msf/core/payload/windows/stageless_meterpreter.rb @@ -77,7 +77,7 @@ module Payload::Windows::StagelessMeterpreter # the URL might not be given, as it might be patched in some other way if url # Patch the URL using the patcher as this upports both ASCII and WCHAR. - Rex::Payloads::Meterpreter::Patch.patch_string!(dll, "https://#{'X' * 256}", "s#{url}\x00") + Rex::Payloads::Meterpreter::Patch.patch_string!(dll, "https://#{'X' * 512}", "s#{url}\x00") end # if a block is given then call that with the meterpreter dll diff --git a/lib/rex/payloads/meterpreter/patch.rb b/lib/rex/payloads/meterpreter/patch.rb index 216fa69e3e..67aba9e855 100644 --- a/lib/rex/payloads/meterpreter/patch.rb +++ b/lib/rex/payloads/meterpreter/patch.rb @@ -18,7 +18,7 @@ module Rex # Replace the URL def self.patch_url!(blob, url) - patch_string!(blob, "https://#{"X" * 256}", url) + patch_string!(blob, "https://#{'X' * 512}", url) end # Replace the session expiration timeout