wpscan 3.8.5 → 3.8.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/finders/main_theme/urls_in_homepage.rb +1 -1
- data/app/finders/users.rb +2 -0
- data/app/finders/users/author_sitemap.rb +36 -0
- data/app/finders/users/yoast_seo_author_sitemap.rb +1 -21
- data/app/finders/wp_items/urls_in_page.rb +2 -2
- data/lib/wpscan/db/dynamic_finders/base.rb +1 -1
- data/lib/wpscan/db/dynamic_finders/plugin.rb +1 -1
- data/lib/wpscan/db/dynamic_finders/wordpress.rb +1 -1
- data/lib/wpscan/version.rb +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f98f734f7109df65f502a120586451cb9cdcd1f741a03db2d664e5e2b0ebde05
|
4
|
+
data.tar.gz: da340ec87c3ac0603b0ffe9fb518067c9cea0596d59bedc15e0dabd7f7e7cfb1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6d45b4fbc1a60f0f804b4fe59815da1ca324693c1546cd1cd91b75fea0aab363fef93ab240ef1009417e8cb7b5230642b6ff464acd90a0bbb917f0ecce915171
|
7
|
+
data.tar.gz: 4e0c504291a53f475f834f6b36a14e6634fca79f5cfc03c2375815a509c154047c8da98e25da026d30edd8c4e3bbb2ded4a29d4a678d0e2fe5d10646a6f09f9b
|
@@ -13,7 +13,7 @@ module WPScan
|
|
13
13
|
def passive(opts = {})
|
14
14
|
found = []
|
15
15
|
|
16
|
-
slugs = items_from_links('themes', false) + items_from_codes('themes', false)
|
16
|
+
slugs = items_from_links('themes', uniq: false) + items_from_codes('themes', uniq: false)
|
17
17
|
|
18
18
|
slugs.each_with_object(Hash.new(0)) { |slug, counts| counts[slug] += 1 }.each do |slug, occurences|
|
19
19
|
found << Model::Theme.new(slug, target, opts.merge(found_by: found_by, confidence: 2 * occurences))
|
data/app/finders/users.rb
CHANGED
@@ -6,6 +6,7 @@ require_relative 'users/oembed_api'
|
|
6
6
|
require_relative 'users/rss_generator'
|
7
7
|
require_relative 'users/author_id_brute_forcing'
|
8
8
|
require_relative 'users/login_error_messages'
|
9
|
+
require_relative 'users/author_sitemap'
|
9
10
|
require_relative 'users/yoast_seo_author_sitemap'
|
10
11
|
|
11
12
|
module WPScan
|
@@ -22,6 +23,7 @@ module WPScan
|
|
22
23
|
Users::WpJsonApi.new(target) <<
|
23
24
|
Users::OembedApi.new(target) <<
|
24
25
|
Users::RSSGenerator.new(target) <<
|
26
|
+
Users::AuthorSitemap.new(target) <<
|
25
27
|
Users::YoastSeoAuthorSitemap.new(target) <<
|
26
28
|
Users::AuthorIdBruteForcing.new(target) <<
|
27
29
|
Users::LoginErrorMessages.new(target)
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module WPScan
|
4
|
+
module Finders
|
5
|
+
module Users
|
6
|
+
# Since WP 5.5, /wp-sitemap-users-1.xml is generated and contains
|
7
|
+
# the usernames of accounts who made a post
|
8
|
+
class AuthorSitemap < CMSScanner::Finders::Finder
|
9
|
+
# @param [ Hash ] opts
|
10
|
+
#
|
11
|
+
# @return [ Array<User> ]
|
12
|
+
def aggressive(_opts = {})
|
13
|
+
found = []
|
14
|
+
|
15
|
+
Browser.get(sitemap_url).html.xpath('//url/loc').each do |user_tag|
|
16
|
+
username = user_tag.text.to_s[%r{/author/([^/]+)/}, 1]
|
17
|
+
|
18
|
+
next unless username && !username.strip.empty?
|
19
|
+
|
20
|
+
found << Model::User.new(username,
|
21
|
+
found_by: found_by,
|
22
|
+
confidence: 100,
|
23
|
+
interesting_entries: [sitemap_url])
|
24
|
+
end
|
25
|
+
|
26
|
+
found
|
27
|
+
end
|
28
|
+
|
29
|
+
# @return [ String ] The URL of the sitemap
|
30
|
+
def sitemap_url
|
31
|
+
@sitemap_url ||= target.url('wp-sitemap-users-1.xml')
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -5,27 +5,7 @@ module WPScan
|
|
5
5
|
module Users
|
6
6
|
# The YOAST SEO plugin has an author-sitemap.xml which can leak usernames
|
7
7
|
# See https://github.com/wpscanteam/wpscan/issues/1228
|
8
|
-
class YoastSeoAuthorSitemap <
|
9
|
-
# @param [ Hash ] opts
|
10
|
-
#
|
11
|
-
# @return [ Array<User> ]
|
12
|
-
def aggressive(_opts = {})
|
13
|
-
found = []
|
14
|
-
|
15
|
-
Browser.get(sitemap_url).html.xpath('//url/loc').each do |user_tag|
|
16
|
-
username = user_tag.text.to_s[%r{/author/([^/]+)/}, 1]
|
17
|
-
|
18
|
-
next unless username && !username.strip.empty?
|
19
|
-
|
20
|
-
found << Model::User.new(username,
|
21
|
-
found_by: found_by,
|
22
|
-
confidence: 100,
|
23
|
-
interesting_entries: [sitemap_url])
|
24
|
-
end
|
25
|
-
|
26
|
-
found
|
27
|
-
end
|
28
|
-
|
8
|
+
class YoastSeoAuthorSitemap < AuthorSitemap
|
29
9
|
# @return [ String ] The URL of the author-sitemap
|
30
10
|
def sitemap_url
|
31
11
|
@sitemap_url ||= target.url('author-sitemap.xml')
|
@@ -9,7 +9,7 @@ module WPScan
|
|
9
9
|
# @param [ Boolean ] uniq Wether or not to apply the #uniq on the results
|
10
10
|
#
|
11
11
|
# @return [ Array<String> ] The plugins/themes detected in the href, src attributes of the page
|
12
|
-
def items_from_links(type, uniq
|
12
|
+
def items_from_links(type, uniq: true)
|
13
13
|
found = []
|
14
14
|
xpath = format(
|
15
15
|
'(//@href|//@src|//@data-src)[contains(., "%s")]',
|
@@ -31,7 +31,7 @@ module WPScan
|
|
31
31
|
# @param [ Boolean ] uniq Wether or not to apply the #uniq on the results
|
32
32
|
#
|
33
33
|
# @return [Array<String> ] The plugins/themes detected in the javascript/style of the homepage
|
34
|
-
def items_from_codes(type, uniq
|
34
|
+
def items_from_codes(type, uniq: true)
|
35
35
|
found = []
|
36
36
|
|
37
37
|
page_res.html.xpath('//script[not(@src)]|//style[not(@src)]').each do |tag|
|
@@ -16,7 +16,7 @@ module WPScan
|
|
16
16
|
# @param [ Symbol ] finder_class
|
17
17
|
# @param [ Boolean ] aggressive
|
18
18
|
# @return [ Hash ]
|
19
|
-
def self.finder_configs(finder_class, aggressive
|
19
|
+
def self.finder_configs(finder_class, aggressive: false)
|
20
20
|
configs = {}
|
21
21
|
|
22
22
|
return configs unless allowed_classes.include?(finder_class)
|
@@ -24,7 +24,7 @@ module WPScan
|
|
24
24
|
# @param [ Symbol ] finder_class
|
25
25
|
# @param [ Boolean ] aggressive
|
26
26
|
# @return [ Hash ]
|
27
|
-
def self.finder_configs(finder_class, aggressive
|
27
|
+
def self.finder_configs(finder_class, aggressive: false)
|
28
28
|
configs = {}
|
29
29
|
|
30
30
|
return configs unless allowed_classes.include?(finder_class)
|
data/lib/wpscan/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wpscan
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.8.
|
4
|
+
version: 3.8.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- WPScanTeam
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-08-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cms_scanner
|
@@ -100,14 +100,14 @@ dependencies:
|
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: 0.
|
103
|
+
version: 0.89.0
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: 0.
|
110
|
+
version: 0.89.0
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: rubocop-performance
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -258,6 +258,7 @@ files:
|
|
258
258
|
- app/finders/users.rb
|
259
259
|
- app/finders/users/author_id_brute_forcing.rb
|
260
260
|
- app/finders/users/author_posts.rb
|
261
|
+
- app/finders/users/author_sitemap.rb
|
261
262
|
- app/finders/users/login_error_messages.rb
|
262
263
|
- app/finders/users/oembed_api.rb
|
263
264
|
- app/finders/users/rss_generator.rb
|