Use generate_payload_uuid instead of manual obj creation
parent
289873c25f
commit
d0a5b803e8
|
@ -19,13 +19,7 @@ module Payload::Linux::SendUUID
|
|||
# This code assumes that the communications socket handle is in edi.
|
||||
#
|
||||
def asm_send_uuid(uuid=nil)
|
||||
unless uuid
|
||||
uuid = Msf::Payload::UUID.new(
|
||||
platform: 'linux',
|
||||
arch: ARCH_X86
|
||||
)
|
||||
end
|
||||
|
||||
uuid ||= generate_payload_uuid
|
||||
uuid_raw = uuid.to_raw
|
||||
|
||||
asm =%Q^
|
||||
|
|
|
@ -21,11 +21,7 @@ module Payload::Php::SendUUID
|
|||
sock_var = opts[:sock_var] || '$s'
|
||||
sock_type = opts[:sock_type] || '$s_type'
|
||||
|
||||
uuid = opts[:uuid] || Msf::Payload::UUID.new(
|
||||
platform: 'php',
|
||||
arch: ARCH_PHP
|
||||
)
|
||||
|
||||
uuid = opts[:uuid] || generate_payload_uuid
|
||||
uuid_raw = uuid.to_raw.chars.map { |c| '\x%.2x' % c.ord }.join('')
|
||||
|
||||
php = %Q^$u="#{uuid_raw}";
|
||||
|
|
|
@ -20,11 +20,7 @@ module Payload::Python::SendUUID
|
|||
def py_send_uuid(opts={})
|
||||
sock_var = opts[:sock_var] || 's'
|
||||
|
||||
uuid = opts[:uuid] || Msf::Payload::UUID.new(
|
||||
platform: 'python',
|
||||
arch: ARCH_PYTHON
|
||||
)
|
||||
|
||||
uuid = opts[:uuid] || generate_payload_uuid
|
||||
uuid_raw = uuid.to_raw.chars.map { |c| '\x%.2x' % c.ord }.join('')
|
||||
|
||||
"#{sock_var}.send(\"#{uuid_raw}\")\n"
|
||||
|
|
|
@ -20,13 +20,7 @@ module Payload::Windows::SendUUID
|
|||
# the communications socket handle is in edi.
|
||||
#
|
||||
def asm_send_uuid(uuid=nil)
|
||||
unless uuid
|
||||
uuid = Msf::Payload::UUID.new(
|
||||
platform: 'windows',
|
||||
arch: ARCH_X86
|
||||
)
|
||||
end
|
||||
|
||||
uuid ||= generate_payload_uuid
|
||||
uuid_raw = uuid.to_raw
|
||||
|
||||
asm =%Q^
|
||||
|
|
|
@ -20,13 +20,7 @@ module Payload::Windows::SendUUID_x64
|
|||
# the communications socket handle is in rdi.
|
||||
#
|
||||
def asm_send_uuid(uuid=nil)
|
||||
unless uuid
|
||||
uuid = Msf::Payload::UUID.new(
|
||||
platform: 'windows',
|
||||
arch: ARCH_X86_64
|
||||
)
|
||||
end
|
||||
|
||||
uuid ||= generate_payload_uuid
|
||||
uuid_raw = uuid.to_raw
|
||||
|
||||
asm =%Q^
|
||||
|
|
|
@ -37,11 +37,7 @@ module Metasploit4
|
|||
met.gsub!("127.0.0.1", datastore['LHOST']) if datastore['LHOST']
|
||||
met.gsub!("4444", datastore['LPORT'].to_s) if datastore['LPORT']
|
||||
|
||||
uuid = Msf::Payload::UUID.new(
|
||||
platform: 'php',
|
||||
arch: ARCH_PHP
|
||||
)
|
||||
|
||||
uuid = generate_payload_uuid
|
||||
bytes = uuid.to_raw.chars.map { |c| '\x%.2x' % c.ord }.join('')
|
||||
met = met.sub("\"PAYLOAD_UUID\", \"\"", "\"PAYLOAD_UUID\", \"#{bytes}\"")
|
||||
|
||||
|
|
|
@ -44,12 +44,7 @@ module Metasploit4
|
|||
end
|
||||
|
||||
def generate_config(opts={})
|
||||
unless opts[:uuid]
|
||||
opts[:uuid] = Msf::Payload::UUID.new(
|
||||
platform: 'windows',
|
||||
arch: ARCH_X86
|
||||
)
|
||||
end
|
||||
opts[:uuid] ||= generate_payload_uuid
|
||||
|
||||
# create the configuration block
|
||||
config_opts = {
|
||||
|
|
|
@ -44,12 +44,7 @@ module Metasploit4
|
|||
end
|
||||
|
||||
def generate_config(opts={})
|
||||
unless opts[:uuid]
|
||||
opts[:uuid] = Msf::Payload::UUID.new(
|
||||
platform: 'windows',
|
||||
arch: ARCH_X86
|
||||
)
|
||||
end
|
||||
opts[:uuid] ||= generate_payload_uuid
|
||||
|
||||
# create the configuration block
|
||||
config_opts = {
|
||||
|
|
|
@ -44,12 +44,7 @@ module Metasploit4
|
|||
end
|
||||
|
||||
def generate_config(opts={})
|
||||
unless opts[:uuid]
|
||||
opts[:uuid] = Msf::Payload::UUID.new(
|
||||
platform: 'windows',
|
||||
arch: ARCH_X86
|
||||
)
|
||||
end
|
||||
opts[:uuid] ||= generate_payload_uuid
|
||||
|
||||
# create the configuration block
|
||||
config_opts = {
|
||||
|
|
|
@ -45,12 +45,7 @@ module Metasploit4
|
|||
end
|
||||
|
||||
def generate_config(opts={})
|
||||
unless opts[:uuid]
|
||||
opts[:uuid] = Msf::Payload::UUID.new(
|
||||
platform: 'windows',
|
||||
arch: ARCH_X86
|
||||
)
|
||||
end
|
||||
opts[:uuid] ||= generate_payload_uuid
|
||||
|
||||
# create the configuration block
|
||||
config_opts = {
|
||||
|
|
|
@ -44,12 +44,7 @@ module Metasploit3
|
|||
end
|
||||
|
||||
def generate_config(opts={})
|
||||
unless opts[:uuid]
|
||||
opts[:uuid] = Msf::Payload::UUID.new(
|
||||
platform: 'windows',
|
||||
arch: ARCH_X86
|
||||
)
|
||||
end
|
||||
opts[:uuid] ||= generate_payload_uuid
|
||||
|
||||
# create the configuration block, which for staged connections is really simple.
|
||||
config_opts = {
|
||||
|
|
|
@ -44,12 +44,7 @@ module Metasploit4
|
|||
end
|
||||
|
||||
def generate_config(opts={})
|
||||
unless opts[:uuid]
|
||||
opts[:uuid] = Msf::Payload::UUID.new(
|
||||
platform: 'windows',
|
||||
arch: ARCH_X64
|
||||
)
|
||||
end
|
||||
opts[:uuid] ||= generate_payload_uuid
|
||||
|
||||
# create the configuration block, which for staged connections is really simple.
|
||||
config_opts = {
|
||||
|
|
|
@ -44,12 +44,7 @@ module Metasploit4
|
|||
end
|
||||
|
||||
def generate_config(opts={})
|
||||
unless opts[:uuid]
|
||||
opts[:uuid] = Msf::Payload::UUID.new(
|
||||
platform: 'windows',
|
||||
arch: ARCH_X64
|
||||
)
|
||||
end
|
||||
opts[:uuid] ||= generate_payload_uuid
|
||||
|
||||
# create the configuration block
|
||||
config_opts = {
|
||||
|
|
|
@ -44,12 +44,7 @@ module Metasploit4
|
|||
end
|
||||
|
||||
def generate_config(opts={})
|
||||
unless opts[:uuid]
|
||||
opts[:uuid] = Msf::Payload::UUID.new(
|
||||
platform: 'windows',
|
||||
arch: ARCH_X64
|
||||
)
|
||||
end
|
||||
opts[:uuid] ||= generate_payload_uuid
|
||||
|
||||
# create the configuration block
|
||||
config_opts = {
|
||||
|
|
|
@ -45,12 +45,7 @@ module Metasploit4
|
|||
end
|
||||
|
||||
def generate_config(opts={})
|
||||
unless opts[:uuid]
|
||||
opts[:uuid] = Msf::Payload::UUID.new(
|
||||
platform: 'windows',
|
||||
arch: ARCH_X64
|
||||
)
|
||||
end
|
||||
opts[:uuid] ||= generate_payload_uuid
|
||||
|
||||
# create the configuration block
|
||||
config_opts = {
|
||||
|
|
|
@ -44,12 +44,7 @@ module Metasploit4
|
|||
end
|
||||
|
||||
def generate_config(opts={})
|
||||
unless opts[:uuid]
|
||||
opts[:uuid] = Msf::Payload::UUID.new(
|
||||
platform: 'windows',
|
||||
arch: ARCH_X64
|
||||
)
|
||||
end
|
||||
opts[:uuid] ||= generate_payload_uuid
|
||||
|
||||
# create the configuration block
|
||||
config_opts = {
|
||||
|
|
|
@ -149,18 +149,11 @@ module Metasploit3
|
|||
end
|
||||
|
||||
def generate_meterpreter
|
||||
blob = MetasploitPayloads.read('meterpreter', 'msflinker_linux_x86.bin')
|
||||
|
||||
blob
|
||||
MetasploitPayloads.read('meterpreter', 'msflinker_linux_x86.bin')
|
||||
end
|
||||
|
||||
def generate_config(opts={})
|
||||
unless opts[:uuid]
|
||||
opts[:uuid] = Msf::Payload::UUID.new({
|
||||
:platform => 'linux',
|
||||
:arch => ARCH_X86
|
||||
})
|
||||
end
|
||||
opts[:uuid] ||= generate_payload_uuid
|
||||
|
||||
# create the configuration block, which for staged connections is really simple.
|
||||
config_opts = {
|
||||
|
|
|
@ -31,11 +31,7 @@ module Metasploit4
|
|||
f.read(f.stat.size)
|
||||
}
|
||||
|
||||
uuid = opts[:uuid] || Msf::Payload::UUID.new(
|
||||
platform: 'php',
|
||||
arch: ARCH_PHP
|
||||
)
|
||||
|
||||
uuid = opts[:uuid] || generate_payload_uuid
|
||||
bytes = uuid.to_raw.chars.map { |c| '\x%.2x' % c.ord }.join('')
|
||||
met = met.sub("\"PAYLOAD_UUID\", \"\"", "\"PAYLOAD_UUID\", \"#{bytes}\"")
|
||||
|
||||
|
|
|
@ -37,11 +37,7 @@ module Metasploit3
|
|||
met = met.sub("DEBUGGING = False", "DEBUGGING = True")
|
||||
end
|
||||
|
||||
uuid = opts[:uuid] || Msf::Payload::UUID.new(
|
||||
platform: 'python',
|
||||
arch: ARCH_PYTHON
|
||||
)
|
||||
|
||||
uuid = opts[:uuid] || generate_payload_uuid
|
||||
bytes = uuid.to_raw.chars.map { |c| '\x%.2x' % c.ord }.join('')
|
||||
met = met.sub("PAYLOAD_UUID = \"\"", "PAYLOAD_UUID = \"#{bytes}\"")
|
||||
|
||||
|
|
|
@ -37,12 +37,7 @@ module Metasploit4
|
|||
end
|
||||
|
||||
def generate_config(opts={})
|
||||
unless opts[:uuid]
|
||||
opts[:uuid] = Msf::Payload::UUID.new(
|
||||
platform: 'windows',
|
||||
arch: ARCH_X86
|
||||
)
|
||||
end
|
||||
opts[:uuid] ||= generate_payload_uuid
|
||||
|
||||
# create the configuration block, which for staged connections is really simple.
|
||||
config_opts = {
|
||||
|
|
|
@ -37,12 +37,7 @@ module Metasploit4
|
|||
end
|
||||
|
||||
def generate_config(opts={})
|
||||
unless opts[:uuid]
|
||||
opts[:uuid] = Msf::Payload::UUID.new(
|
||||
platform: 'windows',
|
||||
arch: ARCH_X64
|
||||
)
|
||||
end
|
||||
opts[:uuid] ||= generate_payload_uuid
|
||||
|
||||
# create the configuration block, which for staged connections is really simple.
|
||||
config_opts = {
|
||||
|
|
Loading…
Reference in New Issue