wpscan 3.7.9 → 3.7.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +5 -0
- data/app/controllers/vuln_api.rb +4 -2
- data/app/finders/interesting_findings/backup_db.rb +1 -2
- data/app/finders/interesting_findings/debug_log.rb +1 -5
- data/app/finders/interesting_findings/duplicator_installer_log.rb +1 -6
- data/app/finders/interesting_findings/emergency_pwd_reset_script.rb +1 -4
- data/app/finders/interesting_findings/full_path_disclosure.rb +1 -2
- data/app/finders/interesting_findings/mu_plugins.rb +2 -14
- data/app/finders/interesting_findings/multisite.rb +1 -7
- data/app/finders/interesting_findings/registration.rb +1 -6
- data/app/finders/interesting_findings/tmm_db_migrate.rb +1 -6
- data/app/finders/interesting_findings/upload_directory_listing.rb +1 -6
- data/app/finders/interesting_findings/upload_sql_dump.rb +1 -5
- data/app/finders/interesting_findings/wp_cron.rb +1 -11
- data/app/models/interesting_finding.rb +66 -1
- data/app/models/xml_rpc.rb +1 -1
- data/lib/wpscan/db/updater.rb +1 -1
- data/lib/wpscan/errors/update.rb +12 -0
- data/lib/wpscan/target/platform/wordpress.rb +1 -1
- data/lib/wpscan/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e90db053602c7fcca669e5c0e31d93b6ee50ffd189ad6c60015461c63c0d5f9d
|
4
|
+
data.tar.gz: 556b07a69059567771ecf05f357396e11f8efa7538dfd1f638e9a2a420f5638e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c170ba773c4209f5f93551118cccf5f5be744f3a4d1e0746cec11ae959959f2e386b7f1848d96b72b86aece27abf3431760c131736ba1d55c535eeab563ef1ec
|
7
|
+
data.tar.gz: 1b0b3bebf70efa0ac6111b97032b464a8e3188799d016ac5ebbd9c9cdfcfc4d8803291052b3d883a985aa10a77282187f07957080c2b1121b2eb83d3f2031522
|
data/README.md
CHANGED
@@ -130,6 +130,11 @@ cli_options:
|
|
130
130
|
api_token: YOUR_API_TOKEN
|
131
131
|
```
|
132
132
|
|
133
|
+
## Load APi Token From ENV
|
134
|
+
|
135
|
+
The API Token will be automatically loaded from the ENV variable `WPSCAN_API_TOKEN` if present. If the `--api-token` CLI option is also provided, the value from the CLI will be used.
|
136
|
+
|
137
|
+
|
133
138
|
## Enumerating usernames
|
134
139
|
|
135
140
|
```shell
|
data/app/controllers/vuln_api.rb
CHANGED
@@ -4,6 +4,8 @@ module WPScan
|
|
4
4
|
module Controller
|
5
5
|
# Controller to handle the API token
|
6
6
|
class VulnApi < CMSScanner::Controller::Base
|
7
|
+
ENV_KEY = 'WPSCAN_API_TOKEN'
|
8
|
+
|
7
9
|
def cli_options
|
8
10
|
[
|
9
11
|
OptString.new(['--api-token TOKEN', 'The WPVulnDB API Token to display vulnerability data'])
|
@@ -11,9 +13,9 @@ module WPScan
|
|
11
13
|
end
|
12
14
|
|
13
15
|
def before_scan
|
14
|
-
return unless ParsedCli.api_token
|
16
|
+
return unless ParsedCli.api_token || ENV.key?(ENV_KEY)
|
15
17
|
|
16
|
-
DB::VulnApi.token = ParsedCli.api_token
|
18
|
+
DB::VulnApi.token = ParsedCli.api_token || ENV[ENV_KEY]
|
17
19
|
|
18
20
|
api_status = DB::VulnApi.status
|
19
21
|
|
@@ -16,8 +16,7 @@ module WPScan
|
|
16
16
|
target.url(path),
|
17
17
|
confidence: 70,
|
18
18
|
found_by: DIRECT_ACCESS,
|
19
|
-
interesting_entries: target.directory_listing_entries(path)
|
20
|
-
references: { url: 'https://github.com/wpscanteam/wpscan/issues/422' }
|
19
|
+
interesting_entries: target.directory_listing_entries(path)
|
21
20
|
)
|
22
21
|
end
|
23
22
|
end
|
@@ -11,11 +11,7 @@ module WPScan
|
|
11
11
|
|
12
12
|
return unless target.debug_log?(path)
|
13
13
|
|
14
|
-
Model::DebugLog.new(
|
15
|
-
target.url(path),
|
16
|
-
confidence: 100, found_by: DIRECT_ACCESS,
|
17
|
-
references: { url: 'https://codex.wordpress.org/Debugging_in_WordPress' }
|
18
|
-
)
|
14
|
+
Model::DebugLog.new(target.url(path), confidence: 100, found_by: DIRECT_ACCESS)
|
19
15
|
end
|
20
16
|
end
|
21
17
|
end
|
@@ -11,12 +11,7 @@ module WPScan
|
|
11
11
|
|
12
12
|
return unless /DUPLICATOR INSTALL-LOG/.match?(target.head_and_get(path).body)
|
13
13
|
|
14
|
-
Model::DuplicatorInstallerLog.new(
|
15
|
-
target.url(path),
|
16
|
-
confidence: 100,
|
17
|
-
found_by: DIRECT_ACCESS,
|
18
|
-
references: { url: 'https://www.exploit-db.com/ghdb/3981/' }
|
19
|
-
)
|
14
|
+
Model::DuplicatorInstallerLog.new(target.url(path), confidence: 100, found_by: DIRECT_ACCESS)
|
20
15
|
end
|
21
16
|
end
|
22
17
|
end
|
@@ -15,10 +15,7 @@ module WPScan
|
|
15
15
|
Model::EmergencyPwdResetScript.new(
|
16
16
|
target.url(path),
|
17
17
|
confidence: /password/i.match?(res.body) ? 100 : 40,
|
18
|
-
found_by: DIRECT_ACCESS
|
19
|
-
references: {
|
20
|
-
url: 'https://codex.wordpress.org/Resetting_Your_Password#Using_the_Emergency_Password_Reset_Script'
|
21
|
-
}
|
18
|
+
found_by: DIRECT_ACCESS
|
22
19
|
)
|
23
20
|
end
|
24
21
|
end
|
@@ -16,13 +16,7 @@ module WPScan
|
|
16
16
|
|
17
17
|
target.mu_plugins = true
|
18
18
|
|
19
|
-
return Model::MuPlugins.new(
|
20
|
-
url,
|
21
|
-
confidence: 70,
|
22
|
-
found_by: 'URLs In Homepage (Passive Detection)',
|
23
|
-
to_s: "This site has 'Must Use Plugins': #{url}",
|
24
|
-
references: { url: 'http://codex.wordpress.org/Must_Use_Plugins' }
|
25
|
-
)
|
19
|
+
return Model::MuPlugins.new(url, confidence: 70, found_by: 'URLs In Homepage (Passive Detection)')
|
26
20
|
end
|
27
21
|
nil
|
28
22
|
end
|
@@ -37,13 +31,7 @@ module WPScan
|
|
37
31
|
|
38
32
|
target.mu_plugins = true
|
39
33
|
|
40
|
-
Model::MuPlugins.new(
|
41
|
-
url,
|
42
|
-
confidence: 80,
|
43
|
-
found_by: DIRECT_ACCESS,
|
44
|
-
to_s: "This site has 'Must Use Plugins': #{url}",
|
45
|
-
references: { url: 'http://codex.wordpress.org/Must_Use_Plugins' }
|
46
|
-
)
|
34
|
+
Model::MuPlugins.new(url, confidence: 80, found_by: DIRECT_ACCESS)
|
47
35
|
end
|
48
36
|
end
|
49
37
|
end
|
@@ -17,13 +17,7 @@ module WPScan
|
|
17
17
|
|
18
18
|
target.multisite = true
|
19
19
|
|
20
|
-
Model::Multisite.new(
|
21
|
-
url,
|
22
|
-
confidence: 100,
|
23
|
-
found_by: DIRECT_ACCESS,
|
24
|
-
to_s: 'This site seems to be a multisite',
|
25
|
-
references: { url: 'http://codex.wordpress.org/Glossary#Multisite' }
|
26
|
-
)
|
20
|
+
Model::Multisite.new(url, confidence: 100, found_by: DIRECT_ACCESS)
|
27
21
|
end
|
28
22
|
end
|
29
23
|
end
|
@@ -20,12 +20,7 @@ module WPScan
|
|
20
20
|
|
21
21
|
target.registration_enabled = true
|
22
22
|
|
23
|
-
Model::Registration.new(
|
24
|
-
res.effective_url,
|
25
|
-
confidence: 100,
|
26
|
-
found_by: DIRECT_ACCESS,
|
27
|
-
to_s: "Registration is enabled: #{res.effective_url}"
|
28
|
-
)
|
23
|
+
Model::Registration.new(res.effective_url, confidence: 100, found_by: DIRECT_ACCESS)
|
29
24
|
end
|
30
25
|
end
|
31
26
|
end
|
@@ -13,12 +13,7 @@ module WPScan
|
|
13
13
|
|
14
14
|
return unless res.code == 200 && res.headers['Content-Type'] =~ %r{\Aapplication/zip}i
|
15
15
|
|
16
|
-
Model::TmmDbMigrate.new(
|
17
|
-
url,
|
18
|
-
confidence: 100,
|
19
|
-
found_by: DIRECT_ACCESS,
|
20
|
-
references: { packetstorm: 131_957 }
|
21
|
-
)
|
16
|
+
Model::TmmDbMigrate.new(url, confidence: 100, found_by: DIRECT_ACCESS)
|
22
17
|
end
|
23
18
|
end
|
24
19
|
end
|
@@ -13,12 +13,7 @@ module WPScan
|
|
13
13
|
|
14
14
|
url = target.url(path)
|
15
15
|
|
16
|
-
Model::UploadDirectoryListing.new(
|
17
|
-
url,
|
18
|
-
confidence: 100,
|
19
|
-
found_by: DIRECT_ACCESS,
|
20
|
-
to_s: "Upload directory has listing enabled: #{url}"
|
21
|
-
)
|
16
|
+
Model::UploadDirectoryListing.new(url, confidence: 100, found_by: DIRECT_ACCESS)
|
22
17
|
end
|
23
18
|
end
|
24
19
|
end
|
@@ -14,11 +14,7 @@ module WPScan
|
|
14
14
|
|
15
15
|
return unless SQL_PATTERN.match?(res.body)
|
16
16
|
|
17
|
-
Model::UploadSQLDump.new(
|
18
|
-
target.url(path),
|
19
|
-
confidence: 100,
|
20
|
-
found_by: DIRECT_ACCESS
|
21
|
-
)
|
17
|
+
Model::UploadSQLDump.new(target.url(path), confidence: 100, found_by: DIRECT_ACCESS)
|
22
18
|
end
|
23
19
|
end
|
24
20
|
end
|
@@ -11,17 +11,7 @@ module WPScan
|
|
11
11
|
|
12
12
|
return unless res.code == 200
|
13
13
|
|
14
|
-
Model::WPCron.new(
|
15
|
-
wp_cron_url,
|
16
|
-
confidence: 60,
|
17
|
-
found_by: DIRECT_ACCESS,
|
18
|
-
references: {
|
19
|
-
url: [
|
20
|
-
'https://www.iplocation.net/defend-wordpress-from-ddos',
|
21
|
-
'https://github.com/wpscanteam/wpscan/issues/1299'
|
22
|
-
]
|
23
|
-
}
|
24
|
-
)
|
14
|
+
Model::WPCron.new(wp_cron_url, confidence: 60, found_by: DIRECT_ACCESS)
|
25
15
|
end
|
26
16
|
|
27
17
|
def wp_cron_url
|
@@ -8,45 +8,110 @@ module WPScan
|
|
8
8
|
end
|
9
9
|
|
10
10
|
#
|
11
|
-
#
|
11
|
+
# Some classes are empty for the #type to be correctly displayed (as taken from the self.class from the parent)
|
12
12
|
#
|
13
13
|
class BackupDB < InterestingFinding
|
14
|
+
# @return [ Hash ]
|
15
|
+
def references
|
16
|
+
@references ||= { url: ['https://github.com/wpscanteam/wpscan/issues/422'] }
|
17
|
+
end
|
14
18
|
end
|
15
19
|
|
16
20
|
class DebugLog < InterestingFinding
|
21
|
+
# @ return [ Hash ]
|
22
|
+
def references
|
23
|
+
@references ||= { url: 'https://codex.wordpress.org/Debugging_in_WordPress' }
|
24
|
+
end
|
17
25
|
end
|
18
26
|
|
19
27
|
class DuplicatorInstallerLog < InterestingFinding
|
28
|
+
# @return [ Hash ]
|
29
|
+
def references
|
30
|
+
@references ||= { url: ['https://www.exploit-db.com/ghdb/3981/'] }
|
31
|
+
end
|
20
32
|
end
|
21
33
|
|
22
34
|
class EmergencyPwdResetScript < InterestingFinding
|
35
|
+
def references
|
36
|
+
@references ||= {
|
37
|
+
url: ['https://codex.wordpress.org/Resetting_Your_Password#Using_the_Emergency_Password_Reset_Script']
|
38
|
+
}
|
39
|
+
end
|
23
40
|
end
|
24
41
|
|
25
42
|
class FullPathDisclosure < InterestingFinding
|
43
|
+
# @return [ Hash ]
|
44
|
+
def references
|
45
|
+
@references ||= { url: ['https://www.owasp.org/index.php/Full_Path_Disclosure'] }
|
46
|
+
end
|
26
47
|
end
|
27
48
|
|
28
49
|
class MuPlugins < InterestingFinding
|
50
|
+
# @return [ String ]
|
51
|
+
def to_s
|
52
|
+
@to_s ||= "This site has 'Must Use Plugins': #{url}"
|
53
|
+
end
|
54
|
+
|
55
|
+
# @return [ Hash ]
|
56
|
+
def references
|
57
|
+
@references ||= { url: ['http://codex.wordpress.org/Must_Use_Plugins'] }
|
58
|
+
end
|
29
59
|
end
|
30
60
|
|
31
61
|
class Multisite < InterestingFinding
|
62
|
+
# @return [ String ]
|
63
|
+
def to_s
|
64
|
+
@to_s ||= 'This site seems to be a multisite'
|
65
|
+
end
|
66
|
+
|
67
|
+
# @return [ Hash ]
|
68
|
+
def references
|
69
|
+
@references ||= { url: ['http://codex.wordpress.org/Glossary#Multisite'] }
|
70
|
+
end
|
32
71
|
end
|
33
72
|
|
34
73
|
class Readme < InterestingFinding
|
35
74
|
end
|
36
75
|
|
37
76
|
class Registration < InterestingFinding
|
77
|
+
# @return [ String ]
|
78
|
+
def to_s
|
79
|
+
@to_s ||= "Registration is enabled: #{url}"
|
80
|
+
end
|
38
81
|
end
|
39
82
|
|
40
83
|
class TmmDbMigrate < InterestingFinding
|
84
|
+
# @return [ Hash ]
|
85
|
+
def references
|
86
|
+
@references ||= { packetstorm: [131_957] }
|
87
|
+
end
|
41
88
|
end
|
42
89
|
|
43
90
|
class UploadDirectoryListing < InterestingFinding
|
91
|
+
# @return [ String ]
|
92
|
+
def to_s
|
93
|
+
@to_s ||= "Upload directory has listing enabled: #{url}"
|
94
|
+
end
|
44
95
|
end
|
45
96
|
|
46
97
|
class UploadSQLDump < InterestingFinding
|
47
98
|
end
|
48
99
|
|
49
100
|
class WPCron < InterestingFinding
|
101
|
+
# @return [ String ]
|
102
|
+
def to_s
|
103
|
+
@to_s ||= "The external WP-Cron seems to be enabled: #{url}"
|
104
|
+
end
|
105
|
+
|
106
|
+
# @return [ Hash ]
|
107
|
+
def references
|
108
|
+
@references ||= {
|
109
|
+
url: [
|
110
|
+
'https://www.iplocation.net/defend-wordpress-from-ddos',
|
111
|
+
'https://github.com/wpscanteam/wpscan/issues/1299'
|
112
|
+
]
|
113
|
+
}
|
114
|
+
end
|
50
115
|
end
|
51
116
|
end
|
52
117
|
end
|
data/app/models/xml_rpc.rb
CHANGED
data/lib/wpscan/db/updater.rb
CHANGED
@@ -148,7 +148,7 @@ module WPScan
|
|
148
148
|
create_backup(filename)
|
149
149
|
dl_checksum = download(filename)
|
150
150
|
|
151
|
-
raise
|
151
|
+
raise Error::ChecksumsMismatch, filename unless dl_checksum == db_checksum
|
152
152
|
|
153
153
|
updated << filename
|
154
154
|
rescue StandardError => e
|
data/lib/wpscan/errors/update.rb
CHANGED
@@ -8,5 +8,17 @@ module WPScan
|
|
8
8
|
'Update required, you can not run a scan if a database file is missing.'
|
9
9
|
end
|
10
10
|
end
|
11
|
+
|
12
|
+
class ChecksumsMismatch < Standard
|
13
|
+
attr_reader :db_file
|
14
|
+
|
15
|
+
def initialize(db_file)
|
16
|
+
@db_file = db_file
|
17
|
+
end
|
18
|
+
|
19
|
+
def to_s
|
20
|
+
"#{db_file}: checksums do not match. Please try again in a few minutes."
|
21
|
+
end
|
22
|
+
end
|
11
23
|
end
|
12
24
|
end
|
@@ -48,7 +48,7 @@ module WPScan
|
|
48
48
|
# @param [ Typhoeus::Response ] response
|
49
49
|
# @return [ Boolean ]
|
50
50
|
def wordpress_from_meta_comments_or_scripts?(response)
|
51
|
-
in_scope_uris(response, '//link/@href|//script/@src
|
51
|
+
in_scope_uris(response, '//link/@href|//script/@src') do |uri|
|
52
52
|
return true if WORDPRESS_PATTERN.match?(uri.path) || WP_JSON_OEMBED_PATTERN.match?(uri.path)
|
53
53
|
end
|
54
54
|
|
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.7.
|
4
|
+
version: 3.7.10
|
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-03-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cms_scanner
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.8.
|
19
|
+
version: 0.8.5
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.8.
|
26
|
+
version: 0.8.5
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|