Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions modules/payloads/adapters/cmd/linux/http/riscv32le.rb
Original file line number Diff line number Diff line change
@@ -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 RISC-V 32-bit payload from an HTTP server.',
'Author' => ['Brendan Watters', 'Spencer McIntyre', 'bcoles'],
'Platform' => 'linux',
'Arch' => ARCH_CMD,
'License' => MSF_LICENSE,
'AdaptedArch' => ARCH_RISCV32LE,
'AdaptedPlatform' => 'linux'
)
)
end
end
25 changes: 25 additions & 0 deletions modules/payloads/adapters/cmd/linux/http/riscv64le.rb
Original file line number Diff line number Diff line change
@@ -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 RISC-V 64-bit payload from an HTTP server.',
'Author' => ['Brendan Watters', 'Spencer McIntyre', 'bcoles'],
'Platform' => 'linux',
'Arch' => ARCH_CMD,
'License' => MSF_LICENSE,
'AdaptedArch' => ARCH_RISCV64LE,
'AdaptedPlatform' => 'linux'
)
)
end
end
25 changes: 25 additions & 0 deletions modules/payloads/adapters/cmd/linux/https/riscv32le.rb
Original file line number Diff line number Diff line change
@@ -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 RISC-V 32-bit payload from an HTTPS server.',
'Author' => ['Brendan Watters', 'Spencer McIntyre', 'bcoles'],
'Platform' => 'linux',
'Arch' => ARCH_CMD,
'License' => MSF_LICENSE,
'AdaptedArch' => ARCH_RISCV32LE,
'AdaptedPlatform' => 'linux'
)
)
end
end
25 changes: 25 additions & 0 deletions modules/payloads/adapters/cmd/linux/https/riscv64le.rb
Original file line number Diff line number Diff line change
@@ -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 RISC-V 64-bit payload from an HTTPS server.',
'Author' => ['Brendan Watters', 'Spencer McIntyre', 'bcoles'],
'Platform' => 'linux',
'Arch' => ARCH_CMD,
'License' => MSF_LICENSE,
'AdaptedArch' => ARCH_RISCV64LE,
'AdaptedPlatform' => 'linux'
)
)
end
end
25 changes: 25 additions & 0 deletions modules/payloads/adapters/cmd/linux/tftp/riscv32le.rb
Original file line number Diff line number Diff line change
@@ -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 RISC-V 32-bit payload from a TFTP server.',
'Author' => ['Brendan Watters', 'Spencer McIntyre', 'bcoles'],
'Platform' => 'linux',
'Arch' => ARCH_CMD,
'License' => MSF_LICENSE,
'AdaptedArch' => ARCH_RISCV32LE,
'AdaptedPlatform' => 'linux'
)
)
end
end
25 changes: 25 additions & 0 deletions modules/payloads/adapters/cmd/linux/tftp/riscv64le.rb
Original file line number Diff line number Diff line change
@@ -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 RISC-V 64-bit payload from a TFTP server.',
'Author' => ['Brendan Watters', 'Spencer McIntyre', 'bcoles'],
'Platform' => 'linux',
'Arch' => ARCH_CMD,
'License' => MSF_LICENSE,
'AdaptedArch' => ARCH_RISCV64LE,
'AdaptedPlatform' => 'linux'
)
)
end
end
48 changes: 48 additions & 0 deletions spec/modules/payloads_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,22 @@
reference_name: 'cmd/linux/http/mips64'
end

context 'cmd/linux/http/riscv32le' do
it_should_behave_like 'payload is not cached',
ancestor_reference_names: [
'adapters/cmd/linux/http/riscv32le'
],
reference_name: 'cmd/linux/http/riscv32le'
end

context 'cmd/linux/http/riscv64le' do
it_should_behave_like 'payload is not cached',
ancestor_reference_names: [
'adapters/cmd/linux/http/riscv64le'
],
reference_name: 'cmd/linux/http/riscv64le'
end

context 'cmd/linux/https/mips64' do
it_should_behave_like 'payload is not cached',
ancestor_reference_names: [
Expand Down Expand Up @@ -677,6 +693,22 @@
reference_name: 'cmd/linux/tftp/mipsle'
end

context 'cmd/linux/https/riscv32le' do
it_should_behave_like 'payload is not cached',
ancestor_reference_names: [
'adapters/cmd/linux/https/riscv32le'
],
reference_name: 'cmd/linux/https/riscv32le'
end

context 'cmd/linux/https/riscv64le' do
it_should_behave_like 'payload is not cached',
ancestor_reference_names: [
'adapters/cmd/linux/https/riscv64le'
],
reference_name: 'cmd/linux/https/riscv64le'
end

context 'cmd/linux/http/ppc' do
it_should_behave_like 'payload is not cached',
ancestor_reference_names: [
Expand Down Expand Up @@ -749,6 +781,22 @@
reference_name: 'cmd/linux/tftp/ppc64le'
end

context 'cmd/linux/tftp/riscv32le' do
it_should_behave_like 'payload is not cached',
ancestor_reference_names: [
'adapters/cmd/linux/tftp/riscv32le'
],
reference_name: 'cmd/linux/tftp/riscv32le'
end

context 'cmd/linux/tftp/riscv64le' do
it_should_behave_like 'payload is not cached',
ancestor_reference_names: [
'adapters/cmd/linux/tftp/riscv64le'
],
reference_name: 'cmd/linux/tftp/riscv64le'
end

context 'cmd/linux/http/x86' do
it_should_behave_like 'payload is not cached',
ancestor_reference_names: [
Expand Down
Loading