From cba4d36df2f04db847d7e48a6c0a6ce7352d02f7 Mon Sep 17 00:00:00 2001 From: Jeffrey Martin Date: Wed, 23 Aug 2017 16:58:48 -0500 Subject: [PATCH] provide missing bits for R platform --- lib/msf/core/module/platform.rb | 8 ++++++++ modules/payloads/singles/cmd/unix/bind_r.rb | 2 +- modules/payloads/singles/cmd/unix/reverse_r.rb | 7 ++++--- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/lib/msf/core/module/platform.rb b/lib/msf/core/module/platform.rb index 8fe2e8b217..90f82c3bd5 100644 --- a/lib/msf/core/module/platform.rb +++ b/lib/msf/core/module/platform.rb @@ -352,6 +352,14 @@ class Msf::Module::Platform Alias = "java" end + # + # R + # + class R < Msf::Module::Platform + Rank = 100 + Alias = "r" + end + # # Ruby # diff --git a/modules/payloads/singles/cmd/unix/bind_r.rb b/modules/payloads/singles/cmd/unix/bind_r.rb index 7d459efd63..a128e68aa3 100644 --- a/modules/payloads/singles/cmd/unix/bind_r.rb +++ b/modules/payloads/singles/cmd/unix/bind_r.rb @@ -27,7 +27,7 @@ module MetasploitModule 'Handler' => Msf::Handler::BindTcp, 'Session' => Msf::Sessions::CommandShell, 'PayloadType' => 'cmd', - 'RequiredCmd' => 'ruby', + 'RequiredCmd' => 'R', 'Payload' => { 'Offsets' => {}, 'Payload' => '' } )) end diff --git a/modules/payloads/singles/cmd/unix/reverse_r.rb b/modules/payloads/singles/cmd/unix/reverse_r.rb index 7a87703e65..5af72c3e88 100644 --- a/modules/payloads/singles/cmd/unix/reverse_r.rb +++ b/modules/payloads/singles/cmd/unix/reverse_r.rb @@ -22,11 +22,12 @@ module MetasploitModule 'Description' => 'Connect back and create a command shell via R', 'Author' => [ 'RageLtMan' ], 'License' => MSF_LICENSE, - 'Platform' => 'r', - 'Arch' => ARCH_R, + 'Platform' => 'unix', + 'Arch' => ARCH_CMD, 'Handler' => Msf::Handler::ReverseTcp, 'Session' => Msf::Sessions::CommandShell, - 'PayloadType' => 'r', + 'PayloadType' => 'cmd', + 'RequiredCmd' => 'R', 'Payload' => { 'Offsets' => {}, 'Payload' => '' } )) end