@@ -20,7 +20,9 @@ def initialize(info = {})
20
20
This module will generate a plugin, pack the payload into it
21
21
and upload it to a server running Piwik. Superuser Credentials are
22
22
required to run this module. This module does not work against Piwik 1
23
- as there is no option to upload custom plugins.
23
+ as there is no option to upload custom plugins. Piwik disabled
24
+ custom plugin uploads in version 3.0.3. From version 3.0.3 onwards you
25
+ have to enable custom plugin uploads via the config file.
24
26
Tested with Piwik 2.14.0, 2.16.0, 2.17.1 and 3.0.1.
25
27
} ,
26
28
'License' => MSF_LICENSE ,
@@ -30,7 +32,9 @@ def initialize(info = {})
30
32
] ,
31
33
'References' =>
32
34
[
33
- [ 'URL' , 'https://firefart.at/post/turning_piwik_superuser_creds_into_rce/' ]
35
+ [ 'URL' , 'https://firefart.at/post/turning_piwik_superuser_creds_into_rce/' ] ,
36
+ [ 'URL' , 'https://piwik.org/faq/plugins/faq_21/' ] ,
37
+ [ 'URL' , 'https://piwik.org/changelog/piwik-3-0-3/' ]
34
38
] ,
35
39
'DisclosureDate' => 'Feb 05 2017' ,
36
40
'Platform' => 'php' ,
@@ -314,6 +318,10 @@ def exploit
314
318
315
319
upload_nonce = nil
316
320
if res && res . code == 200
321
+ if res . body =~ /Plugin upload is disabled in config file/
322
+ fail_with ( Failure ::NotVulnerable , 'Custom plugin uploads are disabled' )
323
+ end
324
+
317
325
match = res . body . match ( /<form.+id="uploadPluginForm".+nonce=(\w +)/m )
318
326
if match
319
327
upload_nonce = match [ 1 ]
@@ -362,4 +370,3 @@ def exploit
362
370
} , 5 )
363
371
end
364
372
end
365
-
0 commit comments