From bdc2e7c3cda636e917b539f076d6569bfc820a1a Mon Sep 17 00:00:00 2001 From: OJ Date: Wed, 30 Nov 2016 16:11:51 +1000 Subject: [PATCH] Fix missing stager_config functions, payload sizes --- modules/payloads/singles/java/shell_reverse_tcp.rb | 4 ++-- modules/payloads/stagers/java/bind_tcp.rb | 2 +- modules/payloads/stagers/java/reverse_http.rb | 2 +- modules/payloads/stagers/java/reverse_https.rb | 2 +- modules/payloads/stagers/multi/reverse_http.rb | 2 +- modules/payloads/stagers/multi/reverse_https.rb | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/payloads/singles/java/shell_reverse_tcp.rb b/modules/payloads/singles/java/shell_reverse_tcp.rb index 8a8cd0645a..9c1e7e70f8 100644 --- a/modules/payloads/singles/java/shell_reverse_tcp.rb +++ b/modules/payloads/singles/java/shell_reverse_tcp.rb @@ -57,12 +57,12 @@ module MetasploitModule jar.add_file(path.join("/"), data) end jar.build_manifest(:main_class => "metasploit.Payload") - jar.add_file("metasploit.dat", config) + jar.add_file("metasploit.dat", stager_config) jar end - def config + def stager_config c = "" c << "LHOST=#{datastore["LHOST"]}\n" if datastore["LHOST"] c << "LPORT=#{datastore["LPORT"]}\n" if datastore["LPORT"] diff --git a/modules/payloads/stagers/java/bind_tcp.rb b/modules/payloads/stagers/java/bind_tcp.rb index d6d8c0e14e..36252b0490 100644 --- a/modules/payloads/stagers/java/bind_tcp.rb +++ b/modules/payloads/stagers/java/bind_tcp.rb @@ -41,7 +41,7 @@ module MetasploitModule @class_files = [ ] end - def config + def stager_config spawn = datastore["Spawn"] || 2 c = "" c << "Spawn=#{spawn}\n" diff --git a/modules/payloads/stagers/java/reverse_http.rb b/modules/payloads/stagers/java/reverse_http.rb index 4c1d36456a..57e76e2ae4 100644 --- a/modules/payloads/stagers/java/reverse_http.rb +++ b/modules/payloads/stagers/java/reverse_http.rb @@ -9,7 +9,7 @@ require 'msf/core/payload/java/reverse_http' module MetasploitModule - CachedSize = 5123 + CachedSize = :dynamic include Msf::Payload::Stager include Msf::Payload::Java diff --git a/modules/payloads/stagers/java/reverse_https.rb b/modules/payloads/stagers/java/reverse_https.rb index 7e5ffde76c..27ee99d210 100644 --- a/modules/payloads/stagers/java/reverse_https.rb +++ b/modules/payloads/stagers/java/reverse_https.rb @@ -10,7 +10,7 @@ require 'msf/core/payload/java/reverse_https' module MetasploitModule - CachedSize = 5932 + CachedSize = :dynamic include Msf::Payload::Stager include Msf::Payload::Java diff --git a/modules/payloads/stagers/multi/reverse_http.rb b/modules/payloads/stagers/multi/reverse_http.rb index 1dd2fdd7b5..1a2cc6be60 100644 --- a/modules/payloads/stagers/multi/reverse_http.rb +++ b/modules/payloads/stagers/multi/reverse_http.rb @@ -9,7 +9,7 @@ require 'msf/core/payload/multi/reverse_http' module MetasploitModule - CachedSize = :dynamic + CachedSize = 0 include Msf::Payload::Stager include Msf::Payload::Multi diff --git a/modules/payloads/stagers/multi/reverse_https.rb b/modules/payloads/stagers/multi/reverse_https.rb index 4cf3e10f29..68c150bb04 100644 --- a/modules/payloads/stagers/multi/reverse_https.rb +++ b/modules/payloads/stagers/multi/reverse_https.rb @@ -9,7 +9,7 @@ require 'msf/core/payload/multi/reverse_https' module MetasploitModule - CachedSize = :dynamic + CachedSize = 0 include Msf::Payload::Stager include Msf::Payload::Multi