From 0ba65b7393fa228287830ec6e1b6ced4ae2c3dab Mon Sep 17 00:00:00 2001 From: Spencer McIntyre Date: Fri, 9 Jun 2023 16:47:45 -0400 Subject: [PATCH] Add the x86 fetch payloads --- .../payloads/adapters/cmd/linux/http/x86.rb | 25 +++++++++++++++++++ .../adapters/cmd/linux/https/mips64.rb | 2 +- .../payloads/adapters/cmd/linux/https/x86.rb | 25 +++++++++++++++++++ .../payloads/adapters/cmd/linux/tftp/x86.rb | 25 +++++++++++++++++++ 4 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 modules/payloads/adapters/cmd/linux/http/x86.rb create mode 100644 modules/payloads/adapters/cmd/linux/https/x86.rb create mode 100644 modules/payloads/adapters/cmd/linux/tftp/x86.rb 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