Skip to content

Commit

Permalink
update mettle payloads, template generator
Browse files Browse the repository at this point in the history
  • Loading branch information
Brent Cook committed Jul 18, 2017
1 parent f5e7609 commit cc31689
Show file tree
Hide file tree
Showing 40 changed files with 130 additions and 67 deletions.
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ PATH
metasploit-model
metasploit-payloads (= 1.2.37)
metasploit_data_models
metasploit_payloads-mettle (= 0.1.10)
metasploit_payloads-mettle (= 0.1.13)
msgpack
nessus_rest
net-ssh
Expand Down Expand Up @@ -189,7 +189,7 @@ GEM
postgres_ext
railties (~> 4.2.6)
recog (~> 2.0)
metasploit_payloads-mettle (0.1.10)
metasploit_payloads-mettle (0.1.13)
method_source (0.8.2)
mini_portile2 (2.2.0)
minitest (5.10.2)
Expand Down
2 changes: 1 addition & 1 deletion metasploit-framework.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Gem::Specification.new do |spec|
# Needed for Meterpreter
spec.add_runtime_dependency 'metasploit-payloads', '1.2.37'
# Needed for the next-generation POSIX Meterpreter
spec.add_runtime_dependency 'metasploit_payloads-mettle', '0.1.10'
spec.add_runtime_dependency 'metasploit_payloads-mettle', '0.1.13'
# Needed by msfgui and other rpc components
spec.add_runtime_dependency 'msgpack'
# get list of network interfaces, like eth* from OS.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

module MetasploitModule

CachedSize = 652264
CachedSize = 675048

include Msf::Payload::Single
include Msf::Sessions::MeterpreterOptions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

module MetasploitModule

CachedSize = 652264
CachedSize = 675048

include Msf::Payload::Single
include Msf::Sessions::MeterpreterOptions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

module MetasploitModule

CachedSize = 652264
CachedSize = 675048

include Msf::Payload::Single
include Msf::Sessions::MeterpreterOptions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

module MetasploitModule

CachedSize = 645136
CachedSize = 668360

include Msf::Payload::Single
include Msf::Sessions::MeterpreterOptions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

module MetasploitModule

CachedSize = 645136
CachedSize = 668360

include Msf::Payload::Single
include Msf::Sessions::MeterpreterOptions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

module MetasploitModule

CachedSize = 645136
CachedSize = 668360

include Msf::Payload::Single
include Msf::Sessions::MeterpreterOptions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

module MetasploitModule

CachedSize = 643904
CachedSize = 666624

include Msf::Payload::Single
include Msf::Sessions::MeterpreterOptions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

module MetasploitModule

CachedSize = 643904
CachedSize = 666624

include Msf::Payload::Single
include Msf::Sessions::MeterpreterOptions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

module MetasploitModule

CachedSize = 643904
CachedSize = 666624

include Msf::Payload::Single
include Msf::Sessions::MeterpreterOptions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

module MetasploitModule

CachedSize = 1028600
CachedSize = 1059232

include Msf::Payload::Single
include Msf::Sessions::MeterpreterOptions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

module MetasploitModule

CachedSize = 1028600
CachedSize = 1059232

include Msf::Payload::Single
include Msf::Sessions::MeterpreterOptions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

module MetasploitModule

CachedSize = 1028600
CachedSize = 1059232

include Msf::Payload::Single
include Msf::Sessions::MeterpreterOptions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

module MetasploitModule

CachedSize = 1007024
CachedSize = 1037012

include Msf::Payload::Single
include Msf::Sessions::MeterpreterOptions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

module MetasploitModule

CachedSize = 1007024
CachedSize = 1037012

include Msf::Payload::Single
include Msf::Sessions::MeterpreterOptions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

module MetasploitModule

CachedSize = 1007024
CachedSize = 1037012

include Msf::Payload::Single
include Msf::Sessions::MeterpreterOptions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

module MetasploitModule

CachedSize = 1007120
CachedSize = 1036276

include Msf::Payload::Single
include Msf::Sessions::MeterpreterOptions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

module MetasploitModule

CachedSize = 1007120
CachedSize = 1036276

include Msf::Payload::Single
include Msf::Sessions::MeterpreterOptions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

module MetasploitModule

CachedSize = 1007120
CachedSize = 1036276

include Msf::Payload::Single
include Msf::Sessions::MeterpreterOptions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

module MetasploitModule

CachedSize = 789100
CachedSize = 789164

include Msf::Payload::Single
include Msf::Sessions::MeterpreterOptions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

module MetasploitModule

CachedSize = 789100
CachedSize = 789164

include Msf::Payload::Single
include Msf::Sessions::MeterpreterOptions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

module MetasploitModule

CachedSize = 789100
CachedSize = 789164

include Msf::Payload::Single
include Msf::Sessions::MeterpreterOptions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

module MetasploitModule

CachedSize = 790264
CachedSize = 855864

include Msf::Payload::Single
include Msf::Sessions::MeterpreterOptions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

module MetasploitModule

CachedSize = 790264
CachedSize = 855864

include Msf::Payload::Single
include Msf::Sessions::MeterpreterOptions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

module MetasploitModule

CachedSize = 790264
CachedSize = 855864

include Msf::Payload::Single
include Msf::Sessions::MeterpreterOptions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

module MetasploitModule

CachedSize = 704512
CachedSize = 729120

include Msf::Payload::Single
include Msf::Sessions::MeterpreterOptions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

module MetasploitModule

CachedSize = 704512
CachedSize = 729120

include Msf::Payload::Single
include Msf::Sessions::MeterpreterOptions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

module MetasploitModule

CachedSize = 704512
CachedSize = 729120

include Msf::Payload::Single
include Msf::Sessions::MeterpreterOptions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

module MetasploitModule

CachedSize = 744060
CachedSize = 772796

include Msf::Payload::Single
include Msf::Sessions::MeterpreterOptions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

module MetasploitModule

CachedSize = 744060
CachedSize = 772796

include Msf::Payload::Single
include Msf::Sessions::MeterpreterOptions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

module MetasploitModule

CachedSize = 744060
CachedSize = 772796

include Msf::Payload::Single
include Msf::Sessions::MeterpreterOptions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

module MetasploitModule

CachedSize = 868848
CachedSize = 893496

include Msf::Payload::Single
include Msf::Sessions::MeterpreterOptions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

module MetasploitModule

CachedSize = 868848
CachedSize = 893496

include Msf::Payload::Single
include Msf::Sessions::MeterpreterOptions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

module MetasploitModule

CachedSize = 868848
CachedSize = 893496

include Msf::Payload::Single
include Msf::Sessions::MeterpreterOptions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
# Current source: https://github.com/rapid7/metasploit-framework
##

require 'msf/core/handler/reverse_tcp'
require 'msf/core/handler/reverse_http'
require 'msf/base/sessions/meterpreter_options'
require 'msf/base/sessions/mettle_config'
require 'msf/base/sessions/meterpreter_x86_osx'
require 'msf/base/sessions/meterpreter_x64_osx'

module MetasploitModule

CachedSize = 618316

include Msf::Payload::Single
include Msf::Sessions::MeterpreterOptions
include Msf::Sessions::MettleConfig
Expand All @@ -18,23 +20,26 @@ def initialize(info = {})
super(
update_info(
info,
'Name' => 'OSX Meterpreter, Reverse TCP Inline',
'Name' => 'OSX Meterpreter, Reverse HTTP Inline',
'Description' => 'Run the Meterpreter / Mettle server payload (stageless)',
'Author' => [
'Adam Cammack <adam_cammack[at]rapid7.com>',
'Brent Cook <brent_cook[at]rapid7.com>'
],
'Platform' => 'osx',
'Arch' => ARCH_X86,
'Arch' => ARCH_X64,
'License' => MSF_LICENSE,
'Handler' => Msf::Handler::ReverseTcp,
'Session' => Msf::Sessions::Meterpreter_x86_OSX
'Handler' => Msf::Handler::ReverseHttp,
'Session' => Msf::Sessions::Meterpreter_x64_OSX
)
)
end

def generate
opts = {scheme: 'tcp'}
MetasploitPayloads::Mettle.new('i386-apple-darwin', generate_config(opts)).to_binary :exec
opts = {
scheme: 'http',
stageless: true
}
MetasploitPayloads::Mettle.new('x86_64-apple-darwin', generate_config(opts)).to_binary :exec
end
end
Loading

0 comments on commit cc31689

Please sign in to comment.