Try a better way with MettleConfig

This will obviously affect stageless payloads, but that's okay, since
there's no stage! Thanks to @mkienow-r7 for the nudge. <3
GSoC/Meterpreter_Web_Console
William Vu 2018-05-17 10:14:24 -05:00
parent ecffba5c55
commit 0cd085fb8b
7 changed files with 10 additions and 60 deletions

View File

@ -94,6 +94,16 @@ module Msf
opts.slice(:uuid, :session_guid, :uri, :debug, :log_file, :name) opts.slice(:uuid, :session_guid, :uri, :debug, :log_file, :name)
end end
# Stage encoding is not safe for Mettle (doesn't apply to stageless)
def encode_stage?
if datastore['EnableStageEncoding'] && !@warned
print_warning("Stage encoding is not currently supported for #{refname}")
@warned = true
end
false
end
end end
end end
end end

View File

@ -115,14 +115,4 @@ module MetasploitModule
MetasploitPayloads::Mettle.new('aarch64-linux-musl', MetasploitPayloads::Mettle.new('aarch64-linux-musl',
generate_config(opts.merge({scheme: 'tcp'}))).to_binary :process_image generate_config(opts.merge({scheme: 'tcp'}))).to_binary :process_image
end end
# Stage encoding is not safe for this payload
def encode_stage?
if datastore['EnableStageEncoding'] && !@warned
print_warning("Stage encoding is not currently supported for #{refname}")
@warned = true
end
false
end
end end

View File

@ -84,14 +84,4 @@ module MetasploitModule
MetasploitPayloads::Mettle.new('armv5l-linux-musleabi', MetasploitPayloads::Mettle.new('armv5l-linux-musleabi',
generate_config(opts.merge({scheme: 'tcp'}))).to_binary :process_image generate_config(opts.merge({scheme: 'tcp'}))).to_binary :process_image
end end
# Stage encoding is not safe for this payload
def encode_stage?
if datastore['EnableStageEncoding'] && !@warned
print_warning("Stage encoding is not currently supported for #{refname}")
@warned = true
end
false
end
end end

View File

@ -95,14 +95,4 @@ module MetasploitModule
MetasploitPayloads::Mettle.new('mips-linux-muslsf', MetasploitPayloads::Mettle.new('mips-linux-muslsf',
generate_config(opts.merge({scheme: 'tcp'}))).to_binary :process_image generate_config(opts.merge({scheme: 'tcp'}))).to_binary :process_image
end end
# Stage encoding is not safe for this payload
def encode_stage?
if datastore['EnableStageEncoding'] && !@warned
print_warning("Stage encoding is not currently supported for #{refname}")
@warned = true
end
false
end
end end

View File

@ -96,14 +96,4 @@ module MetasploitModule
MetasploitPayloads::Mettle.new('mipsel-linux-muslsf', MetasploitPayloads::Mettle.new('mipsel-linux-muslsf',
generate_config(opts.merge({scheme: 'tcp'}))).to_binary :process_image generate_config(opts.merge({scheme: 'tcp'}))).to_binary :process_image
end end
# Stage encoding is not safe for this payload
def encode_stage?
if datastore['EnableStageEncoding'] && !@warned
print_warning("Stage encoding is not currently supported for #{refname}")
@warned = true
end
false
end
end end

View File

@ -92,14 +92,4 @@ module MetasploitModule
MetasploitPayloads::Mettle.new('x86_64-linux-musl', MetasploitPayloads::Mettle.new('x86_64-linux-musl',
generate_config(opts.merge({scheme: 'tcp'}))).to_binary :process_image generate_config(opts.merge({scheme: 'tcp'}))).to_binary :process_image
end end
# Stage encoding is not safe for this payload
def encode_stage?
if datastore['EnableStageEncoding'] && !@warned
print_warning("Stage encoding is not currently supported for #{refname}")
@warned = true
end
false
end
end end

View File

@ -95,14 +95,4 @@ module MetasploitModule
MetasploitPayloads::Mettle.new('i486-linux-musl', MetasploitPayloads::Mettle.new('i486-linux-musl',
generate_config(opts.merge({scheme: 'tcp'}))).to_binary :process_image generate_config(opts.merge({scheme: 'tcp'}))).to_binary :process_image
end end
# Stage encoding is not safe for this payload
def encode_stage?
if datastore['EnableStageEncoding'] && !@warned
print_warning("Stage encoding is not currently supported for #{refname}")
@warned = true
end
false
end
end end