From cf5f5185901baa42412b740b981ad0cecc10c2b1 Mon Sep 17 00:00:00 2001 From: bwatters-r7 Date: Thu, 30 Jan 2025 13:51:05 -0600 Subject: [PATCH 1/7] Add fetch payloads for aarch64, armbe, armle, mipsbe, mipsle, ppc, ppc64 --- .../adapters/cmd/linux/http/aarch64.rb | 25 +++++++++++++++++++ .../payloads/adapters/cmd/linux/http/armbe.rb | 25 +++++++++++++++++++ .../payloads/adapters/cmd/linux/http/armle.rb | 25 +++++++++++++++++++ .../adapters/cmd/linux/http/mipsbe.rb | 25 +++++++++++++++++++ .../adapters/cmd/linux/http/mipsle.rb | 25 +++++++++++++++++++ .../payloads/adapters/cmd/linux/http/ppc.rb | 25 +++++++++++++++++++ .../payloads/adapters/cmd/linux/http/ppc64.rb | 25 +++++++++++++++++++ .../adapters/cmd/linux/https/aarch64.rb | 25 +++++++++++++++++++ .../adapters/cmd/linux/https/armbe.rb | 25 +++++++++++++++++++ .../adapters/cmd/linux/https/armle.rb | 25 +++++++++++++++++++ .../adapters/cmd/linux/https/mipsbe.rb | 25 +++++++++++++++++++ .../adapters/cmd/linux/https/mipsle.rb | 25 +++++++++++++++++++ .../payloads/adapters/cmd/linux/https/ppc.rb | 25 +++++++++++++++++++ .../adapters/cmd/linux/https/ppc64.rb | 25 +++++++++++++++++++ .../adapters/cmd/linux/tftp/aarch64.rb | 25 +++++++++++++++++++ .../payloads/adapters/cmd/linux/tftp/armbe.rb | 25 +++++++++++++++++++ .../payloads/adapters/cmd/linux/tftp/armle.rb | 25 +++++++++++++++++++ .../adapters/cmd/linux/tftp/mipsbe.rb | 25 +++++++++++++++++++ .../adapters/cmd/linux/tftp/mipsle.rb | 25 +++++++++++++++++++ .../payloads/adapters/cmd/linux/tftp/ppc.rb | 25 +++++++++++++++++++ .../payloads/adapters/cmd/linux/tftp/ppc64.rb | 25 +++++++++++++++++++ 21 files changed, 525 insertions(+) create mode 100644 modules/payloads/adapters/cmd/linux/http/aarch64.rb create mode 100644 modules/payloads/adapters/cmd/linux/http/armbe.rb create mode 100644 modules/payloads/adapters/cmd/linux/http/armle.rb create mode 100644 modules/payloads/adapters/cmd/linux/http/mipsbe.rb create mode 100644 modules/payloads/adapters/cmd/linux/http/mipsle.rb create mode 100644 modules/payloads/adapters/cmd/linux/http/ppc.rb create mode 100644 modules/payloads/adapters/cmd/linux/http/ppc64.rb create mode 100644 modules/payloads/adapters/cmd/linux/https/aarch64.rb create mode 100644 modules/payloads/adapters/cmd/linux/https/armbe.rb create mode 100644 modules/payloads/adapters/cmd/linux/https/armle.rb create mode 100644 modules/payloads/adapters/cmd/linux/https/mipsbe.rb create mode 100644 modules/payloads/adapters/cmd/linux/https/mipsle.rb create mode 100644 modules/payloads/adapters/cmd/linux/https/ppc.rb create mode 100644 modules/payloads/adapters/cmd/linux/https/ppc64.rb create mode 100644 modules/payloads/adapters/cmd/linux/tftp/aarch64.rb create mode 100644 modules/payloads/adapters/cmd/linux/tftp/armbe.rb create mode 100644 modules/payloads/adapters/cmd/linux/tftp/armle.rb create mode 100644 modules/payloads/adapters/cmd/linux/tftp/mipsbe.rb create mode 100644 modules/payloads/adapters/cmd/linux/tftp/mipsle.rb create mode 100644 modules/payloads/adapters/cmd/linux/tftp/ppc.rb create mode 100644 modules/payloads/adapters/cmd/linux/tftp/ppc64.rb diff --git a/modules/payloads/adapters/cmd/linux/http/aarch64.rb b/modules/payloads/adapters/cmd/linux/http/aarch64.rb new file mode 100644 index 000000000000..0569def781da --- /dev/null +++ b/modules/payloads/adapters/cmd/linux/http/aarch64.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 an AARCH64 payload from an HTTP server.', + 'Author' => ['Brendan Watters', 'Spencer McIntyre'], + 'Platform' => 'linux', + 'Arch' => ARCH_CMD, + 'License' => MSF_LICENSE, + 'AdaptedArch' => ARCH_AARCH64, + 'AdaptedPlatform' => 'linux' + ) + ) + end +end diff --git a/modules/payloads/adapters/cmd/linux/http/armbe.rb b/modules/payloads/adapters/cmd/linux/http/armbe.rb new file mode 100644 index 000000000000..acc38c4abc15 --- /dev/null +++ b/modules/payloads/adapters/cmd/linux/http/armbe.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 an ARMBE payload from an HTTP server.', + 'Author' => ['Brendan Watters', 'Spencer McIntyre'], + 'Platform' => 'linux', + 'Arch' => ARCH_CMD, + 'License' => MSF_LICENSE, + 'AdaptedArch' => ARCH_ARMBE, + 'AdaptedPlatform' => 'linux' + ) + ) + end +end diff --git a/modules/payloads/adapters/cmd/linux/http/armle.rb b/modules/payloads/adapters/cmd/linux/http/armle.rb new file mode 100644 index 000000000000..e879f914e8a5 --- /dev/null +++ b/modules/payloads/adapters/cmd/linux/http/armle.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 an ARMLE payload from an HTTP server.', + 'Author' => ['Brendan Watters', 'Spencer McIntyre'], + 'Platform' => 'linux', + 'Arch' => ARCH_CMD, + 'License' => MSF_LICENSE, + 'AdaptedArch' => ARCH_ARMLE, + 'AdaptedPlatform' => 'linux' + ) + ) + end +end diff --git a/modules/payloads/adapters/cmd/linux/http/mipsbe.rb b/modules/payloads/adapters/cmd/linux/http/mipsbe.rb new file mode 100644 index 000000000000..86b8f216a86b --- /dev/null +++ b/modules/payloads/adapters/cmd/linux/http/mipsbe.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 an MIPSBE payload from an HTTP server.', + 'Author' => ['Brendan Watters', 'Spencer McIntyre'], + 'Platform' => 'linux', + 'Arch' => ARCH_CMD, + 'License' => MSF_LICENSE, + 'AdaptedArch' => ARCH_MIPSBE, + 'AdaptedPlatform' => 'linux' + ) + ) + end +end diff --git a/modules/payloads/adapters/cmd/linux/http/mipsle.rb b/modules/payloads/adapters/cmd/linux/http/mipsle.rb new file mode 100644 index 000000000000..00c123594d8e --- /dev/null +++ b/modules/payloads/adapters/cmd/linux/http/mipsle.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 an MIPSLE payload from an HTTP server.', + 'Author' => ['Brendan Watters', 'Spencer McIntyre'], + 'Platform' => 'linux', + 'Arch' => ARCH_CMD, + 'License' => MSF_LICENSE, + 'AdaptedArch' => ARCH_MIPSLE, + 'AdaptedPlatform' => 'linux' + ) + ) + end +end diff --git a/modules/payloads/adapters/cmd/linux/http/ppc.rb b/modules/payloads/adapters/cmd/linux/http/ppc.rb new file mode 100644 index 000000000000..5b1a0d64a032 --- /dev/null +++ b/modules/payloads/adapters/cmd/linux/http/ppc.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 an MIPSLE payload from an HTTP server.', + 'Author' => ['Brendan Watters', 'Spencer McIntyre'], + 'Platform' => 'linux', + 'Arch' => ARCH_CMD, + 'License' => MSF_LICENSE, + 'AdaptedArch' => ARCH_PPC, + 'AdaptedPlatform' => 'linux' + ) + ) + end +end diff --git a/modules/payloads/adapters/cmd/linux/http/ppc64.rb b/modules/payloads/adapters/cmd/linux/http/ppc64.rb new file mode 100644 index 000000000000..56b77f2848ae --- /dev/null +++ b/modules/payloads/adapters/cmd/linux/http/ppc64.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 an MIPSLE payload from an HTTP server.', + 'Author' => ['Brendan Watters', 'Spencer McIntyre'], + 'Platform' => 'linux', + 'Arch' => ARCH_CMD, + 'License' => MSF_LICENSE, + 'AdaptedArch' => ARCH_PPC64, + 'AdaptedPlatform' => 'linux' + ) + ) + end +end diff --git a/modules/payloads/adapters/cmd/linux/https/aarch64.rb b/modules/payloads/adapters/cmd/linux/https/aarch64.rb new file mode 100644 index 000000000000..f9b914caeafd --- /dev/null +++ b/modules/payloads/adapters/cmd/linux/https/aarch64.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 AARCH64 payload from an HTTPS server.', + 'Author' => ['Brendan Watters', 'Spencer McIntyre'], + 'Platform' => 'linux', + 'Arch' => ARCH_CMD, + 'License' => MSF_LICENSE, + 'AdaptedArch' => ARCH_AARCH64, + 'AdaptedPlatform' => 'linux' + ) + ) + end +end diff --git a/modules/payloads/adapters/cmd/linux/https/armbe.rb b/modules/payloads/adapters/cmd/linux/https/armbe.rb new file mode 100644 index 000000000000..1de2aa644220 --- /dev/null +++ b/modules/payloads/adapters/cmd/linux/https/armbe.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 ARMBE payload from an HTTPS server.', + 'Author' => ['Brendan Watters', 'Spencer McIntyre'], + 'Platform' => 'linux', + 'Arch' => ARCH_CMD, + 'License' => MSF_LICENSE, + 'AdaptedArch' => ARCH_ARMBE, + 'AdaptedPlatform' => 'linux' + ) + ) + end +end diff --git a/modules/payloads/adapters/cmd/linux/https/armle.rb b/modules/payloads/adapters/cmd/linux/https/armle.rb new file mode 100644 index 000000000000..403d01c04938 --- /dev/null +++ b/modules/payloads/adapters/cmd/linux/https/armle.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 ARMLE payload from an HTTPS server.', + 'Author' => ['Brendan Watters', 'Spencer McIntyre'], + 'Platform' => 'linux', + 'Arch' => ARCH_CMD, + 'License' => MSF_LICENSE, + 'AdaptedArch' => ARCH_ARMLE, + 'AdaptedPlatform' => 'linux' + ) + ) + end +end diff --git a/modules/payloads/adapters/cmd/linux/https/mipsbe.rb b/modules/payloads/adapters/cmd/linux/https/mipsbe.rb new file mode 100644 index 000000000000..a45ddd4c9d7e --- /dev/null +++ b/modules/payloads/adapters/cmd/linux/https/mipsbe.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 MIPSBE payload from an HTTPS server.', + 'Author' => ['Brendan Watters', 'Spencer McIntyre'], + 'Platform' => 'linux', + 'Arch' => ARCH_CMD, + 'License' => MSF_LICENSE, + 'AdaptedArch' => ARCH_MIPSBE, + 'AdaptedPlatform' => 'linux' + ) + ) + end +end diff --git a/modules/payloads/adapters/cmd/linux/https/mipsle.rb b/modules/payloads/adapters/cmd/linux/https/mipsle.rb new file mode 100644 index 000000000000..b6396881d2c2 --- /dev/null +++ b/modules/payloads/adapters/cmd/linux/https/mipsle.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 MIPSLE payload from an HTTPS server.', + 'Author' => ['Brendan Watters', 'Spencer McIntyre'], + 'Platform' => 'linux', + 'Arch' => ARCH_CMD, + 'License' => MSF_LICENSE, + 'AdaptedArch' => ARCH_MIPSLE, + 'AdaptedPlatform' => 'linux' + ) + ) + end +end diff --git a/modules/payloads/adapters/cmd/linux/https/ppc.rb b/modules/payloads/adapters/cmd/linux/https/ppc.rb new file mode 100644 index 000000000000..8aa2e31c0c62 --- /dev/null +++ b/modules/payloads/adapters/cmd/linux/https/ppc.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 MIPSLE payload from an HTTPS server.', + 'Author' => ['Brendan Watters', 'Spencer McIntyre'], + 'Platform' => 'linux', + 'Arch' => ARCH_CMD, + 'License' => MSF_LICENSE, + 'AdaptedArch' => ARCH_PPC, + 'AdaptedPlatform' => 'linux' + ) + ) + end +end diff --git a/modules/payloads/adapters/cmd/linux/https/ppc64.rb b/modules/payloads/adapters/cmd/linux/https/ppc64.rb new file mode 100644 index 000000000000..b6f8c57909c5 --- /dev/null +++ b/modules/payloads/adapters/cmd/linux/https/ppc64.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 MIPSLE payload from an HTTPS server.', + 'Author' => ['Brendan Watters', 'Spencer McIntyre'], + 'Platform' => 'linux', + 'Arch' => ARCH_CMD, + 'License' => MSF_LICENSE, + 'AdaptedArch' => ARCH_PPC64, + 'AdaptedPlatform' => 'linux' + ) + ) + end +end diff --git a/modules/payloads/adapters/cmd/linux/tftp/aarch64.rb b/modules/payloads/adapters/cmd/linux/tftp/aarch64.rb new file mode 100644 index 000000000000..8ea872b2b9d6 --- /dev/null +++ b/modules/payloads/adapters/cmd/linux/tftp/aarch64.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 an AARCH64 payload from a TFTP server.', + 'Author' => ['Brendan Watters', 'Spencer McIntyre'], + 'Platform' => 'linux', + 'Arch' => ARCH_CMD, + 'License' => MSF_LICENSE, + 'AdaptedArch' => ARCH_AARCH64, + 'AdaptedPlatform' => 'linux' + ) + ) + end +end diff --git a/modules/payloads/adapters/cmd/linux/tftp/armbe.rb b/modules/payloads/adapters/cmd/linux/tftp/armbe.rb new file mode 100644 index 000000000000..164664c281a1 --- /dev/null +++ b/modules/payloads/adapters/cmd/linux/tftp/armbe.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 an ARMBE payload from a TFTP server.', + 'Author' => ['Brendan Watters', 'Spencer McIntyre'], + 'Platform' => 'linux', + 'Arch' => ARCH_CMD, + 'License' => MSF_LICENSE, + 'AdaptedArch' => ARCH_ARMBE, + 'AdaptedPlatform' => 'linux' + ) + ) + end +end diff --git a/modules/payloads/adapters/cmd/linux/tftp/armle.rb b/modules/payloads/adapters/cmd/linux/tftp/armle.rb new file mode 100644 index 000000000000..9f997726fe29 --- /dev/null +++ b/modules/payloads/adapters/cmd/linux/tftp/armle.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 an ARMLE payload from a TFTP server.', + 'Author' => ['Brendan Watters', 'Spencer McIntyre'], + 'Platform' => 'linux', + 'Arch' => ARCH_CMD, + 'License' => MSF_LICENSE, + 'AdaptedArch' => ARCH_ARMLE, + 'AdaptedPlatform' => 'linux' + ) + ) + end +end diff --git a/modules/payloads/adapters/cmd/linux/tftp/mipsbe.rb b/modules/payloads/adapters/cmd/linux/tftp/mipsbe.rb new file mode 100644 index 000000000000..490f5dfb0702 --- /dev/null +++ b/modules/payloads/adapters/cmd/linux/tftp/mipsbe.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 an MIPSBE payload from a TFTP server.', + 'Author' => ['Brendan Watters', 'Spencer McIntyre'], + 'Platform' => 'linux', + 'Arch' => ARCH_CMD, + 'License' => MSF_LICENSE, + 'AdaptedArch' => ARCH_MIPSBE, + 'AdaptedPlatform' => 'linux' + ) + ) + end +end diff --git a/modules/payloads/adapters/cmd/linux/tftp/mipsle.rb b/modules/payloads/adapters/cmd/linux/tftp/mipsle.rb new file mode 100644 index 000000000000..e4fd7ef370df --- /dev/null +++ b/modules/payloads/adapters/cmd/linux/tftp/mipsle.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 an MIPSLE payload from a TFTP server.', + 'Author' => ['Brendan Watters', 'Spencer McIntyre'], + 'Platform' => 'linux', + 'Arch' => ARCH_CMD, + 'License' => MSF_LICENSE, + 'AdaptedArch' => ARCH_MIPSLE, + 'AdaptedPlatform' => 'linux' + ) + ) + end +end diff --git a/modules/payloads/adapters/cmd/linux/tftp/ppc.rb b/modules/payloads/adapters/cmd/linux/tftp/ppc.rb new file mode 100644 index 000000000000..d2857b1fa480 --- /dev/null +++ b/modules/payloads/adapters/cmd/linux/tftp/ppc.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 an MIPSLE payload from an TFTP server.', + 'Author' => ['Brendan Watters', 'Spencer McIntyre'], + 'Platform' => 'linux', + 'Arch' => ARCH_CMD, + 'License' => MSF_LICENSE, + 'AdaptedArch' => ARCH_PPC, + 'AdaptedPlatform' => 'linux' + ) + ) + end +end diff --git a/modules/payloads/adapters/cmd/linux/tftp/ppc64.rb b/modules/payloads/adapters/cmd/linux/tftp/ppc64.rb new file mode 100644 index 000000000000..dbec5c606d41 --- /dev/null +++ b/modules/payloads/adapters/cmd/linux/tftp/ppc64.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 an MIPSLE payload from a TFTP server.', + 'Author' => ['Brendan Watters', 'Spencer McIntyre'], + 'Platform' => 'linux', + 'Arch' => ARCH_CMD, + 'License' => MSF_LICENSE, + 'AdaptedArch' => ARCH_PPC64, + 'AdaptedPlatform' => 'linux' + ) + ) + end +end From 1d3bbcb5739978f5d8fb7dd8dfa239c9c87f79ba Mon Sep 17 00:00:00 2001 From: bwatters-r7 Date: Thu, 30 Jan 2025 14:36:23 -0600 Subject: [PATCH 2/7] Add specs to pass tests --- spec/modules/payloads_spec.rb | 169 ++++++++++++++++++++++++++++++++++ 1 file changed, 169 insertions(+) diff --git a/spec/modules/payloads_spec.rb b/spec/modules/payloads_spec.rb index 0b3386bf593c..70e051b3f937 100644 --- a/spec/modules/payloads_spec.rb +++ b/spec/modules/payloads_spec.rb @@ -556,6 +556,175 @@ reference_name: 'cmd/linux/tftp/x64' end + context 'cmd/linux/http/aarch64' do + it_should_behave_like 'payload is not cached', + ancestor_reference_names: [ + 'adapters/cmd/linux/http/aarch64' + ], + reference_name: 'cmd/linux/http/aarch64' + end + + context 'cmd/linux/https/aarch64' do + it_should_behave_like 'payload is not cached', + ancestor_reference_names: [ + 'adapters/cmd/linux/https/aarch64' + ], + reference_name: 'cmd/linux/https/aarch64' + end + + context 'cmd/linux/tftp/aarch64' do + it_should_behave_like 'payload is not cached', + ancestor_reference_names: [ + 'adapters/cmd/linux/tftp/aarch64' + ], + reference_name: 'cmd/linux/tftp/aarch64' + end + + + context 'cmd/linux/http/armbe' do + it_should_behave_like 'payload is not cached', + ancestor_reference_names: [ + 'adapters/cmd/linux/http/armbe' + ], + reference_name: 'cmd/linux/http/armbe' + end + + context 'cmd/linux/https/armbe' do + it_should_behave_like 'payload is not cached', + ancestor_reference_names: [ + 'adapters/cmd/linux/https/armbe' + ], + reference_name: 'cmd/linux/https/armbe' + end + + context 'cmd/linux/tftp/armbe' do + it_should_behave_like 'payload is not cached', + ancestor_reference_names: [ + 'adapters/cmd/linux/tftp/armbe' + ], + reference_name: 'cmd/linux/tftp/armbe' + end + + context 'cmd/linux/http/armle' do + it_should_behave_like 'payload is not cached', + ancestor_reference_names: [ + 'adapters/cmd/linux/http/armle' + ], + reference_name: 'cmd/linux/http/armle' + end + + context 'cmd/linux/https/armle' do + it_should_behave_like 'payload is not cached', + ancestor_reference_names: [ + 'adapters/cmd/linux/https/armle' + ], + reference_name: 'cmd/linux/https/armle' + end + + context 'cmd/linux/tftp/armle' do + it_should_behave_like 'payload is not cached', + ancestor_reference_names: [ + 'adapters/cmd/linux/tftp/armle' + ], + reference_name: 'cmd/linux/tftp/armle' + end + + context 'cmd/linux/http/mipsbe' do + it_should_behave_like 'payload is not cached', + ancestor_reference_names: [ + 'adapters/cmd/linux/http/mipsbe' + ], + reference_name: 'cmd/linux/http/mipsbe' + end + + context 'cmd/linux/https/mipsbe' do + it_should_behave_like 'payload is not cached', + ancestor_reference_names: [ + 'adapters/cmd/linux/https/mipsbe' + ], + reference_name: 'cmd/linux/https/mipsbe' + end + + context 'cmd/linux/tftp/mipsbe' do + it_should_behave_like 'payload is not cached', + ancestor_reference_names: [ + 'adapters/cmd/linux/tftp/mipsbe' + ], + reference_name: 'cmd/linux/tftp/mipsbe' + end + + context 'cmd/linux/http/mipsle' do + it_should_behave_like 'payload is not cached', + ancestor_reference_names: [ + 'adapters/cmd/linux/http/mipsle' + ], + reference_name: 'cmd/linux/http/mipsle' + end + + context 'cmd/linux/https/mipsle' do + it_should_behave_like 'payload is not cached', + ancestor_reference_names: [ + 'adapters/cmd/linux/https/mipsle' + ], + reference_name: 'cmd/linux/https/mipsle' + end + + context 'cmd/linux/tftp/mipsle' do + it_should_behave_like 'payload is not cached', + ancestor_reference_names: [ + 'adapters/cmd/linux/tftp/mipsle' + ], + reference_name: 'cmd/linux/tftp/mipsle' + end + + context 'cmd/linux/http/ppc' do + it_should_behave_like 'payload is not cached', + ancestor_reference_names: [ + 'adapters/cmd/linux/http/ppc' + ], + reference_name: 'cmd/linux/http/ppc' + end + + context 'cmd/linux/https/ppc' do + it_should_behave_like 'payload is not cached', + ancestor_reference_names: [ + 'adapters/cmd/linux/https/ppc' + ], + reference_name: 'cmd/linux/https/ppc' + end + + context 'cmd/linux/tftp/ppc' do + it_should_behave_like 'payload is not cached', + ancestor_reference_names: [ + 'adapters/cmd/linux/tftp/ppc' + ], + reference_name: 'cmd/linux/tftp/ppc' + end + + context 'cmd/linux/http/ppc64' do + it_should_behave_like 'payload is not cached', + ancestor_reference_names: [ + 'adapters/cmd/linux/http/ppc64' + ], + reference_name: 'cmd/linux/http/ppc64' + end + + context 'cmd/linux/https/ppc64' do + it_should_behave_like 'payload is not cached', + ancestor_reference_names: [ + 'adapters/cmd/linux/https/ppc64' + ], + reference_name: 'cmd/linux/https/ppc64' + end + + context 'cmd/linux/tftp/ppc64' do + it_should_behave_like 'payload is not cached', + ancestor_reference_names: [ + 'adapters/cmd/linux/tftp/ppc64' + ], + reference_name: 'cmd/linux/tftp/ppc64' + end + context 'cmd/linux/http/x86' do it_should_behave_like 'payload is not cached', ancestor_reference_names: [ From 6424a4a38750e84e18ef9da45161e1e70fa98545 Mon Sep 17 00:00:00 2001 From: Brendan Date: Wed, 12 Feb 2025 15:51:49 -0600 Subject: [PATCH 3/7] Update modules/payloads/adapters/cmd/linux/http/ppc.rb Co-authored-by: Christophe De La Fuente <56716719+cdelafuente-r7@users.noreply.github.com> --- modules/payloads/adapters/cmd/linux/http/ppc.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/payloads/adapters/cmd/linux/http/ppc.rb b/modules/payloads/adapters/cmd/linux/http/ppc.rb index 5b1a0d64a032..892e57663745 100644 --- a/modules/payloads/adapters/cmd/linux/http/ppc.rb +++ b/modules/payloads/adapters/cmd/linux/http/ppc.rb @@ -12,7 +12,7 @@ def initialize(info = {}) update_info( info, 'Name' => 'HTTP Fetch', - 'Description' => 'Fetch and execute an MIPSLE payload from an HTTP server.', + 'Description' => 'Fetch and execute an PPC payload from an HTTP server.', 'Author' => ['Brendan Watters', 'Spencer McIntyre'], 'Platform' => 'linux', 'Arch' => ARCH_CMD, From c098665a2e3b1b80c1d5476b8b5703b98fc8467b Mon Sep 17 00:00:00 2001 From: Brendan Date: Wed, 12 Feb 2025 15:51:57 -0600 Subject: [PATCH 4/7] Update modules/payloads/adapters/cmd/linux/http/ppc64.rb Co-authored-by: Christophe De La Fuente <56716719+cdelafuente-r7@users.noreply.github.com> --- modules/payloads/adapters/cmd/linux/http/ppc64.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/payloads/adapters/cmd/linux/http/ppc64.rb b/modules/payloads/adapters/cmd/linux/http/ppc64.rb index 56b77f2848ae..3cfec0f615c1 100644 --- a/modules/payloads/adapters/cmd/linux/http/ppc64.rb +++ b/modules/payloads/adapters/cmd/linux/http/ppc64.rb @@ -12,7 +12,7 @@ def initialize(info = {}) update_info( info, 'Name' => 'HTTP Fetch', - 'Description' => 'Fetch and execute an MIPSLE payload from an HTTP server.', + 'Description' => 'Fetch and execute an PPC64 payload from an HTTP server.', 'Author' => ['Brendan Watters', 'Spencer McIntyre'], 'Platform' => 'linux', 'Arch' => ARCH_CMD, From b7dd63f0a982255192a46fcb8bf3fc4bc17e3163 Mon Sep 17 00:00:00 2001 From: Brendan Date: Wed, 12 Feb 2025 15:52:03 -0600 Subject: [PATCH 5/7] Update modules/payloads/adapters/cmd/linux/tftp/ppc.rb Co-authored-by: Christophe De La Fuente <56716719+cdelafuente-r7@users.noreply.github.com> --- modules/payloads/adapters/cmd/linux/tftp/ppc.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/payloads/adapters/cmd/linux/tftp/ppc.rb b/modules/payloads/adapters/cmd/linux/tftp/ppc.rb index d2857b1fa480..46888d89abee 100644 --- a/modules/payloads/adapters/cmd/linux/tftp/ppc.rb +++ b/modules/payloads/adapters/cmd/linux/tftp/ppc.rb @@ -12,7 +12,7 @@ def initialize(info = {}) update_info( info, 'Name' => 'TFTP Fetch', - 'Description' => 'Fetch and execute an MIPSLE payload from an TFTP server.', + 'Description' => 'Fetch and execute an PPC payload from an TFTP server.', 'Author' => ['Brendan Watters', 'Spencer McIntyre'], 'Platform' => 'linux', 'Arch' => ARCH_CMD, From 3465b57e4813a9632d5e747d9c653d6a23672d77 Mon Sep 17 00:00:00 2001 From: Brendan Date: Wed, 12 Feb 2025 15:52:08 -0600 Subject: [PATCH 6/7] Update modules/payloads/adapters/cmd/linux/tftp/ppc64.rb Co-authored-by: Christophe De La Fuente <56716719+cdelafuente-r7@users.noreply.github.com> --- modules/payloads/adapters/cmd/linux/tftp/ppc64.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/payloads/adapters/cmd/linux/tftp/ppc64.rb b/modules/payloads/adapters/cmd/linux/tftp/ppc64.rb index dbec5c606d41..2542cb9d9121 100644 --- a/modules/payloads/adapters/cmd/linux/tftp/ppc64.rb +++ b/modules/payloads/adapters/cmd/linux/tftp/ppc64.rb @@ -12,7 +12,7 @@ def initialize(info = {}) update_info( info, 'Name' => 'TFTP Fetch', - 'Description' => 'Fetch and execute an MIPSLE payload from a TFTP server.', + 'Description' => 'Fetch and execute an PPC64 payload from a TFTP server.', 'Author' => ['Brendan Watters', 'Spencer McIntyre'], 'Platform' => 'linux', 'Arch' => ARCH_CMD, From 7b4678564a20952b719871990715b95fdc9eda7a Mon Sep 17 00:00:00 2001 From: Brendan Date: Wed, 12 Feb 2025 15:52:15 -0600 Subject: [PATCH 7/7] Update modules/payloads/adapters/cmd/linux/https/ppc64.rb Co-authored-by: Christophe De La Fuente <56716719+cdelafuente-r7@users.noreply.github.com> --- modules/payloads/adapters/cmd/linux/https/ppc64.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/payloads/adapters/cmd/linux/https/ppc64.rb b/modules/payloads/adapters/cmd/linux/https/ppc64.rb index b6f8c57909c5..38f22df12b76 100644 --- a/modules/payloads/adapters/cmd/linux/https/ppc64.rb +++ b/modules/payloads/adapters/cmd/linux/https/ppc64.rb @@ -12,7 +12,7 @@ def initialize(info = {}) update_info( info, 'Name' => 'HTTPS Fetch', - 'Description' => 'Fetch and execute an MIPSLE payload from an HTTPS server.', + 'Description' => 'Fetch and execute an PPC64 payload from an HTTPS server.', 'Author' => ['Brendan Watters', 'Spencer McIntyre'], 'Platform' => 'linux', 'Arch' => ARCH_CMD,