wpscan 3.4.4 → 3.4.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +6 -4
- data/README.md +33 -27
- data/app/controllers/enumeration/cli_options.rb +3 -3
- data/app/controllers/password_attack.rb +4 -0
- data/app/finders/interesting_findings.rb +2 -1
- data/app/finders/interesting_findings/wp_cron.rb +31 -0
- data/app/models/interesting_finding.rb +3 -0
- data/lib/wpscan.rb +1 -1
- data/lib/wpscan/browser.rb +1 -1
- data/lib/wpscan/db/dynamic_finders/base.rb +1 -1
- data/lib/wpscan/db/fingerprints.rb +1 -1
- data/lib/wpscan/db/plugin.rb +1 -1
- data/lib/wpscan/db/theme.rb +1 -1
- data/lib/wpscan/db/updater.rb +9 -7
- data/lib/wpscan/db/wp_version.rb +1 -1
- data/lib/wpscan/errors.rb +1 -0
- data/lib/wpscan/errors/xmlrpc.rb +8 -0
- data/lib/wpscan/version.rb +1 -1
- metadata +8 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7706d292cdec1a8266440da57fcf2efb491b89ab
|
4
|
+
data.tar.gz: 72b9bb343646c020a70dd4da8adf4856f65fee29
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7718c6dc510391992368a474a5ce8b5bf1577e3d1f49738484491d1181489880d4a54f89edacf40ef533ddd9a1cb5757543ec8a777fe7e6c36e40de047b9d4bb
|
7
|
+
data.tar.gz: 5820861b4a255e169c03f3af862b45ab39847320a09a511476051a2cefa99a094ac1e26dffc8d1102b544fd0f50132b4e98838433857c7fb200816a20cd8234f
|
data/LICENSE
CHANGED
@@ -6,9 +6,9 @@ Cases that include commercialization of WPScan require a commercial, non-free li
|
|
6
6
|
|
7
7
|
1. Definitions
|
8
8
|
|
9
|
-
1.1
|
10
|
-
1.2
|
11
|
-
1.3
|
9
|
+
1.1 "License" means this document.
|
10
|
+
1.2 "Contributor" means each individual or legal entity that creates, contributes to the creation of, or owns WPScan.
|
11
|
+
1.3 "WPScan Team" means WPScan’s core developers.
|
12
12
|
|
13
13
|
2. Commercialization
|
14
14
|
|
@@ -29,6 +29,8 @@ Example cases which do not require a commercial license, and thus fall under the
|
|
29
29
|
|
30
30
|
If you need to purchase a commercial license or are unsure whether you need to purchase a commercial license contact us - team@wpscan.org.
|
31
31
|
|
32
|
+
We may grant commercial licenses at no monetary cost at our own discretion if the commercial usage is deemed by the WPScan Team to significantly benefit WPScan.
|
33
|
+
|
32
34
|
Free-use Terms and Conditions;
|
33
35
|
|
34
36
|
3. Redistribution
|
@@ -57,7 +59,7 @@ WPScan is provided under an AS-IS basis and without any support, updates or main
|
|
57
59
|
|
58
60
|
8. Disclaimer of Warranty
|
59
61
|
|
60
|
-
WPScan is provided under this License on an
|
62
|
+
WPScan is provided under this License on an "as is" basis, without warranty of any kind, either expressed, implied, or statutory, including, without limitation, warranties that the WPScan is free of defects, merchantable, fit for a particular purpose or non-infringing.
|
61
63
|
|
62
64
|
9. Limitation of Liability
|
63
65
|
|
data/README.md
CHANGED
@@ -7,7 +7,7 @@
|
|
7
7
|
|
8
8
|
# INSTALL
|
9
9
|
|
10
|
-
## Prerequisites
|
10
|
+
## Prerequisites
|
11
11
|
|
12
12
|
- (Optional but highly recommended: [RVM](https://rvm.io/rvm/install))
|
13
13
|
- Ruby >= 2.3 - Recommended: latest
|
@@ -16,19 +16,19 @@
|
|
16
16
|
- The 7.29 has a segfault
|
17
17
|
- RubyGems - Recommended: latest
|
18
18
|
|
19
|
-
### From RubyGems (Recommended)
|
19
|
+
### From RubyGems (Recommended)
|
20
20
|
|
21
|
-
```
|
21
|
+
```shell
|
22
22
|
gem install wpscan
|
23
23
|
```
|
24
24
|
|
25
25
|
On MacOSX, if a ```Gem::FilePermissionError``` is raised due to the Apple's System Integrity Protection (SIP), either install RVM and install wpscan again, or run ```sudo gem install -n /usr/local/bin wpscan``` (see [#1286](https://github.com/wpscanteam/wpscan/issues/1286))
|
26
26
|
|
27
|
-
### From sources (NOT Recommended)
|
27
|
+
### From sources (NOT Recommended)
|
28
28
|
|
29
29
|
Prerequisites: Git
|
30
30
|
|
31
|
-
```
|
31
|
+
```shell
|
32
32
|
git clone https://github.com/wpscanteam/wpscan
|
33
33
|
|
34
34
|
cd wpscan/
|
@@ -47,14 +47,17 @@ Updating WPScan itself is either done via ```gem update wpscan``` or the package
|
|
47
47
|
Pull the repo with ```docker pull wpscanteam/wpscan```
|
48
48
|
|
49
49
|
Enumerating usernames
|
50
|
-
|
50
|
+
|
51
|
+
```shell
|
51
52
|
docker run -it --rm wpscanteam/wpscan --url https://target.tld/ --enumerate u
|
52
53
|
```
|
53
54
|
|
54
55
|
Enumerating a range of usernames
|
55
|
-
|
56
|
+
|
57
|
+
```shell
|
56
58
|
docker run -it --rm wpscanteam/wpscan --url https://target.tld/ --enumerate u1-100
|
57
59
|
```
|
60
|
+
|
58
61
|
** replace u1-100 with a range of your choice.
|
59
62
|
|
60
63
|
# Usage
|
@@ -68,41 +71,44 @@ The DB is located at ~/.wpscan/db
|
|
68
71
|
|
69
72
|
WPScan can load all options (including the --url) from configuration files, the following locations are checked (order: first to last):
|
70
73
|
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
74
|
+
- ~/.wpscan/cli_options.json
|
75
|
+
- ~/.wpscan/cli_options.yml
|
76
|
+
- pwd/.wpscan/cli_options.json
|
77
|
+
- pwd/.wpscan/cli_options.yml
|
75
78
|
|
76
79
|
If those files exist, options from them will be loaded and overridden if found twice.
|
77
80
|
|
78
81
|
e.g:
|
79
82
|
|
80
83
|
~/.wpscan/cli_options.yml:
|
81
|
-
|
84
|
+
|
85
|
+
```yml
|
82
86
|
proxy: 'http://127.0.0.1:8080'
|
83
87
|
verbose: true
|
84
88
|
```
|
85
89
|
|
86
90
|
pwd/.wpscan/cli_options.yml:
|
87
|
-
|
91
|
+
|
92
|
+
```yml
|
88
93
|
proxy: 'socks5://127.0.0.1:9090'
|
89
94
|
url: 'http://target.tld'
|
90
95
|
```
|
91
96
|
|
92
97
|
Running ```wpscan``` in the current directory (pwd), is the same as ```wpscan -v --proxy socks5://127.0.0.1:9090 --url http://target.tld```
|
93
98
|
|
94
|
-
|
95
99
|
Enumerating usernames
|
96
|
-
|
100
|
+
|
101
|
+
```shell
|
97
102
|
wpscan --url https://target.tld/ --enumerate u
|
98
103
|
```
|
99
104
|
|
100
105
|
Enumerating a range of usernames
|
101
|
-
|
106
|
+
|
107
|
+
```shell
|
102
108
|
wpscan --url https://target.tld/ --enumerate u1-100
|
103
109
|
```
|
104
|
-
** replace u1-100 with a range of your choice.
|
105
110
|
|
111
|
+
** replace u1-100 with a range of your choice.
|
106
112
|
|
107
113
|
# PROJECT HOME
|
108
114
|
|
@@ -134,16 +140,16 @@ A commercial use is one intended for commercial advantage or monetary compensati
|
|
134
140
|
|
135
141
|
Example cases of commercialization are:
|
136
142
|
|
137
|
-
|
138
|
-
|
139
|
-
|
143
|
+
- Using WPScan to provide commercial managed/Software-as-a-Service services.
|
144
|
+
- Distributing WPScan as a commercial product or as part of one.
|
145
|
+
- Using WPScan as a value added service/product.
|
140
146
|
|
141
147
|
Example cases which do not require a commercial license, and thus fall under the terms set out below, include (but are not limited to):
|
142
148
|
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
149
|
+
- Penetration testers (or penetration testing organizations) using WPScan as part of their assessment toolkit.
|
150
|
+
- Penetration Testing Linux Distributions including but not limited to Kali Linux, SamuraiWTF, BackBox Linux.
|
151
|
+
- Using WPScan to test your own systems.
|
152
|
+
- Any non-commercial use of WPScan.
|
147
153
|
|
148
154
|
If you need to purchase a commercial license or are unsure whether you need to purchase a commercial license contact us - team@wpscan.org.
|
149
155
|
|
@@ -153,9 +159,9 @@ Free-use Terms and Conditions;
|
|
153
159
|
|
154
160
|
Redistribution is permitted under the following conditions:
|
155
161
|
|
156
|
-
|
157
|
-
|
158
|
-
|
162
|
+
- Unmodified License is provided with WPScan.
|
163
|
+
- Unmodified Copyright notices are provided with WPScan.
|
164
|
+
- Does not conflict with the commercialization clause.
|
159
165
|
|
160
166
|
### 4. Copying
|
161
167
|
|
@@ -98,7 +98,7 @@ module WPScan
|
|
98
98
|
[
|
99
99
|
OptFilePath.new(
|
100
100
|
['--timthumbs-list FILE-PATH', 'List of timthumbs\' location to use'],
|
101
|
-
exists: true, default:
|
101
|
+
exists: true, default: DB_DIR.join('timthumbs-v3.txt').to_s, advanced: true
|
102
102
|
),
|
103
103
|
OptChoice.new(
|
104
104
|
['--timthumbs-detection MODE',
|
@@ -113,7 +113,7 @@ module WPScan
|
|
113
113
|
[
|
114
114
|
OptFilePath.new(
|
115
115
|
['--config-backups-list FILE-PATH', 'List of config backups\' filenames to use'],
|
116
|
-
exists: true, default:
|
116
|
+
exists: true, default: DB_DIR.join('config_backups.txt').to_s, advanced: true
|
117
117
|
),
|
118
118
|
OptChoice.new(
|
119
119
|
['--config-backups-detection MODE',
|
@@ -128,7 +128,7 @@ module WPScan
|
|
128
128
|
[
|
129
129
|
OptFilePath.new(
|
130
130
|
['--db-exports-list FILE-PATH', 'List of DB exports\' paths to use'],
|
131
|
-
exists: true, default:
|
131
|
+
exists: true, default: DB_DIR.join('db_exports.txt').to_s, advanced: true
|
132
132
|
),
|
133
133
|
OptChoice.new(
|
134
134
|
['--db-exports-detection MODE',
|
@@ -65,8 +65,12 @@ module WPScan
|
|
65
65
|
when :wp_login
|
66
66
|
WPScan::Finders::Passwords::WpLogin.new(target)
|
67
67
|
when :xmlrpc
|
68
|
+
raise XMLRPCNotDetected unless xmlrpc
|
69
|
+
|
68
70
|
WPScan::Finders::Passwords::XMLRPC.new(xmlrpc)
|
69
71
|
when :xmlrpc_multicall
|
72
|
+
raise XMLRPCNotDetected unless xmlrpc
|
73
|
+
|
70
74
|
WPScan::Finders::Passwords::XMLRPCMulticall.new(xmlrpc)
|
71
75
|
end
|
72
76
|
end
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require_relative 'interesting_findings/readme'
|
2
|
+
require_relative 'interesting_findings/wp_cron'
|
2
3
|
require_relative 'interesting_findings/multisite'
|
3
4
|
require_relative 'interesting_findings/debug_log'
|
4
5
|
require_relative 'interesting_findings/backup_db'
|
@@ -23,7 +24,7 @@ module WPScan
|
|
23
24
|
%w[
|
24
25
|
Readme DebugLog FullPathDisclosure BackupDB DuplicatorInstallerLog
|
25
26
|
Multisite MuPlugins Registration UploadDirectoryListing TmmDbMigrate
|
26
|
-
UploadSQLDump EmergencyPwdResetScript
|
27
|
+
UploadSQLDump EmergencyPwdResetScript WPCron
|
27
28
|
].each do |f|
|
28
29
|
finders << InterestingFindings.const_get(f).new(target)
|
29
30
|
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
module WPScan
|
2
|
+
module Finders
|
3
|
+
module InterestingFindings
|
4
|
+
# wp-cron.php finder
|
5
|
+
class WPCron < CMSScanner::Finders::Finder
|
6
|
+
# @return [ InterestingFinding ]
|
7
|
+
def aggressive(_opts = {})
|
8
|
+
res = Browser.get(wp_cron_url)
|
9
|
+
|
10
|
+
return unless res.code == 200
|
11
|
+
|
12
|
+
WPScan::WPCron.new(
|
13
|
+
wp_cron_url,
|
14
|
+
confidence: 60,
|
15
|
+
found_by: DIRECT_ACCESS,
|
16
|
+
references: {
|
17
|
+
url: [
|
18
|
+
'https://www.iplocation.net/defend-wordpress-from-ddos',
|
19
|
+
'https://github.com/wpscanteam/wpscan/issues/1299'
|
20
|
+
]
|
21
|
+
}
|
22
|
+
)
|
23
|
+
end
|
24
|
+
|
25
|
+
def wp_cron_url
|
26
|
+
@wp_cron_url ||= target.url('wp-cron.php')
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
data/lib/wpscan.rb
CHANGED
@@ -33,7 +33,7 @@ module WPScan
|
|
33
33
|
include CMSScanner
|
34
34
|
|
35
35
|
APP_DIR = Pathname.new(__FILE__).dirname.join('..', 'app').expand_path
|
36
|
-
DB_DIR =
|
36
|
+
DB_DIR = Pathname.new(Dir.home).join('.wpscan', 'db')
|
37
37
|
|
38
38
|
# Override, otherwise it would be returned as 'wp_scan'
|
39
39
|
#
|
data/lib/wpscan/browser.rb
CHANGED
data/lib/wpscan/db/plugin.rb
CHANGED
data/lib/wpscan/db/theme.rb
CHANGED
data/lib/wpscan/db/updater.rb
CHANGED
@@ -15,11 +15,11 @@ module WPScan
|
|
15
15
|
attr_reader :repo_directory
|
16
16
|
|
17
17
|
def initialize(repo_directory)
|
18
|
-
@repo_directory = repo_directory
|
18
|
+
@repo_directory = Pathname.new(repo_directory).expand_path
|
19
19
|
|
20
|
-
FileUtils.mkdir_p(repo_directory) unless Dir.exist?(repo_directory)
|
20
|
+
FileUtils.mkdir_p(repo_directory.to_s) unless Dir.exist?(repo_directory.to_s)
|
21
21
|
|
22
|
-
raise "#{repo_directory} is not writable" unless
|
22
|
+
raise "#{repo_directory} is not writable" unless repo_directory.writable?
|
23
23
|
|
24
24
|
delete_old_files
|
25
25
|
end
|
@@ -41,7 +41,7 @@ module WPScan
|
|
41
41
|
|
42
42
|
# @return [ String ]
|
43
43
|
def last_update_file
|
44
|
-
@last_update_file ||=
|
44
|
+
@last_update_file ||= repo_directory.join('.last_update').to_s
|
45
45
|
end
|
46
46
|
|
47
47
|
# @return [ Boolean ]
|
@@ -54,7 +54,7 @@ module WPScan
|
|
54
54
|
# @return [ Boolean ]
|
55
55
|
def missing_files?
|
56
56
|
FILES.each do |file|
|
57
|
-
return true unless File.exist?(
|
57
|
+
return true unless File.exist?(repo_directory.join(file))
|
58
58
|
end
|
59
59
|
false
|
60
60
|
end
|
@@ -85,16 +85,18 @@ module WPScan
|
|
85
85
|
res.body.chomp
|
86
86
|
end
|
87
87
|
|
88
|
+
# @return [ String ]
|
88
89
|
def local_file_path(filename)
|
89
|
-
|
90
|
+
repo_directory.join(filename.to_s).to_s
|
90
91
|
end
|
91
92
|
|
92
93
|
def local_file_checksum(filename)
|
93
94
|
Digest::SHA512.file(local_file_path(filename)).hexdigest
|
94
95
|
end
|
95
96
|
|
97
|
+
# @return [ String ]
|
96
98
|
def backup_file_path(filename)
|
97
|
-
|
99
|
+
repo_directory.join("#{filename}.back").to_s
|
98
100
|
end
|
99
101
|
|
100
102
|
def create_backup(filename)
|
data/lib/wpscan/db/wp_version.rb
CHANGED
data/lib/wpscan/errors.rb
CHANGED
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.4.
|
4
|
+
version: 3.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- WPScanTeam
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-03-10 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.0.41.
|
19
|
+
version: 0.0.41.4
|
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.0.41.
|
26
|
+
version: 0.0.41.4
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -100,14 +100,14 @@ dependencies:
|
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: 0.
|
103
|
+
version: 0.65.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.65.0
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: simplecov
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -175,6 +175,7 @@ files:
|
|
175
175
|
- app/finders/interesting_findings/tmm_db_migrate.rb
|
176
176
|
- app/finders/interesting_findings/upload_directory_listing.rb
|
177
177
|
- app/finders/interesting_findings/upload_sql_dump.rb
|
178
|
+
- app/finders/interesting_findings/wp_cron.rb
|
178
179
|
- app/finders/main_theme.rb
|
179
180
|
- app/finders/main_theme/css_style.rb
|
180
181
|
- app/finders/main_theme/urls_in_homepage.rb
|
@@ -297,6 +298,7 @@ files:
|
|
297
298
|
- lib/wpscan/errors/http.rb
|
298
299
|
- lib/wpscan/errors/update.rb
|
299
300
|
- lib/wpscan/errors/wordpress.rb
|
301
|
+
- lib/wpscan/errors/xmlrpc.rb
|
300
302
|
- lib/wpscan/finders.rb
|
301
303
|
- lib/wpscan/finders/dynamic_finder/finder.rb
|
302
304
|
- lib/wpscan/finders/dynamic_finder/version/body_pattern.rb
|