diff --git a/modules/payloads/adapters/cmd/linux/http/x86.rb b/modules/payloads/adapters/cmd/linux/http/x86.rb new file mode 100644 index 0000000000..bdd7624dda --- /dev/null +++ b/modules/payloads/adapters/cmd/linux/http/x86.rb @@ -0,0 +1,25 @@ +## +# This module requires Metasploit: https://metasploit.com/download +# Current source: https://github.com/rapid7/metasploit-framework +## + +module MetasploitModule + include Msf::Payload::Adapter::Fetch::HTTP + include Msf::Payload::Adapter::Fetch::LinuxOptions + + def initialize(info = {}) + super( + update_info( + info, + 'Name' => 'HTTP Fetch', + 'Description' => 'Fetch and execute a x86 payload from an HTTP server.', + 'Author' => ['Brendan Watters', 'Spencer McIntyre'], + 'Platform' => 'linux', + 'Arch' => ARCH_CMD, + 'License' => MSF_LICENSE, + 'AdaptedArch' => ARCH_X86, + 'AdaptedPlatform' => 'linux' + ) + ) + end +end diff --git a/modules/payloads/adapters/cmd/linux/https/mips64.rb b/modules/payloads/adapters/cmd/linux/https/mips64.rb index 011e91ceb4..05c15d6b48 100644 --- a/modules/payloads/adapters/cmd/linux/https/mips64.rb +++ b/modules/payloads/adapters/cmd/linux/https/mips64.rb @@ -12,7 +12,7 @@ module MetasploitModule update_info( info, 'Name' => 'HTTPS Fetch', - 'Description' => 'Fetch and execute an x64 payload from an HTTPS server.', + 'Description' => 'Fetch and execute an MIPS64 payload from an HTTPS server.', 'Author' => ['Brendan Watters', 'Spencer McIntyre'], 'Platform' => 'linux', 'Arch' => ARCH_CMD, diff --git a/modules/payloads/adapters/cmd/linux/https/x86.rb b/modules/payloads/adapters/cmd/linux/https/x86.rb new file mode 100644 index 0000000000..875cdd27db --- /dev/null +++ b/modules/payloads/adapters/cmd/linux/https/x86.rb @@ -0,0 +1,25 @@ +## +# This module requires Metasploit: https://metasploit.com/download +# Current source: https://github.com/rapid7/metasploit-framework +## + +module MetasploitModule + include Msf::Payload::Adapter::Fetch::Https + include Msf::Payload::Adapter::Fetch::LinuxOptions + + def initialize(info = {}) + super( + update_info( + info, + 'Name' => 'HTTPS Fetch', + 'Description' => 'Fetch and execute an x86 payload from an HTTPS server.', + 'Author' => ['Brendan Watters', 'Spencer McIntyre'], + 'Platform' => 'linux', + 'Arch' => ARCH_CMD, + 'License' => MSF_LICENSE, + 'AdaptedArch' => ARCH_X86, + 'AdaptedPlatform' => 'linux' + ) + ) + end +end diff --git a/modules/payloads/adapters/cmd/linux/tftp/x86.rb b/modules/payloads/adapters/cmd/linux/tftp/x86.rb new file mode 100644 index 0000000000..36f5aa5030 --- /dev/null +++ b/modules/payloads/adapters/cmd/linux/tftp/x86.rb @@ -0,0 +1,25 @@ +## +# This module requires Metasploit: https://metasploit.com/download +# Current source: https://github.com/rapid7/metasploit-framework +## + +module MetasploitModule + include Msf::Payload::Adapter::Fetch::TFTP + include Msf::Payload::Adapter::Fetch::LinuxOptions + + def initialize(info = {}) + super( + update_info( + info, + 'Name' => 'TFTP Fetch', + 'Description' => 'Fetch and execute a x86 payload from a TFTP server.', + 'Author' => ['Brendan Watters', 'Spencer McIntyre'], + 'Platform' => 'linux', + 'Arch' => ARCH_CMD, + 'License' => MSF_LICENSE, + 'AdaptedArch' => ARCH_X86, + 'AdaptedPlatform' => 'linux' + ) + ) + end +end diff --git a/spec/modules/payloads_spec.rb b/spec/modules/payloads_spec.rb index c86713e49c..840a15d1ce 100644 --- a/spec/modules/payloads_spec.rb +++ b/spec/modules/payloads_spec.rb @@ -556,6 +556,30 @@ RSpec.describe 'modules/payloads', :content do reference_name: 'cmd/linux/tftp/x64' end + context 'cmd/linux/http/x86' do + it_should_behave_like 'payload is not cached', + ancestor_reference_names: [ + 'adapters/cmd/linux/http/x86' + ], + reference_name: 'cmd/linux/http/x86' + end + + context 'cmd/linux/https/x86' do + it_should_behave_like 'payload is not cached', + ancestor_reference_names: [ + 'adapters/cmd/linux/https/x86' + ], + reference_name: 'cmd/linux/https/x86' + end + + context 'cmd/linux/tftp/x86' do + it_should_behave_like 'payload is not cached', + ancestor_reference_names: [ + 'adapters/cmd/linux/tftp/x86' + ], + reference_name: 'cmd/linux/tftp/x86' + end + context 'cmd/mainframe/generic_jcl' do it_should_behave_like 'payload cached size is consistent', ancestor_reference_names: [