wpscan 3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (180) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile.lock +139 -0
  3. data/LICENSE +74 -0
  4. data/README.md +146 -0
  5. data/app/app.rb +3 -0
  6. data/app/controllers.rb +6 -0
  7. data/app/controllers/brute_force.rb +126 -0
  8. data/app/controllers/core.rb +104 -0
  9. data/app/controllers/custom_directories.rb +23 -0
  10. data/app/controllers/enumeration.rb +53 -0
  11. data/app/controllers/enumeration/cli_options.rb +126 -0
  12. data/app/controllers/enumeration/enum_methods.rb +157 -0
  13. data/app/controllers/main_theme.rb +27 -0
  14. data/app/controllers/wp_version.rb +30 -0
  15. data/app/finders.rb +13 -0
  16. data/app/finders/config_backups.rb +17 -0
  17. data/app/finders/config_backups/known_filenames.rb +46 -0
  18. data/app/finders/interesting_findings.rb +33 -0
  19. data/app/finders/interesting_findings/backup_db.rb +25 -0
  20. data/app/finders/interesting_findings/debug_log.rb +20 -0
  21. data/app/finders/interesting_findings/duplicator_installer_log.rb +23 -0
  22. data/app/finders/interesting_findings/full_path_disclosure.rb +23 -0
  23. data/app/finders/interesting_findings/mu_plugins.rb +48 -0
  24. data/app/finders/interesting_findings/multisite.rb +29 -0
  25. data/app/finders/interesting_findings/readme.rb +26 -0
  26. data/app/finders/interesting_findings/registration.rb +31 -0
  27. data/app/finders/interesting_findings/tmm_db_migrate.rb +24 -0
  28. data/app/finders/interesting_findings/upload_directory_listing.rb +24 -0
  29. data/app/finders/interesting_findings/upload_sql_dump.rb +28 -0
  30. data/app/finders/main_theme.rb +22 -0
  31. data/app/finders/main_theme/css_style.rb +43 -0
  32. data/app/finders/main_theme/urls_in_homepage.rb +25 -0
  33. data/app/finders/main_theme/woo_framework_meta_generator.rb +22 -0
  34. data/app/finders/medias.rb +17 -0
  35. data/app/finders/medias/attachment_brute_forcing.rb +44 -0
  36. data/app/finders/plugin_version.rb +44 -0
  37. data/app/finders/plugin_version/layer_slider/translation_file.rb +40 -0
  38. data/app/finders/plugin_version/readme.rb +79 -0
  39. data/app/finders/plugin_version/revslider/release_log.rb +35 -0
  40. data/app/finders/plugin_version/sitepress_multilingual_cms/meta_generator.rb +27 -0
  41. data/app/finders/plugin_version/sitepress_multilingual_cms/version_parameter.rb +31 -0
  42. data/app/finders/plugin_version/w3_total_cache/headers.rb +28 -0
  43. data/app/finders/plugins.rb +24 -0
  44. data/app/finders/plugins/comments.rb +31 -0
  45. data/app/finders/plugins/headers.rb +36 -0
  46. data/app/finders/plugins/known_locations.rb +48 -0
  47. data/app/finders/plugins/urls_in_homepage.rb +29 -0
  48. data/app/finders/theme_version.rb +41 -0
  49. data/app/finders/theme_version/style.rb +43 -0
  50. data/app/finders/theme_version/woo_framework_meta_generator.rb +19 -0
  51. data/app/finders/themes.rb +20 -0
  52. data/app/finders/themes/known_locations.rb +48 -0
  53. data/app/finders/themes/urls_in_homepage.rb +23 -0
  54. data/app/finders/timthumb_version.rb +17 -0
  55. data/app/finders/timthumb_version/bad_request.rb +21 -0
  56. data/app/finders/timthumbs.rb +17 -0
  57. data/app/finders/timthumbs/known_locations.rb +56 -0
  58. data/app/finders/users.rb +24 -0
  59. data/app/finders/users/author_id_brute_forcing.rb +111 -0
  60. data/app/finders/users/author_posts.rb +61 -0
  61. data/app/finders/users/login_error_messages.rb +50 -0
  62. data/app/finders/users/wp_json_api.rb +31 -0
  63. data/app/finders/wp_items.rb +1 -0
  64. data/app/finders/wp_items/urls_in_homepage.rb +68 -0
  65. data/app/finders/wp_version.rb +34 -0
  66. data/app/finders/wp_version/atom_generator.rb +40 -0
  67. data/app/finders/wp_version/meta_generator.rb +27 -0
  68. data/app/finders/wp_version/opml_generator.rb +23 -0
  69. data/app/finders/wp_version/rdf_generator.rb +38 -0
  70. data/app/finders/wp_version/readme.rb +28 -0
  71. data/app/finders/wp_version/rss_generator.rb +43 -0
  72. data/app/finders/wp_version/sitemap_generator.rb +23 -0
  73. data/app/finders/wp_version/stylesheets.rb +55 -0
  74. data/app/finders/wp_version/unique_fingerprinting.rb +64 -0
  75. data/app/models.rb +10 -0
  76. data/app/models/config_backup.rb +5 -0
  77. data/app/models/interesting_finding.rb +6 -0
  78. data/app/models/media.rb +5 -0
  79. data/app/models/plugin.rb +25 -0
  80. data/app/models/theme.rb +99 -0
  81. data/app/models/timthumb.rb +74 -0
  82. data/app/models/user.rb +31 -0
  83. data/app/models/wp_item.rb +142 -0
  84. data/app/models/wp_version.rb +49 -0
  85. data/app/models/xml_rpc.rb +19 -0
  86. data/app/views/cli/brute_force/error.erb +1 -0
  87. data/app/views/cli/brute_force/found.erb +2 -0
  88. data/app/views/cli/brute_force/users.erb +9 -0
  89. data/app/views/cli/core/banner.erb +14 -0
  90. data/app/views/cli/core/db_update_finished.erb +8 -0
  91. data/app/views/cli/core/db_update_started.erb +1 -0
  92. data/app/views/cli/core/not_fully_configured.erb +1 -0
  93. data/app/views/cli/enumeration/config_backups.erb +11 -0
  94. data/app/views/cli/enumeration/medias.erb +11 -0
  95. data/app/views/cli/enumeration/plugins.erb +35 -0
  96. data/app/views/cli/enumeration/themes.erb +11 -0
  97. data/app/views/cli/enumeration/timthumbs.erb +18 -0
  98. data/app/views/cli/enumeration/users.erb +11 -0
  99. data/app/views/cli/finding.erb +32 -0
  100. data/app/views/cli/info.erb +1 -0
  101. data/app/views/cli/main_theme/theme.erb +6 -0
  102. data/app/views/cli/notice.erb +1 -0
  103. data/app/views/cli/theme.erb +64 -0
  104. data/app/views/cli/usage.erb +3 -0
  105. data/app/views/cli/vulnerability.erb +14 -0
  106. data/app/views/cli/wp_version/version.erb +6 -0
  107. data/app/views/json/brute_force/users.erb +10 -0
  108. data/app/views/json/core/banner.erb +12 -0
  109. data/app/views/json/core/db_update_finished.erb +2 -0
  110. data/app/views/json/core/db_update_started.erb +1 -0
  111. data/app/views/json/core/not_fully_configured.erb +1 -0
  112. data/app/views/json/enumeration/config_backups.erb +10 -0
  113. data/app/views/json/enumeration/medias.erb +10 -0
  114. data/app/views/json/enumeration/plugins.erb +25 -0
  115. data/app/views/json/enumeration/themes.erb +10 -0
  116. data/app/views/json/enumeration/timthumbs.erb +19 -0
  117. data/app/views/json/enumeration/users.erb +11 -0
  118. data/app/views/json/finding.erb +26 -0
  119. data/app/views/json/main_theme/theme.erb +7 -0
  120. data/app/views/json/theme.erb +38 -0
  121. data/app/views/json/wp_version/version.erb +8 -0
  122. data/bin/wpscan +15 -0
  123. data/coverage/assets/0.10.0/application.css +799 -0
  124. data/coverage/assets/0.10.0/application.js +1707 -0
  125. data/coverage/assets/0.10.0/colorbox/border.png +0 -0
  126. data/coverage/assets/0.10.0/colorbox/controls.png +0 -0
  127. data/coverage/assets/0.10.0/colorbox/loading.gif +0 -0
  128. data/coverage/assets/0.10.0/colorbox/loading_background.png +0 -0
  129. data/coverage/assets/0.10.0/favicon_green.png +0 -0
  130. data/coverage/assets/0.10.0/favicon_red.png +0 -0
  131. data/coverage/assets/0.10.0/favicon_yellow.png +0 -0
  132. data/coverage/assets/0.10.0/loading.gif +0 -0
  133. data/coverage/assets/0.10.0/magnify.png +0 -0
  134. data/coverage/assets/0.10.0/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  135. data/coverage/assets/0.10.0/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  136. data/coverage/assets/0.10.0/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  137. data/coverage/assets/0.10.0/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  138. data/coverage/assets/0.10.0/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  139. data/coverage/assets/0.10.0/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  140. data/coverage/assets/0.10.0/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  141. data/coverage/assets/0.10.0/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  142. data/coverage/assets/0.10.0/smoothness/images/ui-icons_222222_256x240.png +0 -0
  143. data/coverage/assets/0.10.0/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
  144. data/coverage/assets/0.10.0/smoothness/images/ui-icons_454545_256x240.png +0 -0
  145. data/coverage/assets/0.10.0/smoothness/images/ui-icons_888888_256x240.png +0 -0
  146. data/coverage/assets/0.10.0/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
  147. data/coverage/index.html +27510 -0
  148. data/lib/wpscan.rb +44 -0
  149. data/lib/wpscan/browser.rb +16 -0
  150. data/lib/wpscan/controller.rb +8 -0
  151. data/lib/wpscan/controllers.rb +8 -0
  152. data/lib/wpscan/db.rb +28 -0
  153. data/lib/wpscan/db/dynamic_finders.rb +63 -0
  154. data/lib/wpscan/db/plugin.rb +11 -0
  155. data/lib/wpscan/db/plugins.rb +11 -0
  156. data/lib/wpscan/db/schema.rb +39 -0
  157. data/lib/wpscan/db/theme.rb +11 -0
  158. data/lib/wpscan/db/themes.rb +11 -0
  159. data/lib/wpscan/db/updater.rb +148 -0
  160. data/lib/wpscan/db/wp_item.rb +18 -0
  161. data/lib/wpscan/db/wp_items.rb +21 -0
  162. data/lib/wpscan/db/wp_version.rb +11 -0
  163. data/lib/wpscan/errors/http.rb +34 -0
  164. data/lib/wpscan/errors/update.rb +8 -0
  165. data/lib/wpscan/errors/wordpress.rb +22 -0
  166. data/lib/wpscan/finders.rb +14 -0
  167. data/lib/wpscan/finders/finder/plugin_version/comments.rb +25 -0
  168. data/lib/wpscan/finders/finder/wp_version/smart_url_checker.rb +23 -0
  169. data/lib/wpscan/helper.rb +6 -0
  170. data/lib/wpscan/references.rb +31 -0
  171. data/lib/wpscan/target.rb +81 -0
  172. data/lib/wpscan/target/platform/wordpress.rb +74 -0
  173. data/lib/wpscan/target/platform/wordpress/custom_directories.rb +93 -0
  174. data/lib/wpscan/version.rb +4 -0
  175. data/lib/wpscan/vulnerability.rb +25 -0
  176. data/lib/wpscan/vulnerable.rb +10 -0
  177. data/wpscan-v3.sublime-project +8 -0
  178. data/wpscan-v3.sublime-workspace +895 -0
  179. data/wpscan.gemspec +55 -0
  180. metadata +419 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 537ba09b3dc99b6f649528a6a3d65028a8d0e6e4
4
+ data.tar.gz: cf6709c4f5ca16f3818a1ccf40a75d5947273d26
5
+ SHA512:
6
+ metadata.gz: 3b90b3cf872ef7c32a011f4e53a20eb5300613f21b18c66ec34871a736d499dc0fad551201f90de2069244a2a78d971041094cd1be89ae0e6b5168d048f9da26
7
+ data.tar.gz: ef27c3536fe5306dc4d2e987d627b05a9b4bf5bd604408b359fcdebe48b4ba1ac49c4e15d2ae9e45095da7b954983e88cef52b2335bad94bdb94cb2490b090e1
@@ -0,0 +1,139 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ wpscan (3.0)
5
+ activesupport (~> 5.0.1.0)
6
+ cms_scanner (~> 0.0.37.7)
7
+ dm-constraints (~> 1.2.0)
8
+ dm-core (~> 1.2.0)
9
+ dm-migrations (~> 1.2.0)
10
+ dm-sqlite-adapter (~> 1.2.0)
11
+ yajl-ruby (~> 1.3.0)
12
+
13
+ GEM
14
+ remote: https://rubygems.org/
15
+ specs:
16
+ activesupport (5.0.1)
17
+ concurrent-ruby (~> 1.0, >= 1.0.2)
18
+ i18n (~> 0.7)
19
+ minitest (~> 5.1)
20
+ tzinfo (~> 1.1)
21
+ addressable (2.5.0)
22
+ public_suffix (~> 2.0, >= 2.0.2)
23
+ ast (2.3.0)
24
+ cms_scanner (0.0.37.7)
25
+ activesupport (~> 5.0.1)
26
+ addressable (~> 2.5.0)
27
+ nokogiri (~> 1.7.0.1)
28
+ opt_parse_validator (~> 0.0.13.5)
29
+ public_suffix (~> 2.0.3)
30
+ ruby-progressbar (~> 1.8.1)
31
+ typhoeus (~> 1.1.0)
32
+ yajl-ruby (~> 1.3.0)
33
+ concurrent-ruby (1.0.4)
34
+ coveralls (0.8.19)
35
+ json (>= 1.8, < 3)
36
+ simplecov (~> 0.12.0)
37
+ term-ansicolor (~> 1.3)
38
+ thor (~> 0.19.1)
39
+ tins (~> 1.6)
40
+ crack (0.4.3)
41
+ safe_yaml (~> 1.0.0)
42
+ data_objects (0.10.17)
43
+ addressable (~> 2.1)
44
+ diff-lcs (1.3)
45
+ dm-constraints (1.2.0)
46
+ dm-core (~> 1.2.0)
47
+ dm-core (1.2.1)
48
+ addressable (~> 2.3)
49
+ dm-do-adapter (1.2.0)
50
+ data_objects (~> 0.10.6)
51
+ dm-core (~> 1.2.0)
52
+ dm-migrations (1.2.0)
53
+ dm-core (~> 1.2.0)
54
+ dm-sqlite-adapter (1.2.0)
55
+ dm-do-adapter (~> 1.2.0)
56
+ do_sqlite3 (~> 0.10.6)
57
+ do_sqlite3 (0.10.17)
58
+ data_objects (= 0.10.17)
59
+ docile (1.1.5)
60
+ ethon (0.10.1)
61
+ ffi (>= 1.3.0)
62
+ ffi (1.9.17)
63
+ hashdiff (0.3.2)
64
+ i18n (0.7.0)
65
+ json (2.0.3)
66
+ mini_portile2 (2.1.0)
67
+ minitest (5.10.1)
68
+ nokogiri (1.7.0.1)
69
+ mini_portile2 (~> 2.1.0)
70
+ opt_parse_validator (0.0.13.5)
71
+ activesupport (~> 5.0.1)
72
+ addressable (~> 2.5.0)
73
+ parser (2.3.3.1)
74
+ ast (~> 2.2)
75
+ powerpack (0.1.1)
76
+ public_suffix (2.0.5)
77
+ rainbow (2.2.1)
78
+ rake (12.0.0)
79
+ rspec (3.5.0)
80
+ rspec-core (~> 3.5.0)
81
+ rspec-expectations (~> 3.5.0)
82
+ rspec-mocks (~> 3.5.0)
83
+ rspec-core (3.5.4)
84
+ rspec-support (~> 3.5.0)
85
+ rspec-expectations (3.5.0)
86
+ diff-lcs (>= 1.2.0, < 2.0)
87
+ rspec-support (~> 3.5.0)
88
+ rspec-its (1.2.0)
89
+ rspec-core (>= 3.0.0)
90
+ rspec-expectations (>= 3.0.0)
91
+ rspec-mocks (3.5.0)
92
+ diff-lcs (>= 1.2.0, < 2.0)
93
+ rspec-support (~> 3.5.0)
94
+ rspec-support (3.5.0)
95
+ rubocop (0.47.1)
96
+ parser (>= 2.3.3.1, < 3.0)
97
+ powerpack (~> 0.1)
98
+ rainbow (>= 1.99.1, < 3.0)
99
+ ruby-progressbar (~> 1.7)
100
+ unicode-display_width (~> 1.0, >= 1.0.1)
101
+ ruby-progressbar (1.8.1)
102
+ safe_yaml (1.0.4)
103
+ simplecov (0.12.0)
104
+ docile (~> 1.1.0)
105
+ json (>= 1.8, < 3)
106
+ simplecov-html (~> 0.10.0)
107
+ simplecov-html (0.10.0)
108
+ term-ansicolor (1.4.0)
109
+ tins (~> 1.0)
110
+ thor (0.19.4)
111
+ thread_safe (0.3.5)
112
+ tins (1.13.0)
113
+ typhoeus (1.1.2)
114
+ ethon (>= 0.9.0)
115
+ tzinfo (1.2.2)
116
+ thread_safe (~> 0.1)
117
+ unicode-display_width (1.1.3)
118
+ webmock (1.22.6)
119
+ addressable (>= 2.3.6)
120
+ crack (>= 0.3.2)
121
+ hashdiff
122
+ yajl-ruby (1.3.0)
123
+
124
+ PLATFORMS
125
+ ruby
126
+
127
+ DEPENDENCIES
128
+ bundler (~> 1.6)
129
+ coveralls (~> 0.8.0)
130
+ rake (~> 12.0)
131
+ rspec (~> 3.5.0)
132
+ rspec-its (~> 1.2.0)
133
+ rubocop (~> 0.47.1)
134
+ simplecov (~> 0.12.0)
135
+ webmock (~> 1.22.0)
136
+ wpscan!
137
+
138
+ BUNDLED WITH
139
+ 1.14.3
data/LICENSE ADDED
@@ -0,0 +1,74 @@
1
+ WPScan Public Source License
2
+
3
+ The WPScan software (henceforth referred to simply as "WPScan") is dual-licensed - Copyright 2011-2017 WPScan Team.
4
+
5
+ Cases that include commercialization of WPScan require a commercial, non-free license. Otherwise, WPScan can be used without charge under the terms set out below.
6
+
7
+ 1. Definitions
8
+
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, an updated list of whom can be found within the CREDITS file.
12
+
13
+ 2. Commercialization
14
+
15
+ A commercial use is one intended for commercial advantage or monetary compensation.
16
+
17
+ Example cases of commercialization are:
18
+
19
+ - Using WPScan to provide commercial managed/Software-as-a-Service services.
20
+ - Distributing WPScan as a commercial product or as part of one.
21
+ - Using WPScan as a value added service/product.
22
+
23
+ Example cases which do not require a commercial license, and thus fall under the terms set out below, include (but are not limited to):
24
+
25
+ - Penetration testers (or penetration testing organizations) using WPScan as part of their assessment toolkit.
26
+ - Penetration Testing Linux Distributions including but not limited to Kali Linux, SamuraiWTF, BackBox Linux.
27
+ - Using WPScan to test your own systems.
28
+ - Any non-commercial use of WPScan.
29
+
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
+
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
+
34
+ Free-use Terms and Conditions;
35
+
36
+ 3. Redistribution
37
+
38
+ Redistribution is permitted under the following conditions:
39
+
40
+ - Unmodified License is provided with WPScan.
41
+ - Unmodified Copyright notices are provided with WPScan.
42
+ - Does not conflict with the commercialization clause.
43
+
44
+ 4. Copying
45
+
46
+ Copying is permitted so long as it does not conflict with the Redistribution clause.
47
+
48
+ 5. Modification
49
+
50
+ Modification is permitted so long as it does not conflict with the Redistribution clause.
51
+
52
+ 6. Contributions
53
+
54
+ Any Contributions assume the Contributor grants the WPScan Team the unlimited, non-exclusive right to reuse, modify and relicense the Contributor's content.
55
+
56
+ 7. Support
57
+
58
+ WPScan is provided under an AS-IS basis and without any support, updates or maintenance. Support, updates and maintenance may be given according to the sole discretion of the WPScan Team.
59
+
60
+ 8. Disclaimer of Warranty
61
+
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.
63
+
64
+ 9. Limitation of Liability
65
+
66
+ To the extent permitted under Law, WPScan is provided under an AS-IS basis. The WPScan Team shall never, and without any limit, be liable for any damage, cost, expense or any other payment incurred as a result of WPScan's actions, failure, bugs and/or any other interaction between WPScan and end-equipment, computers, other software or any 3rd party, end-equipment, computer or services.
67
+
68
+ 10. Disclaimer
69
+
70
+ Running WPScan against websites without prior mutual consent may be illegal in your country. The WPScan Team accept no liability and are not responsible for any misuse or damage caused by WPScan.
71
+
72
+ 11. Trademark
73
+
74
+ The "wpscan" term is a registered trademark. This License does not grant the use of the "wpscan" trademark or the use of the WPScan logo.
@@ -0,0 +1,146 @@
1
+ ![alt text](https://raw.githubusercontent.com/wpscanteam/wpscan/gh-pages/wpscan_logo_407x80.png "WPScan - WordPress Security Scanner") v3 BETA
2
+
3
+ # LICENSE
4
+
5
+ ## WPScan Public Source License
6
+
7
+ The WPScan software (henceforth referred to simply as "WPScan") is dual-licensed - Copyright 2011-2017 WPScan Team.
8
+
9
+ Cases that include commercialization of WPScan require a commercial, non-free license. Otherwise, WPScan can be used without charge under the terms set out below.
10
+
11
+ ### 1. Definitions
12
+
13
+ 1.1 "License" means this document.
14
+
15
+ 1.2 "Contributor" means each individual or legal entity that creates, contributes to the creation of, or owns WPScan.
16
+
17
+ 1.3 "WPScan Team" means WPScan’s core developers, an updated list of whom can be found within the CREDITS file.
18
+
19
+ ### 2. Commercialization
20
+
21
+ A commercial use is one intended for commercial advantage or monetary compensation.
22
+
23
+ Example cases of commercialization are:
24
+
25
+ - Using WPScan to provide commercial managed/Software-as-a-Service services.
26
+ - Distributing WPScan as a commercial product or as part of one.
27
+ - Using WPScan as a value added service/product.
28
+
29
+ Example cases which do not require a commercial license, and thus fall under the terms set out below, include (but are not limited to):
30
+
31
+ - Penetration testers (or penetration testing organizations) using WPScan as part of their assessment toolkit.
32
+ - Penetration Testing Linux Distributions including but not limited to Kali Linux, SamuraiWTF, BackBox Linux.
33
+ - Using WPScan to test your own systems.
34
+ - Any non-commercial use of WPScan.
35
+
36
+ If you need to purchase a commercial license or are unsure whether you need to purchase a commercial license contact us - team@wpscan.org.
37
+
38
+ 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.
39
+
40
+ Free-use Terms and Conditions;
41
+
42
+ ### 3. Redistribution
43
+
44
+ Redistribution is permitted under the following conditions:
45
+
46
+ - Unmodified License is provided with WPScan.
47
+ - Unmodified Copyright notices are provided with WPScan.
48
+ - Does not conflict with the commercialization clause.
49
+
50
+ ### 4. Copying
51
+
52
+ Copying is permitted so long as it does not conflict with the Redistribution clause.
53
+
54
+ ### 5. Modification
55
+
56
+ Modification is permitted so long as it does not conflict with the Redistribution clause.
57
+
58
+ ### 6. Contributions
59
+
60
+ Any Contributions assume the Contributor grants the WPScan Team the unlimited, non-exclusive right to reuse, modify and relicense the Contributor's content.
61
+
62
+ ### 7. Support
63
+
64
+ WPScan is provided under an AS-IS basis and without any support, updates or maintenance. Support, updates and maintenance may be given according to the sole discretion of the WPScan Team.
65
+
66
+ ### 8. Disclaimer of Warranty
67
+
68
+ 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.
69
+
70
+ ### 9. Limitation of Liability
71
+
72
+ To the extent permitted under Law, WPScan is provided under an AS-IS basis. The WPScan Team shall never, and without any limit, be liable for any damage, cost, expense or any other payment incurred as a result of WPScan's actions, failure, bugs and/or any other interaction between WPScan and end-equipment, computers, other software or any 3rd party, end-equipment, computer or services.
73
+
74
+ ### 10. Disclaimer
75
+
76
+ Running WPScan against websites without prior mutual consent may be illegal in your country. The WPScan Team accept no liability and are not responsible for any misuse or damage caused by WPScan.
77
+
78
+ ### 11. Trademark
79
+
80
+ The "wpscan" term is a registered trademark. This License does not grant the use of the "wpscan" trademark or the use of the WPScan logo.
81
+
82
+ # INSTALL
83
+
84
+ ## Prerequisites:
85
+
86
+ - Ruby >= 2.2.2 - Recommended: 2.3.3
87
+ - Curl >= 7.21 - Recommended: latest - FYI the 7.29 has a segfault
88
+ - RubyGems - Recommended: latest
89
+
90
+
91
+ ### From RubyGems:
92
+
93
+ ```gem install wpscan```
94
+
95
+ ### From sources:
96
+
97
+ Prerequisites: Git
98
+
99
+ ```git clone https://bitbucket.org/wpscan/wpscan-v3```
100
+
101
+ ```cd wpscan```
102
+
103
+ ```bundle install && rake install```
104
+
105
+ # Docker
106
+
107
+ Pull the repo with ```docker pull wpscanteam/wpscan-v3```
108
+
109
+ # Usage
110
+
111
+ Open a terminal and type ```wpscan --help``` (if you built wpscan from the source, you should type the command outside of the git repo)
112
+
113
+ The DB is located at ~/.wpscan/db
114
+
115
+ WPScan can load all options (including the --url) from configuration files, the following locations are checked (order: first to last):
116
+
117
+ * ~/.wpscan/cli_options.json
118
+ * ~/.wpscan/cli_options.yml
119
+ * pwd/.wpscan/cli_options.json
120
+ * pwd/.wpscan/cli_options.yml
121
+
122
+ If those files exist, options from them will be loaded and overridden if found twice.
123
+
124
+ e.g:
125
+
126
+ ~/.wpscan/cli_options.yml:
127
+ ```
128
+ proxy: 'http://127.0.0.1:8080'
129
+ verbose: true
130
+ ```
131
+
132
+ pwd/.wpscan/cli_options.yml:
133
+ ```
134
+ proxy: 'socks5://127.0.0.1:9090'
135
+ url: 'http://target.tld'
136
+ ```
137
+
138
+ Running ```wpscan``` in the current directory (pwd), is the same as ```wpscan -v --proxy socks5://127.0.0.1:9090 --url http://target.tld```
139
+
140
+ # PROJECT HOME
141
+
142
+ [https://wpscan.org](https://wpscan.org)
143
+
144
+ # VULNERABILITY DATABASE
145
+
146
+ [https://wpvulndb.com](https://wpvulndb.com)
@@ -0,0 +1,3 @@
1
+ require_relative 'models'
2
+ require_relative 'finders'
3
+ require_relative 'controllers'
@@ -0,0 +1,6 @@
1
+ require_relative 'controllers/core'
2
+ require_relative 'controllers/custom_directories'
3
+ require_relative 'controllers/wp_version'
4
+ require_relative 'controllers/main_theme'
5
+ require_relative 'controllers/enumeration'
6
+ require_relative 'controllers/brute_force'
@@ -0,0 +1,126 @@
1
+ module WPScan
2
+ module Controller
3
+ # Brute Force Controller
4
+ class BruteForce < CMSScanner::Controller::Base
5
+ def cli_options
6
+ [
7
+ OptFilePath.new(
8
+ ['--passwords FILE-PATH', '-P',
9
+ 'List of passwords to use during the brute forcing.',
10
+ 'If no --username/s option supplied, user enumeration will be run'],
11
+ exists: true
12
+ ),
13
+ OptString.new(['--username USERNAME', '-u', 'The username to brute force']),
14
+ OptFilePath.new(
15
+ ['--usernames FILE-PATH', '-U', 'List of usernames to use during the brute forcing'],
16
+ exists: true
17
+ )
18
+ ]
19
+ end
20
+
21
+ def run
22
+ return unless parsed_options[:passwords]
23
+
24
+ begin
25
+ found = []
26
+
27
+ brute_force(users, passwords(parsed_options[:passwords])) do |user|
28
+ found << user
29
+
30
+ output('found', user: user) if user_interaction?
31
+ end
32
+ ensure
33
+ output('users', users: found)
34
+ end
35
+ end
36
+
37
+ # @return [ Array<Users> ] The users to brute force
38
+ def users
39
+ return target.users unless parsed_options[:usernames] || parsed_options[:username]
40
+
41
+ if parsed_options[:username]
42
+ [User.new(parsed_options[:username])]
43
+ else
44
+ File.open(parsed_options[:usernames]).reduce([]) do |acc, elem|
45
+ acc << User.new(elem.chomp)
46
+ end
47
+ end
48
+ end
49
+
50
+ # the iteration should be on the passwords to be more efficient
51
+ # however, it's not that simple expecially when a combination is found:
52
+ # - the estimated number of requests (for the progressbar) has to be updated.
53
+ # - the user found has to be deleted from the loop
54
+ #
55
+ # @param [ Array<User> ] users
56
+ # @param [ Array<String> ] passwords
57
+ #
58
+ # @yield [ User ] when a valid combination is found
59
+ # rubocop:disable all
60
+ def brute_force(users, passwords)
61
+ hydra = Browser.instance.hydra
62
+
63
+ users.each do |user|
64
+ bar = progress_bar(passwords.size, user.username) if user_interaction?
65
+
66
+ passwords.each do |password|
67
+ request = target.login_request(user.username, password)
68
+
69
+ request.on_complete do |res|
70
+ bar.progress += 1 if user_interaction?
71
+
72
+ if res.code == 302
73
+ user.password = password
74
+ hydra.abort
75
+
76
+ yield user
77
+ next
78
+ elsif user_interaction? && res.code != 200
79
+ # Errors not displayed when using formats other than cli/cli-no-colour
80
+ output_error(res)
81
+ end
82
+ end
83
+
84
+ hydra.queue(request)
85
+ end
86
+ hydra.run
87
+ end
88
+ end
89
+ # rubocop:enable all
90
+
91
+ def progress_bar(size, username)
92
+ ProgressBar.create(
93
+ format: '%t %a <%B> (%c / %C) %P%% %e',
94
+ title: "Brute Forcing #{username}",
95
+ total: size
96
+ )
97
+ end
98
+
99
+ # @param [ String ] wordlist_path
100
+ #
101
+ # @return [ Array<String> ]
102
+ def passwords(wordlist_path)
103
+ @passwords ||= File.open(wordlist_path).reduce([]) do |acc, elem|
104
+ acc << elem.chomp
105
+ end
106
+ end
107
+
108
+ # @param [ Typhoeus::Response ] response
109
+ def output_error(response)
110
+ return if response.body =~ /login_error/i
111
+
112
+ error = if response.timed_out?
113
+ 'Request timed out.'
114
+ elsif response.code.zero?
115
+ "No response from remote server. WAF/IPS? (#{response.return_message})"
116
+ elsif response.code.to_s =~ /^50/
117
+ 'Server error, try reducing the number of threads.'
118
+ else
119
+ "Unknown response received Code: #{response.code}\n Body: #{response.body}"
120
+ end
121
+
122
+ output('error', msg: error)
123
+ end
124
+ end
125
+ end
126
+ end