diff --git a/Gemfile.lock b/Gemfile.lock index 3054835c12..495a464af2 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -19,7 +19,7 @@ PATH metasploit-model metasploit-payloads (= 1.3.19) metasploit_data_models - metasploit_payloads-mettle (= 0.2.8) + metasploit_payloads-mettle (= 0.3.2) msgpack nessus_rest net-ssh @@ -188,7 +188,7 @@ GEM postgres_ext railties (~> 4.2.6) recog (~> 2.0) - metasploit_payloads-mettle (0.2.8) + metasploit_payloads-mettle (0.3.2) method_source (0.9.0) mini_portile2 (2.3.0) minitest (5.10.3) diff --git a/lib/msf/base/sessions/meterpreter.rb b/lib/msf/base/sessions/meterpreter.rb index 3e13987fb1..f75c9e8d53 100644 --- a/lib/msf/base/sessions/meterpreter.rb +++ b/lib/msf/base/sessions/meterpreter.rb @@ -635,24 +635,26 @@ class Meterpreter < Rex::Post::Meterpreter::Client # Platform-agnostic archs go first case self.arch when 'java' - 'jar' + ['jar'] when 'php' - 'php' + ['php'] when 'python' - 'py' + ['py'] else # otherwise we fall back to the platform case self.platform when 'windows' - "#{self.arch}.dll" + ["#{self.arch}.dll"] when 'linux' , 'aix' , 'hpux' , 'irix' , 'unix' - 'lso' + ['bin', 'elf'] + when 'osx' + ['elf'] when 'android', 'java' - 'jar' + ['jar'] when 'php' - 'php' + ['php'] when 'python' - 'py' + ['py'] else nil end diff --git a/lib/rex/post/meterpreter/client_core.rb b/lib/rex/post/meterpreter/client_core.rb index 79132a548c..b1d001013e 100644 --- a/lib/rex/post/meterpreter/client_core.rb +++ b/lib/rex/post/meterpreter/client_core.rb @@ -195,6 +195,10 @@ class ClientCore < Extension # LibraryFilePath # The path to the library that is to be loaded # + # LibraryFileImage + # Binary object containing the library to be loaded + # (can be used instead of LibraryFilePath) + # # TargetFilePath # The target library path when uploading # @@ -210,12 +214,13 @@ class ClientCore < Extension # def load_library(opts) library_path = opts['LibraryFilePath'] + library_image = opts['LibraryFileImage'] target_path = opts['TargetFilePath'] load_flags = LOAD_LIBRARY_FLAG_LOCAL # No library path, no cookie. - if library_path.nil? - raise ArgumentError, 'No library file path was supplied', caller + if library_path.nil? && library_image.nil? + raise ArgumentError, 'No library file path or image was supplied', caller end # Set up the proper loading flags @@ -234,14 +239,17 @@ class ClientCore < Extension # If we must upload the library, do so now if (load_flags & LOAD_LIBRARY_FLAG_LOCAL) != LOAD_LIBRARY_FLAG_LOCAL - image = '' + if library_image.nil? + # Caller did not provide the image, load it from the path + library_image = '' - ::File.open(library_path, 'rb') { |f| - image = f.read - } + ::File.open(library_path, 'rb') { |f| + library_image = f.read + } + end - if image - request.add_tlv(TLV_TYPE_DATA, image, false, client.capabilities[:zlib]) + if library_image + request.add_tlv(TLV_TYPE_DATA, library_image, false, client.capabilities[:zlib]) else raise RuntimeError, "Failed to serialize library #{library_path}.", caller end @@ -250,8 +258,17 @@ class ClientCore < Extension # path of the local and target so that it gets loaded with a random # name if opts['Extension'] - library_path = "ext#{rand(1000000)}.#{client.binary_suffix}" - target_path = library_path + if client.binary_suffix and client.binary_suffix.size > 1 + m = /(.*)\.(.*)/.match(library_path) + suffix = $2 + elsif client.binary_suffix.size == 1 + suffix = client.binary_suffix[0] + else + suffix = client.binary_suffix + end + + library_path = "ext#{rand(1000000)}.#{suffix}" + target_path = "/tmp/#{library_path}" end end @@ -297,6 +314,22 @@ class ClientCore < Extension raise RuntimeError, "No modules were specified", caller end + modnameprovided = mod + suffix = nil + if not client.binary_suffix + suffix = '' + elsif client.binary_suffix.size > 1 + client.binary_suffix.each { |s| + if (mod =~ /(.*)\.#{s}/ ) + mod = $1 + suffix = s + break + end + } + else + suffix = client.binary_suffix.first + end + # Query the remote instance to see if commands for the extension are # already loaded commands = get_loaded_extension_commands(mod.downcase) @@ -304,22 +337,31 @@ class ClientCore < Extension # if there are existing commands for the given extension, then we can use # what's already there unless commands.length > 0 - # Get us to the installation root and then into data/meterpreter, where - # the file is expected to be - modname = "ext_server_#{mod.downcase}" - path = MetasploitPayloads.meterpreter_path(modname, client.binary_suffix) + image = nil + path = nil + # If client.sys isn't setup, it's a Windows meterpreter + if client.respond_to?(:sys) && !client.sys.config.sysinfo['BuildTuple'].blank? + # Query the payload gem directly for the extension image + image = MetasploitPayloads::Mettle.load_extension(client.sys.config.sysinfo['BuildTuple'], mod.downcase, suffix) + else + # Get us to the installation root and then into data/meterpreter, where + # the file is expected to be + modname = "ext_server_#{mod.downcase}" + path = MetasploitPayloads.meterpreter_path(modname, suffix) - if opts['ExtensionPath'] - path = ::File.expand_path(opts['ExtensionPath']) + if opts['ExtensionPath'] + path = ::File.expand_path(opts['ExtensionPath']) + end end - if path.nil? - raise RuntimeError, "No module of the name #{modname}.#{client.binary_suffix} found", caller + if path.nil? and image.nil? + raise RuntimeError, "No module of the name #{modnameprovided} found", caller end # Load the extension DLL commands = load_library( 'LibraryFilePath' => path, + 'LibraryFileImage' => image, 'UploadLibrary' => true, 'Extension' => true, 'SaveToDisk' => opts['LoadFromDisk']) diff --git a/lib/rex/post/meterpreter/extensions/priv/priv.rb b/lib/rex/post/meterpreter/extensions/priv/priv.rb index 89beacd050..091b3ebe7a 100644 --- a/lib/rex/post/meterpreter/extensions/priv/priv.rb +++ b/lib/rex/post/meterpreter/extensions/priv/priv.rb @@ -45,9 +45,19 @@ class Priv < Extension elevator_name = Rex::Text.rand_text_alpha_lower( 6 ) - elevator_path = MetasploitPayloads.meterpreter_path('elevator', client.binary_suffix) + elevator_path = nil + client.binary_suffix.each { |s| + elevator_path = MetasploitPayloads.meterpreter_path('elevator', s) + if !elevator_path.nil? + break + end + } if elevator_path.nil? - raise RuntimeError, "elevator.#{binary_suffix} not found", caller + elevators = "" + client.binary_suffix.each { |s| + elevators << "elevator.#{s}, " + } + raise RuntimeError, "#{elevators.chomp(', ')} not found", caller end elevator_data = "" diff --git a/lib/rex/post/meterpreter/extensions/sniffer/sniffer.rb b/lib/rex/post/meterpreter/extensions/sniffer/sniffer.rb index 2dccbe71e0..02f5421d45 100644 --- a/lib/rex/post/meterpreter/extensions/sniffer/sniffer.rb +++ b/lib/rex/post/meterpreter/extensions/sniffer/sniffer.rb @@ -39,7 +39,13 @@ class Sniffer < Extension response.each(TLV_TYPE_SNIFFER_INTERFACES) { |p| vals = p.tlvs.map{|x| x.value } iface = { } - ikeys = %W{idx name description type mtu wireless usable dhcp} + if vals.length == 8 + # Windows + ikeys = %W{idx name description type mtu wireless usable dhcp} + else + # Mettle + ikeys = %W{idx name description usable} + end ikeys.each_index { |i| iface[ikeys[i]] = vals[i] } ifaces << iface } diff --git a/lib/rex/post/meterpreter/extensions/stdapi/sys/config.rb b/lib/rex/post/meterpreter/extensions/stdapi/sys/config.rb index 83aa6694da..7788e9bf7f 100644 --- a/lib/rex/post/meterpreter/extensions/stdapi/sys/config.rb +++ b/lib/rex/post/meterpreter/extensions/stdapi/sys/config.rb @@ -122,6 +122,7 @@ class Config 'Computer' => response.get_tlv_value(TLV_TYPE_COMPUTER_NAME), 'OS' => response.get_tlv_value(TLV_TYPE_OS_NAME), 'Architecture' => response.get_tlv_value(TLV_TYPE_ARCHITECTURE), + 'BuildTuple' => response.get_tlv_value(TLV_TYPE_BUILD_TUPLE), 'System Language' => response.get_tlv_value(TLV_TYPE_LANG_SYSTEM), 'Domain' => response.get_tlv_value(TLV_TYPE_DOMAIN), 'Logged On Users' => response.get_tlv_value(TLV_TYPE_LOGGED_ON_USER_COUNT) diff --git a/lib/rex/post/meterpreter/extensions/stdapi/tlv.rb b/lib/rex/post/meterpreter/extensions/stdapi/tlv.rb index 5a00e8a111..d08caa3e90 100644 --- a/lib/rex/post/meterpreter/extensions/stdapi/tlv.rb +++ b/lib/rex/post/meterpreter/extensions/stdapi/tlv.rb @@ -130,6 +130,7 @@ TLV_TYPE_SID = TLV_META_TYPE_STRING | 1045 TLV_TYPE_DOMAIN = TLV_META_TYPE_STRING | 1046 TLV_TYPE_LOGGED_ON_USER_COUNT = TLV_META_TYPE_UINT | 1047 TLV_TYPE_LOCAL_DATETIME = TLV_META_TYPE_STRING | 1048 +TLV_TYPE_BUILD_TUPLE = TLV_META_TYPE_STRING | 1049 # Environment TLV_TYPE_ENV_VARIABLE = TLV_META_TYPE_STRING | 1100 diff --git a/lib/rex/post/meterpreter/ui/console/command_dispatcher/core.rb b/lib/rex/post/meterpreter/ui/console/command_dispatcher/core.rb index 5d854c6fd1..cd81a03b10 100644 --- a/lib/rex/post/meterpreter/ui/console/command_dispatcher/core.rb +++ b/lib/rex/post/meterpreter/ui/console/command_dispatcher/core.rb @@ -1147,14 +1147,27 @@ class Console::CommandDispatcher::Core case opt when '-l' exts = SortedSet.new - msf_path = MetasploitPayloads.msf_meterpreter_dir - gem_path = MetasploitPayloads.local_meterpreter_dir - [msf_path, gem_path].each do |path| - ::Dir.entries(path).each { |f| - if (::File.file?(::File.join(path, f)) && f =~ /ext_server_(.*)\.#{client.binary_suffix}/ ) - exts.add($1) - end - } + if !client.sys.config.sysinfo['BuildTuple'].blank? + # Use API to get list of extensions from the gem + exts.merge(MetasploitPayloads::Mettle.available_extensions(client.sys.config.sysinfo['BuildTuple'])) + else + msf_path = MetasploitPayloads.msf_meterpreter_dir + gem_path = MetasploitPayloads.local_meterpreter_dir + [msf_path, gem_path].each do |path| + ::Dir.entries(path).each { |f| + if (::File.file?(::File.join(path, f))) + client.binary_suffix.each { |s| + if (f =~ /ext_server_(.*)\.#{s}/ ) + if (client.binary_suffix.size > 1) + exts.add($1 + ".#{s}") + else + exts.add($1) + end + end + } + end + } + end end print(exts.to_a.join("\n") + "\n") @@ -1168,7 +1181,16 @@ class Console::CommandDispatcher::Core # Load each of the modules args.each { |m| md = m.downcase + modulenameprovided = md + if client.binary_suffix and client.binary_suffix.size > 1 + client.binary_suffix.each { |s| + if (md =~ /(.*)\.#{s}/ ) + md = $1 + break + end + } + end if (extensions.include?(md)) print_error("The '#{md}' extension has already been loaded.") next @@ -1178,7 +1200,7 @@ class Console::CommandDispatcher::Core begin # Use the remote side, then load the client-side - if (client.core.use(md) == true) + if (client.core.use(modulenameprovided) == true) add_extension_client(md) end rescue @@ -1195,16 +1217,31 @@ class Console::CommandDispatcher::Core def cmd_load_tabs(str, words) tabs = SortedSet.new - msf_path = MetasploitPayloads.msf_meterpreter_dir - gem_path = MetasploitPayloads.local_meterpreter_dir - [msf_path, gem_path].each do |path| - ::Dir.entries(path).each { |f| - if (::File.file?(::File.join(path, f)) && f =~ /ext_server_(.*)\.#{client.binary_suffix}/ ) - if (not extensions.include?($1)) - tabs.add($1) + if !client.sys.config.sysinfo['BuildTuple'].blank? + # Use API to get list of extensions from the gem + MetasploitPayloads::Mettle.available_extensions(client.sys.config.sysinfo['BuildTuple']).each { |f| + if !extensions.include?(f.split('.').first) + tabs.add(f) end + } + else + msf_path = MetasploitPayloads.msf_meterpreter_dir + gem_path = MetasploitPayloads.local_meterpreter_dir + [msf_path, gem_path].each do |path| + ::Dir.entries(path).each { |f| + if (::File.file?(::File.join(path, f))) + client.binary_suffix.each { |s| + if (f =~ /ext_server_(.*)\.#{s}/ ) + if (client.binary_suffix.size > 1 && !extensions.include?($1 + ".#{s}")) + tabs.add($1 + ".#{s}") + elsif (!extensions.include?($1)) + tabs.add($1) + end + end + } + end + } end - } end return tabs.to_a end diff --git a/lib/rex/post/meterpreter/ui/console/command_dispatcher/sniffer.rb b/lib/rex/post/meterpreter/ui/console/command_dispatcher/sniffer.rb index f15db113d8..6748e25d12 100644 --- a/lib/rex/post/meterpreter/ui/console/command_dispatcher/sniffer.rb +++ b/lib/rex/post/meterpreter/ui/console/command_dispatcher/sniffer.rb @@ -28,14 +28,26 @@ class Console::CommandDispatcher::Sniffer # List of supported commands. # def commands + #all = { { "sniffer_interfaces" => "Enumerate all sniffable network interfaces", "sniffer_start" => "Start packet capture on a specific interface", "sniffer_stop" => "Stop packet capture on a specific interface", "sniffer_stats" => "View statistics of an active capture", "sniffer_dump" => "Retrieve captured packet data to PCAP file", - "sniffer_release" => "Free captured packets on a specific interface instead of downloading them", + "sniffer_release" => "Free captured packets on a specific interface instead of downloading them" } + + #reqs = { + # "sniffer_interfaces" => ['sniffer_interfaces'], + # "sniffer_start" => ['sniffer_capture_start'], + # "sniffer_stop" => ['sniffer_capture_stop'], + # "sniffer_stats" => ['sniffer_capture_stats'], + # "sniffer_dump" => ['sniffer_capture_dump'], + # "sniffer_release" => ['sniffer_capture_release'] + #} + + #filter_commands(all, reqs) end @@ -46,10 +58,18 @@ class Console::CommandDispatcher::Sniffer print_line() ifaces.each do |i| - print_line(sprintf("%d - '%s' ( type:%d mtu:%d usable:%s dhcp:%s wifi:%s )", - i['idx'], i['description'], - i['type'], i['mtu'], i['usable'], i['dhcp'], i['wireless']) - ) + if i.length == 8 + # Windows + print_line(sprintf("%d - '%s' ( type:%d mtu:%d usable:%s dhcp:%s wifi:%s )", + i['idx'], i['description'], + i['type'], i['mtu'], i['usable'], i['dhcp'], i['wireless']) + ) + else + # Mettle + print_line(sprintf("%d - '%s' ( usable:%s )", + i['idx'], i['description'], i['usable']) + ) + end end print_line() @@ -167,10 +187,10 @@ class Console::CommandDispatcher::Sniffer # TODO: reorder packets based on the ID (only an issue if the buffer wraps) while(true) buf = od.read(20) - break if not buf + break unless buf idh,idl,thi,tlo,len = buf.unpack('N5') - break if not len + break unless len if(len > 10000) print_error("Corrupted packet data (length:#{len})") break diff --git a/metasploit-framework.gemspec b/metasploit-framework.gemspec index e40b614d2c..00dfecfd41 100644 --- a/metasploit-framework.gemspec +++ b/metasploit-framework.gemspec @@ -72,7 +72,7 @@ Gem::Specification.new do |spec| # Needed for Meterpreter spec.add_runtime_dependency 'metasploit-payloads', '1.3.19' # Needed for the next-generation POSIX Meterpreter - spec.add_runtime_dependency 'metasploit_payloads-mettle', '0.2.8' + spec.add_runtime_dependency 'metasploit_payloads-mettle', '0.3.2' # Needed by msfgui and other rpc components spec.add_runtime_dependency 'msgpack' # get list of network interfaces, like eth* from OS. diff --git a/modules/payloads/singles/linux/aarch64/meterpreter_reverse_http.rb b/modules/payloads/singles/linux/aarch64/meterpreter_reverse_http.rb index 74c9255f11..748c528ded 100644 --- a/modules/payloads/singles/linux/aarch64/meterpreter_reverse_http.rb +++ b/modules/payloads/singles/linux/aarch64/meterpreter_reverse_http.rb @@ -10,7 +10,7 @@ require 'msf/base/sessions/meterpreter_aarch64_linux' module MetasploitModule - CachedSize = 693880 + CachedSize = 966280 include Msf::Payload::Single include Msf::Sessions::MeterpreterOptions diff --git a/modules/payloads/singles/linux/aarch64/meterpreter_reverse_https.rb b/modules/payloads/singles/linux/aarch64/meterpreter_reverse_https.rb index b1c6ffcd4e..a153f85288 100644 --- a/modules/payloads/singles/linux/aarch64/meterpreter_reverse_https.rb +++ b/modules/payloads/singles/linux/aarch64/meterpreter_reverse_https.rb @@ -10,7 +10,7 @@ require 'msf/base/sessions/meterpreter_aarch64_linux' module MetasploitModule - CachedSize = 693880 + CachedSize = 966280 include Msf::Payload::Single include Msf::Sessions::MeterpreterOptions diff --git a/modules/payloads/singles/linux/aarch64/meterpreter_reverse_tcp.rb b/modules/payloads/singles/linux/aarch64/meterpreter_reverse_tcp.rb index d6818b4eb2..97a9cad2de 100644 --- a/modules/payloads/singles/linux/aarch64/meterpreter_reverse_tcp.rb +++ b/modules/payloads/singles/linux/aarch64/meterpreter_reverse_tcp.rb @@ -10,7 +10,7 @@ require 'msf/base/sessions/meterpreter_aarch64_linux' module MetasploitModule - CachedSize = 693880 + CachedSize = 966280 include Msf::Payload::Single include Msf::Sessions::MeterpreterOptions diff --git a/modules/payloads/singles/linux/armbe/meterpreter_reverse_http.rb b/modules/payloads/singles/linux/armbe/meterpreter_reverse_http.rb index f44197a497..48969bf801 100644 --- a/modules/payloads/singles/linux/armbe/meterpreter_reverse_http.rb +++ b/modules/payloads/singles/linux/armbe/meterpreter_reverse_http.rb @@ -10,7 +10,7 @@ require 'msf/base/sessions/meterpreter_armbe_linux' module MetasploitModule - CachedSize = 682608 + CachedSize = 902524 include Msf::Payload::Single include Msf::Sessions::MeterpreterOptions diff --git a/modules/payloads/singles/linux/armbe/meterpreter_reverse_https.rb b/modules/payloads/singles/linux/armbe/meterpreter_reverse_https.rb index 6341bee2ae..e16a901ba3 100644 --- a/modules/payloads/singles/linux/armbe/meterpreter_reverse_https.rb +++ b/modules/payloads/singles/linux/armbe/meterpreter_reverse_https.rb @@ -10,7 +10,7 @@ require 'msf/base/sessions/meterpreter_armbe_linux' module MetasploitModule - CachedSize = 682608 + CachedSize = 902524 include Msf::Payload::Single include Msf::Sessions::MeterpreterOptions diff --git a/modules/payloads/singles/linux/armbe/meterpreter_reverse_tcp.rb b/modules/payloads/singles/linux/armbe/meterpreter_reverse_tcp.rb index 634b6560ef..5380aa8776 100644 --- a/modules/payloads/singles/linux/armbe/meterpreter_reverse_tcp.rb +++ b/modules/payloads/singles/linux/armbe/meterpreter_reverse_tcp.rb @@ -10,7 +10,7 @@ require 'msf/base/sessions/meterpreter_armbe_linux' module MetasploitModule - CachedSize = 682608 + CachedSize = 902524 include Msf::Payload::Single include Msf::Sessions::MeterpreterOptions diff --git a/modules/payloads/singles/linux/armle/meterpreter_reverse_http.rb b/modules/payloads/singles/linux/armle/meterpreter_reverse_http.rb index cf5d0c6be7..09be944245 100644 --- a/modules/payloads/singles/linux/armle/meterpreter_reverse_http.rb +++ b/modules/payloads/singles/linux/armle/meterpreter_reverse_http.rb @@ -10,7 +10,7 @@ require 'msf/base/sessions/meterpreter_armle_linux' module MetasploitModule - CachedSize = 682608 + CachedSize = 898776 include Msf::Payload::Single include Msf::Sessions::MeterpreterOptions diff --git a/modules/payloads/singles/linux/armle/meterpreter_reverse_https.rb b/modules/payloads/singles/linux/armle/meterpreter_reverse_https.rb index ed339b08b0..bb4712dd3a 100644 --- a/modules/payloads/singles/linux/armle/meterpreter_reverse_https.rb +++ b/modules/payloads/singles/linux/armle/meterpreter_reverse_https.rb @@ -10,7 +10,7 @@ require 'msf/base/sessions/meterpreter_armle_linux' module MetasploitModule - CachedSize = 682608 + CachedSize = 898776 include Msf::Payload::Single include Msf::Sessions::MeterpreterOptions diff --git a/modules/payloads/singles/linux/armle/meterpreter_reverse_tcp.rb b/modules/payloads/singles/linux/armle/meterpreter_reverse_tcp.rb index 50080e27d1..b22a8b742c 100644 --- a/modules/payloads/singles/linux/armle/meterpreter_reverse_tcp.rb +++ b/modules/payloads/singles/linux/armle/meterpreter_reverse_tcp.rb @@ -10,7 +10,7 @@ require 'msf/base/sessions/meterpreter_armle_linux' module MetasploitModule - CachedSize = 682608 + CachedSize = 898776 include Msf::Payload::Single include Msf::Sessions::MeterpreterOptions diff --git a/modules/payloads/singles/linux/mips64/meterpreter_reverse_http.rb b/modules/payloads/singles/linux/mips64/meterpreter_reverse_http.rb index 5d755982a8..75846e6148 100644 --- a/modules/payloads/singles/linux/mips64/meterpreter_reverse_http.rb +++ b/modules/payloads/singles/linux/mips64/meterpreter_reverse_http.rb @@ -10,7 +10,7 @@ require 'msf/base/sessions/meterpreter_mips64_linux' module MetasploitModule - CachedSize = 1081096 + CachedSize = 1384552 include Msf::Payload::Single include Msf::Sessions::MeterpreterOptions diff --git a/modules/payloads/singles/linux/mips64/meterpreter_reverse_https.rb b/modules/payloads/singles/linux/mips64/meterpreter_reverse_https.rb index d38aa97904..e299cb17e8 100644 --- a/modules/payloads/singles/linux/mips64/meterpreter_reverse_https.rb +++ b/modules/payloads/singles/linux/mips64/meterpreter_reverse_https.rb @@ -10,7 +10,7 @@ require 'msf/base/sessions/meterpreter_mips64_linux' module MetasploitModule - CachedSize = 1081096 + CachedSize = 1384552 include Msf::Payload::Single include Msf::Sessions::MeterpreterOptions diff --git a/modules/payloads/singles/linux/mips64/meterpreter_reverse_tcp.rb b/modules/payloads/singles/linux/mips64/meterpreter_reverse_tcp.rb index ea96d086d2..93671fb0c4 100644 --- a/modules/payloads/singles/linux/mips64/meterpreter_reverse_tcp.rb +++ b/modules/payloads/singles/linux/mips64/meterpreter_reverse_tcp.rb @@ -10,7 +10,7 @@ require 'msf/base/sessions/meterpreter_mips64_linux' module MetasploitModule - CachedSize = 1081096 + CachedSize = 1384552 include Msf::Payload::Single include Msf::Sessions::MeterpreterOptions diff --git a/modules/payloads/singles/linux/mipsbe/meterpreter_reverse_http.rb b/modules/payloads/singles/linux/mipsbe/meterpreter_reverse_http.rb index 8ab191d710..beb16c74c9 100644 --- a/modules/payloads/singles/linux/mipsbe/meterpreter_reverse_http.rb +++ b/modules/payloads/singles/linux/mipsbe/meterpreter_reverse_http.rb @@ -10,7 +10,7 @@ require 'msf/base/sessions/meterpreter_mipsbe_linux' module MetasploitModule - CachedSize = 1058488 + CachedSize = 1280872 include Msf::Payload::Single include Msf::Sessions::MeterpreterOptions diff --git a/modules/payloads/singles/linux/mipsbe/meterpreter_reverse_https.rb b/modules/payloads/singles/linux/mipsbe/meterpreter_reverse_https.rb index b3aa33d864..1c6adb7bbf 100644 --- a/modules/payloads/singles/linux/mipsbe/meterpreter_reverse_https.rb +++ b/modules/payloads/singles/linux/mipsbe/meterpreter_reverse_https.rb @@ -10,7 +10,7 @@ require 'msf/base/sessions/meterpreter_mipsbe_linux' module MetasploitModule - CachedSize = 1058488 + CachedSize = 1280872 include Msf::Payload::Single include Msf::Sessions::MeterpreterOptions diff --git a/modules/payloads/singles/linux/mipsbe/meterpreter_reverse_tcp.rb b/modules/payloads/singles/linux/mipsbe/meterpreter_reverse_tcp.rb index fce512c439..942611a9d4 100644 --- a/modules/payloads/singles/linux/mipsbe/meterpreter_reverse_tcp.rb +++ b/modules/payloads/singles/linux/mipsbe/meterpreter_reverse_tcp.rb @@ -10,7 +10,7 @@ require 'msf/base/sessions/meterpreter_mipsbe_linux' module MetasploitModule - CachedSize = 1058488 + CachedSize = 1280872 include Msf::Payload::Single include Msf::Sessions::MeterpreterOptions diff --git a/modules/payloads/singles/linux/mipsle/meterpreter_reverse_http.rb b/modules/payloads/singles/linux/mipsle/meterpreter_reverse_http.rb index 35b4a3ada0..6d2bd7d6bb 100644 --- a/modules/payloads/singles/linux/mipsle/meterpreter_reverse_http.rb +++ b/modules/payloads/singles/linux/mipsle/meterpreter_reverse_http.rb @@ -10,7 +10,7 @@ require 'msf/base/sessions/meterpreter_mipsle_linux' module MetasploitModule - CachedSize = 1058584 + CachedSize = 1281916 include Msf::Payload::Single include Msf::Sessions::MeterpreterOptions diff --git a/modules/payloads/singles/linux/mipsle/meterpreter_reverse_https.rb b/modules/payloads/singles/linux/mipsle/meterpreter_reverse_https.rb index e92e5319f3..78b921b6fb 100644 --- a/modules/payloads/singles/linux/mipsle/meterpreter_reverse_https.rb +++ b/modules/payloads/singles/linux/mipsle/meterpreter_reverse_https.rb @@ -10,7 +10,7 @@ require 'msf/base/sessions/meterpreter_mipsle_linux' module MetasploitModule - CachedSize = 1058584 + CachedSize = 1281916 include Msf::Payload::Single include Msf::Sessions::MeterpreterOptions diff --git a/modules/payloads/singles/linux/mipsle/meterpreter_reverse_tcp.rb b/modules/payloads/singles/linux/mipsle/meterpreter_reverse_tcp.rb index ab9bbd211b..792a55b199 100644 --- a/modules/payloads/singles/linux/mipsle/meterpreter_reverse_tcp.rb +++ b/modules/payloads/singles/linux/mipsle/meterpreter_reverse_tcp.rb @@ -10,7 +10,7 @@ require 'msf/base/sessions/meterpreter_mipsle_linux' module MetasploitModule - CachedSize = 1058584 + CachedSize = 1281916 include Msf::Payload::Single include Msf::Sessions::MeterpreterOptions diff --git a/modules/payloads/singles/linux/ppc/meterpreter_reverse_http.rb b/modules/payloads/singles/linux/ppc/meterpreter_reverse_http.rb index 684af558e5..68cd6961ed 100644 --- a/modules/payloads/singles/linux/ppc/meterpreter_reverse_http.rb +++ b/modules/payloads/singles/linux/ppc/meterpreter_reverse_http.rb @@ -10,7 +10,7 @@ require 'msf/base/sessions/meterpreter_ppc_linux' module MetasploitModule - CachedSize = 856196 + CachedSize = 1060624 include Msf::Payload::Single include Msf::Sessions::MeterpreterOptions diff --git a/modules/payloads/singles/linux/ppc/meterpreter_reverse_https.rb b/modules/payloads/singles/linux/ppc/meterpreter_reverse_https.rb index 92fad1845a..eafc0870bb 100644 --- a/modules/payloads/singles/linux/ppc/meterpreter_reverse_https.rb +++ b/modules/payloads/singles/linux/ppc/meterpreter_reverse_https.rb @@ -10,7 +10,7 @@ require 'msf/base/sessions/meterpreter_ppc_linux' module MetasploitModule - CachedSize = 856196 + CachedSize = 1060624 include Msf::Payload::Single include Msf::Sessions::MeterpreterOptions diff --git a/modules/payloads/singles/linux/ppc/meterpreter_reverse_tcp.rb b/modules/payloads/singles/linux/ppc/meterpreter_reverse_tcp.rb index 5a607842fd..33dcace433 100644 --- a/modules/payloads/singles/linux/ppc/meterpreter_reverse_tcp.rb +++ b/modules/payloads/singles/linux/ppc/meterpreter_reverse_tcp.rb @@ -10,7 +10,7 @@ require 'msf/base/sessions/meterpreter_ppc_linux' module MetasploitModule - CachedSize = 856196 + CachedSize = 1060624 include Msf::Payload::Single include Msf::Sessions::MeterpreterOptions diff --git a/modules/payloads/singles/linux/ppc64le/meterpreter_reverse_http.rb b/modules/payloads/singles/linux/ppc64le/meterpreter_reverse_http.rb index 20d3b4aa74..bc303520da 100644 --- a/modules/payloads/singles/linux/ppc64le/meterpreter_reverse_http.rb +++ b/modules/payloads/singles/linux/ppc64le/meterpreter_reverse_http.rb @@ -10,7 +10,7 @@ require 'msf/base/sessions/meterpreter_ppc64le_linux' module MetasploitModule - CachedSize = 857808 + CachedSize = 1014112 include Msf::Payload::Single include Msf::Sessions::MeterpreterOptions diff --git a/modules/payloads/singles/linux/ppc64le/meterpreter_reverse_https.rb b/modules/payloads/singles/linux/ppc64le/meterpreter_reverse_https.rb index d0fed27439..1be0eb35b0 100644 --- a/modules/payloads/singles/linux/ppc64le/meterpreter_reverse_https.rb +++ b/modules/payloads/singles/linux/ppc64le/meterpreter_reverse_https.rb @@ -10,7 +10,7 @@ require 'msf/base/sessions/meterpreter_ppc64le_linux' module MetasploitModule - CachedSize = 857808 + CachedSize = 1014112 include Msf::Payload::Single include Msf::Sessions::MeterpreterOptions diff --git a/modules/payloads/singles/linux/ppc64le/meterpreter_reverse_tcp.rb b/modules/payloads/singles/linux/ppc64le/meterpreter_reverse_tcp.rb index 5c649a25c9..f89b1f078f 100644 --- a/modules/payloads/singles/linux/ppc64le/meterpreter_reverse_tcp.rb +++ b/modules/payloads/singles/linux/ppc64le/meterpreter_reverse_tcp.rb @@ -10,7 +10,7 @@ require 'msf/base/sessions/meterpreter_ppc64le_linux' module MetasploitModule - CachedSize = 857808 + CachedSize = 1014112 include Msf::Payload::Single include Msf::Sessions::MeterpreterOptions diff --git a/modules/payloads/singles/linux/ppce500v2/meterpreter_reverse_http.rb b/modules/payloads/singles/linux/ppce500v2/meterpreter_reverse_http.rb index 679a3765fc..d0c7fdaa29 100644 --- a/modules/payloads/singles/linux/ppce500v2/meterpreter_reverse_http.rb +++ b/modules/payloads/singles/linux/ppce500v2/meterpreter_reverse_http.rb @@ -10,7 +10,7 @@ require 'msf/base/sessions/meterpreter_ppce500v2_linux' module MetasploitModule - CachedSize = 856196 + CachedSize = 1013304 include Msf::Payload::Single include Msf::Sessions::MeterpreterOptions diff --git a/modules/payloads/singles/linux/ppce500v2/meterpreter_reverse_https.rb b/modules/payloads/singles/linux/ppce500v2/meterpreter_reverse_https.rb index f33ddf8cbb..f29d3b36fe 100644 --- a/modules/payloads/singles/linux/ppce500v2/meterpreter_reverse_https.rb +++ b/modules/payloads/singles/linux/ppce500v2/meterpreter_reverse_https.rb @@ -10,7 +10,7 @@ require 'msf/base/sessions/meterpreter_ppce500v2_linux' module MetasploitModule - CachedSize = 856196 + CachedSize = 1013304 include Msf::Payload::Single include Msf::Sessions::MeterpreterOptions diff --git a/modules/payloads/singles/linux/ppce500v2/meterpreter_reverse_tcp.rb b/modules/payloads/singles/linux/ppce500v2/meterpreter_reverse_tcp.rb index 21eb56cde1..d85a3d01c2 100644 --- a/modules/payloads/singles/linux/ppce500v2/meterpreter_reverse_tcp.rb +++ b/modules/payloads/singles/linux/ppce500v2/meterpreter_reverse_tcp.rb @@ -10,7 +10,7 @@ require 'msf/base/sessions/meterpreter_ppce500v2_linux' module MetasploitModule - CachedSize = 856196 + CachedSize = 1013304 include Msf::Payload::Single include Msf::Sessions::MeterpreterOptions diff --git a/modules/payloads/singles/linux/x64/meterpreter_reverse_http.rb b/modules/payloads/singles/linux/x64/meterpreter_reverse_http.rb index 0fb3aaea5e..8b5b9f83fd 100644 --- a/modules/payloads/singles/linux/x64/meterpreter_reverse_http.rb +++ b/modules/payloads/singles/linux/x64/meterpreter_reverse_http.rb @@ -10,7 +10,7 @@ require 'msf/base/sessions/meterpreter_x64_linux' module MetasploitModule - CachedSize = 746944 + CachedSize = 905984 include Msf::Payload::Single include Msf::Sessions::MeterpreterOptions diff --git a/modules/payloads/singles/linux/x64/meterpreter_reverse_https.rb b/modules/payloads/singles/linux/x64/meterpreter_reverse_https.rb index 6745bb5f9b..8dfc4aa031 100644 --- a/modules/payloads/singles/linux/x64/meterpreter_reverse_https.rb +++ b/modules/payloads/singles/linux/x64/meterpreter_reverse_https.rb @@ -10,7 +10,7 @@ require 'msf/base/sessions/meterpreter_x64_linux' module MetasploitModule - CachedSize = 746944 + CachedSize = 905984 include Msf::Payload::Single include Msf::Sessions::MeterpreterOptions diff --git a/modules/payloads/singles/linux/x64/meterpreter_reverse_tcp.rb b/modules/payloads/singles/linux/x64/meterpreter_reverse_tcp.rb index 0cc26899f3..fc66f7ed71 100644 --- a/modules/payloads/singles/linux/x64/meterpreter_reverse_tcp.rb +++ b/modules/payloads/singles/linux/x64/meterpreter_reverse_tcp.rb @@ -10,7 +10,7 @@ require 'msf/base/sessions/meterpreter_x64_linux' module MetasploitModule - CachedSize = 746944 + CachedSize = 905984 include Msf::Payload::Single include Msf::Sessions::MeterpreterOptions diff --git a/modules/payloads/singles/linux/x86/meterpreter_reverse_http.rb b/modules/payloads/singles/linux/x86/meterpreter_reverse_http.rb index c7da73f173..88d00a81c0 100644 --- a/modules/payloads/singles/linux/x86/meterpreter_reverse_http.rb +++ b/modules/payloads/singles/linux/x86/meterpreter_reverse_http.rb @@ -10,7 +10,7 @@ require 'msf/base/sessions/meterpreter_x86_linux' module MetasploitModule - CachedSize = 794800 + CachedSize = 956868 include Msf::Payload::Single include Msf::Sessions::MeterpreterOptions diff --git a/modules/payloads/singles/linux/x86/meterpreter_reverse_https.rb b/modules/payloads/singles/linux/x86/meterpreter_reverse_https.rb index ac313d906c..402929bbbf 100644 --- a/modules/payloads/singles/linux/x86/meterpreter_reverse_https.rb +++ b/modules/payloads/singles/linux/x86/meterpreter_reverse_https.rb @@ -10,7 +10,7 @@ require 'msf/base/sessions/meterpreter_x86_linux' module MetasploitModule - CachedSize = 794800 + CachedSize = 956868 include Msf::Payload::Single include Msf::Sessions::MeterpreterOptions diff --git a/modules/payloads/singles/linux/x86/meterpreter_reverse_tcp.rb b/modules/payloads/singles/linux/x86/meterpreter_reverse_tcp.rb index d72061e2cc..ed7b1419aa 100644 --- a/modules/payloads/singles/linux/x86/meterpreter_reverse_tcp.rb +++ b/modules/payloads/singles/linux/x86/meterpreter_reverse_tcp.rb @@ -10,7 +10,7 @@ require 'msf/base/sessions/meterpreter_x86_linux' module MetasploitModule - CachedSize = 794800 + CachedSize = 956868 include Msf::Payload::Single include Msf::Sessions::MeterpreterOptions diff --git a/modules/payloads/singles/linux/zarch/meterpreter_reverse_http.rb b/modules/payloads/singles/linux/zarch/meterpreter_reverse_http.rb index a129f3834a..fbb5e7daff 100644 --- a/modules/payloads/singles/linux/zarch/meterpreter_reverse_http.rb +++ b/modules/payloads/singles/linux/zarch/meterpreter_reverse_http.rb @@ -10,7 +10,7 @@ require 'msf/base/sessions/meterpreter_zarch_linux' module MetasploitModule - CachedSize = 907360 + CachedSize = 1071464 include Msf::Payload::Single include Msf::Sessions::MeterpreterOptions diff --git a/modules/payloads/singles/linux/zarch/meterpreter_reverse_https.rb b/modules/payloads/singles/linux/zarch/meterpreter_reverse_https.rb index 9372c91415..c2455679f7 100644 --- a/modules/payloads/singles/linux/zarch/meterpreter_reverse_https.rb +++ b/modules/payloads/singles/linux/zarch/meterpreter_reverse_https.rb @@ -10,7 +10,7 @@ require 'msf/base/sessions/meterpreter_zarch_linux' module MetasploitModule - CachedSize = 907360 + CachedSize = 1071464 include Msf::Payload::Single include Msf::Sessions::MeterpreterOptions diff --git a/modules/payloads/singles/linux/zarch/meterpreter_reverse_tcp.rb b/modules/payloads/singles/linux/zarch/meterpreter_reverse_tcp.rb index 6e099ef231..b711cb5502 100644 --- a/modules/payloads/singles/linux/zarch/meterpreter_reverse_tcp.rb +++ b/modules/payloads/singles/linux/zarch/meterpreter_reverse_tcp.rb @@ -10,7 +10,7 @@ require 'msf/base/sessions/meterpreter_zarch_linux' module MetasploitModule - CachedSize = 907360 + CachedSize = 1071464 include Msf::Payload::Single include Msf::Sessions::MeterpreterOptions diff --git a/modules/payloads/singles/osx/x64/meterpreter_reverse_http.rb b/modules/payloads/singles/osx/x64/meterpreter_reverse_http.rb index f1b9a907df..82b9690de1 100644 --- a/modules/payloads/singles/osx/x64/meterpreter_reverse_http.rb +++ b/modules/payloads/singles/osx/x64/meterpreter_reverse_http.rb @@ -10,7 +10,7 @@ require 'msf/base/sessions/meterpreter_x64_osx' module MetasploitModule - CachedSize = 793284 + CachedSize = 802564 include Msf::Payload::Single include Msf::Sessions::MeterpreterOptions diff --git a/modules/payloads/singles/osx/x64/meterpreter_reverse_https.rb b/modules/payloads/singles/osx/x64/meterpreter_reverse_https.rb index 264643fb7d..e9a59c6758 100644 --- a/modules/payloads/singles/osx/x64/meterpreter_reverse_https.rb +++ b/modules/payloads/singles/osx/x64/meterpreter_reverse_https.rb @@ -10,7 +10,7 @@ require 'msf/base/sessions/meterpreter_x64_osx' module MetasploitModule - CachedSize = 793284 + CachedSize = 802564 include Msf::Payload::Single include Msf::Sessions::MeterpreterOptions diff --git a/modules/payloads/singles/osx/x64/meterpreter_reverse_tcp.rb b/modules/payloads/singles/osx/x64/meterpreter_reverse_tcp.rb index a4d7677fd4..c592aca520 100644 --- a/modules/payloads/singles/osx/x64/meterpreter_reverse_tcp.rb +++ b/modules/payloads/singles/osx/x64/meterpreter_reverse_tcp.rb @@ -10,7 +10,7 @@ require 'msf/base/sessions/meterpreter_x64_osx' module MetasploitModule - CachedSize = 793284 + CachedSize = 802564 include Msf::Payload::Single include Msf::Sessions::MeterpreterOptions diff --git a/spec/lib/rex/post/meterpreter/client_core_spec.rb b/spec/lib/rex/post/meterpreter/client_core_spec.rb index f956f9d317..0313c3f6c2 100644 --- a/spec/lib/rex/post/meterpreter/client_core_spec.rb +++ b/spec/lib/rex/post/meterpreter/client_core_spec.rb @@ -14,7 +14,7 @@ RSpec.describe Rex::Post::Meterpreter::ClientCore do allow(@response).to receive(:result) { 0 } allow(@response).to receive(:each) { [:help] } @client = double("client") - allow(@client).to receive(:binary_suffix) { "x64.dll" } + allow(@client).to receive(:binary_suffix) { ["x64.dll"] } allow(@client).to receive(:capabilities) { {:ssl => false, :zlib => false } } allow(@client).to receive(:response_timeout) { 1 } allow(@client).to receive(:send_packet_wait_response) { @response }