wpscan 3.4.5 → 3.5.0

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.
Files changed (140) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +21 -14
  3. data/app/app.rb +2 -0
  4. data/app/controllers.rb +2 -0
  5. data/app/controllers/aliases.rb +2 -0
  6. data/app/controllers/core.rb +6 -4
  7. data/app/controllers/custom_directories.rb +3 -1
  8. data/app/controllers/enumeration.rb +6 -0
  9. data/app/controllers/enumeration/cli_options.rb +2 -0
  10. data/app/controllers/enumeration/enum_methods.rb +2 -0
  11. data/app/controllers/main_theme.rb +2 -0
  12. data/app/controllers/password_attack.rb +6 -4
  13. data/app/controllers/wp_version.rb +2 -0
  14. data/app/finders.rb +2 -0
  15. data/app/finders/config_backups.rb +2 -0
  16. data/app/finders/config_backups/known_filenames.rb +4 -3
  17. data/app/finders/db_exports.rb +2 -0
  18. data/app/finders/db_exports/known_locations.rb +15 -3
  19. data/app/finders/interesting_findings.rb +2 -0
  20. data/app/finders/interesting_findings/backup_db.rb +5 -4
  21. data/app/finders/interesting_findings/debug_log.rb +3 -1
  22. data/app/finders/interesting_findings/duplicator_installer_log.rb +6 -5
  23. data/app/finders/interesting_findings/emergency_pwd_reset_script.rb +6 -4
  24. data/app/finders/interesting_findings/full_path_disclosure.rb +3 -1
  25. data/app/finders/interesting_findings/mu_plugins.rb +4 -2
  26. data/app/finders/interesting_findings/multisite.rb +3 -1
  27. data/app/finders/interesting_findings/readme.rb +8 -6
  28. data/app/finders/interesting_findings/registration.rb +3 -1
  29. data/app/finders/interesting_findings/tmm_db_migrate.rb +4 -2
  30. data/app/finders/interesting_findings/upload_directory_listing.rb +3 -1
  31. data/app/finders/interesting_findings/upload_sql_dump.rb +8 -10
  32. data/app/finders/interesting_findings/wp_cron.rb +3 -1
  33. data/app/finders/main_theme.rb +2 -0
  34. data/app/finders/main_theme/css_style.rb +3 -1
  35. data/app/finders/main_theme/urls_in_homepage.rb +3 -1
  36. data/app/finders/main_theme/woo_framework_meta_generator.rb +3 -1
  37. data/app/finders/medias.rb +2 -0
  38. data/app/finders/medias/attachment_brute_forcing.rb +3 -1
  39. data/app/finders/passwords.rb +2 -0
  40. data/app/finders/passwords/wp_login.rb +4 -1
  41. data/app/finders/passwords/xml_rpc.rb +2 -0
  42. data/app/finders/passwords/xml_rpc_multicall.rb +4 -2
  43. data/app/finders/plugin_version.rb +4 -2
  44. data/app/finders/plugin_version/readme.rb +9 -5
  45. data/app/finders/plugins.rb +2 -0
  46. data/app/finders/plugins/body_pattern.rb +3 -1
  47. data/app/finders/plugins/comment.rb +3 -1
  48. data/app/finders/plugins/config_parser.rb +3 -1
  49. data/app/finders/plugins/header_pattern.rb +3 -1
  50. data/app/finders/plugins/javascript_var.rb +3 -1
  51. data/app/finders/plugins/known_locations.rb +10 -8
  52. data/app/finders/plugins/query_parameter.rb +2 -0
  53. data/app/finders/plugins/urls_in_homepage.rb +3 -1
  54. data/app/finders/plugins/xpath.rb +3 -1
  55. data/app/finders/theme_version.rb +4 -2
  56. data/app/finders/theme_version/style.rb +3 -1
  57. data/app/finders/theme_version/woo_framework_meta_generator.rb +3 -1
  58. data/app/finders/themes.rb +2 -0
  59. data/app/finders/themes/known_locations.rb +12 -10
  60. data/app/finders/themes/urls_in_homepage.rb +3 -1
  61. data/app/finders/timthumb_version.rb +3 -1
  62. data/app/finders/timthumb_version/bad_request.rb +3 -1
  63. data/app/finders/timthumbs.rb +2 -0
  64. data/app/finders/timthumbs/known_locations.rb +12 -3
  65. data/app/finders/users.rb +2 -0
  66. data/app/finders/users/author_id_brute_forcing.rb +3 -1
  67. data/app/finders/users/author_posts.rb +3 -1
  68. data/app/finders/users/login_error_messages.rb +3 -1
  69. data/app/finders/users/oembed_api.rb +6 -4
  70. data/app/finders/users/rss_generator.rb +7 -5
  71. data/app/finders/users/wp_json_api.rb +16 -6
  72. data/app/finders/users/yoast_seo_author_sitemap.rb +6 -4
  73. data/app/finders/wp_items.rb +2 -0
  74. data/app/finders/wp_items/urls_in_homepage.rb +2 -0
  75. data/app/finders/wp_version.rb +2 -0
  76. data/app/finders/wp_version/atom_generator.rb +2 -0
  77. data/app/finders/wp_version/rdf_generator.rb +2 -0
  78. data/app/finders/wp_version/readme.rb +4 -2
  79. data/app/finders/wp_version/rss_generator.rb +2 -0
  80. data/app/finders/wp_version/unique_fingerprinting.rb +3 -1
  81. data/app/models.rb +8 -0
  82. data/app/models/config_backup.rb +6 -2
  83. data/app/models/db_export.rb +6 -2
  84. data/app/models/interesting_finding.rb +36 -32
  85. data/app/models/media.rb +6 -2
  86. data/app/models/plugin.rb +25 -17
  87. data/app/models/theme.rb +83 -75
  88. data/app/models/timthumb.rb +58 -54
  89. data/app/models/wp_item.rb +140 -128
  90. data/app/models/wp_version.rb +47 -44
  91. data/app/models/xml_rpc.rb +18 -14
  92. data/app/views/cli/wp_item.erb +0 -3
  93. data/app/views/json/wp_item.erb +0 -1
  94. data/bin/wpscan +1 -0
  95. data/lib/wpscan.rb +2 -0
  96. data/lib/wpscan/browser.rb +2 -0
  97. data/lib/wpscan/controller.rb +2 -0
  98. data/lib/wpscan/controllers.rb +2 -0
  99. data/lib/wpscan/db.rb +2 -0
  100. data/lib/wpscan/db/dynamic_finders/base.rb +2 -0
  101. data/lib/wpscan/db/dynamic_finders/plugin.rb +4 -5
  102. data/lib/wpscan/db/dynamic_finders/theme.rb +2 -0
  103. data/lib/wpscan/db/dynamic_finders/wordpress.rb +2 -0
  104. data/lib/wpscan/db/fingerprints.rb +2 -0
  105. data/lib/wpscan/db/plugin.rb +2 -0
  106. data/lib/wpscan/db/plugins.rb +2 -0
  107. data/lib/wpscan/db/theme.rb +2 -0
  108. data/lib/wpscan/db/themes.rb +2 -0
  109. data/lib/wpscan/db/updater.rb +4 -2
  110. data/lib/wpscan/db/wp_item.rb +2 -0
  111. data/lib/wpscan/db/wp_items.rb +2 -0
  112. data/lib/wpscan/db/wp_version.rb +2 -0
  113. data/lib/wpscan/errors.rb +7 -1
  114. data/lib/wpscan/errors/http.rb +27 -23
  115. data/lib/wpscan/errors/update.rb +8 -4
  116. data/lib/wpscan/errors/wordpress.rb +24 -14
  117. data/lib/wpscan/errors/xmlrpc.rb +8 -4
  118. data/lib/wpscan/finders.rb +2 -0
  119. data/lib/wpscan/finders/dynamic_finder/finder.rb +2 -0
  120. data/lib/wpscan/finders/dynamic_finder/version/body_pattern.rb +2 -0
  121. data/lib/wpscan/finders/dynamic_finder/version/comment.rb +2 -0
  122. data/lib/wpscan/finders/dynamic_finder/version/config_parser.rb +2 -0
  123. data/lib/wpscan/finders/dynamic_finder/version/finder.rb +4 -2
  124. data/lib/wpscan/finders/dynamic_finder/version/header_pattern.rb +2 -0
  125. data/lib/wpscan/finders/dynamic_finder/version/javascript_var.rb +2 -0
  126. data/lib/wpscan/finders/dynamic_finder/version/query_parameter.rb +2 -0
  127. data/lib/wpscan/finders/dynamic_finder/version/xpath.rb +2 -0
  128. data/lib/wpscan/finders/dynamic_finder/wp_item_version.rb +2 -0
  129. data/lib/wpscan/finders/dynamic_finder/wp_items/finder.rb +4 -2
  130. data/lib/wpscan/finders/dynamic_finder/wp_version.rb +4 -2
  131. data/lib/wpscan/finders/finder/wp_version/smart_url_checker.rb +4 -2
  132. data/lib/wpscan/helper.rb +2 -0
  133. data/lib/wpscan/references.rb +2 -0
  134. data/lib/wpscan/target.rb +12 -1
  135. data/lib/wpscan/target/platform/wordpress.rb +15 -1
  136. data/lib/wpscan/target/platform/wordpress/custom_directories.rb +23 -3
  137. data/lib/wpscan/version.rb +3 -1
  138. data/lib/wpscan/vulnerability.rb +2 -0
  139. data/lib/wpscan/vulnerable.rb +2 -0
  140. metadata +35 -8
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 7706d292cdec1a8266440da57fcf2efb491b89ab
4
- data.tar.gz: 72b9bb343646c020a70dd4da8adf4856f65fee29
2
+ SHA256:
3
+ metadata.gz: f64d1fca83669eeb095fb99cbcbbc2a57a8967ef680bda9d754074b771bfc8dd
4
+ data.tar.gz: f6835052a919b6dcbefade7ec3e47e0719bdad7192e91061b742082031378886
5
5
  SHA512:
6
- metadata.gz: 7718c6dc510391992368a474a5ce8b5bf1577e3d1f49738484491d1181489880d4a54f89edacf40ef533ddd9a1cb5757543ec8a777fe7e6c36e40de047b9d4bb
7
- data.tar.gz: 5820861b4a255e169c03f3af862b45ab39847320a09a511476051a2cefa99a094ac1e26dffc8d1102b544fd0f50132b4e98838433857c7fb200816a20cd8234f
6
+ metadata.gz: 148e26a2d52135e120e47cc557c7fe79a1f96c42ad3f15f6ac92eb020900fcea1dc94056c2cf8a0731fe4d60541a79e1d1353e5fd597464b92ae3dad8f18cbad
7
+ data.tar.gz: fcb7e45a14d14728824761e075d55a76174972be46311957cb724c85b29a05b460a80fa21012c832585fc3351ab4a34a8932c777b34fc3c7c12a5dc708ead417
data/README.md CHANGED
@@ -1,9 +1,24 @@
1
- ![alt text](https://raw.githubusercontent.com/wpscanteam/wpscan/gh-pages/images/wpscan_logo.png "WPScan - WordPress Security Scanner")
2
-
3
- [![Gem Version](https://badge.fury.io/rb/wpscan.svg)](https://badge.fury.io/rb/wpscan)
4
- [![Build Status](https://travis-ci.org/wpscanteam/wpscan.svg?branch=master)](https://travis-ci.org/wpscanteam/wpscan)
5
- [![Code Climate](https://codeclimate.com/github/wpscanteam/wpscan/badges/gpa.svg)](https://codeclimate.com/github/wpscanteam/wpscan)
6
- [![Patreon Donate](https://img.shields.io/badge/patreon-donate-green.svg)](https://www.patreon.com/wpscan)
1
+ <p align="center">
2
+ <a href="https://wpscan.org/">
3
+ <img src="https://raw.githubusercontent.com/wpscanteam/wpscan/gh-pages/images/wpscan_logo.png" alt="WPScan logo">
4
+ </a>
5
+ </p>
6
+
7
+ <h3 align="center">WPScan</h3>
8
+
9
+ <p align="center">
10
+ WordPress Vulnerability Scanner
11
+ <br>
12
+ <br>
13
+ <a href="https://wpscan.org/" title="homepage" target="_blank">Homepage</a> - <a href="https://wpscan.io/" title="wpscan.io" target="_blank">WPScan.io</a> - <a href="https://wpvulndb.com/" title="vulnerability database" target="_blank">Vulnerability Database</a> - <a href="https://wordpress.org/plugins/wpscan/" title="wordpress plugin" target="_blank">WordPress Plugin</a>
14
+ </p>
15
+
16
+ <p align="center">
17
+ <a href="https://badge.fury.io/rb/wpscan" target="_blank"><img src="https://badge.fury.io/rb/wpscan.svg"></a>
18
+ <a href="https://travis-ci.org/wpscanteam/wpscan" target="_blank"><img src="https://travis-ci.org/wpscanteam/wpscan.svg?branch=master"></a>
19
+ <a href="https://codeclimate.com/github/wpscanteam/wpscan" target="_blank"><img src="https://codeclimate.com/github/wpscanteam/wpscan/badges/gpa.svg"></a>
20
+ <a href="https://www.patreon.com/wpscan" target="_blank"><img src="https://img.shields.io/badge/patreon-donate-green.svg"></a>
21
+ </p>
7
22
 
8
23
  # INSTALL
9
24
 
@@ -110,14 +125,6 @@ wpscan --url https://target.tld/ --enumerate u1-100
110
125
 
111
126
  ** replace u1-100 with a range of your choice.
112
127
 
113
- # PROJECT HOME
114
-
115
- [https://wpscan.org](https://wpscan.org)
116
-
117
- # VULNERABILITY DATABASE
118
-
119
- [https://wpvulndb.com](https://wpvulndb.com)
120
-
121
128
  # LICENSE
122
129
 
123
130
  ## WPScan Public Source License
data/app/app.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative 'models'
2
4
  require_relative 'finders'
3
5
  require_relative 'controllers'
data/app/controllers.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative 'controllers/core'
2
4
  require_relative 'controllers/custom_directories'
3
5
  require_relative 'controllers/wp_version'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module WPScan
2
4
  module Controller
3
5
  # Controller to add the aliases in the CLI
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module WPScan
2
4
  module Controller
3
5
  # Specific Core controller to include WordPress checks
@@ -25,7 +27,7 @@ module WPScan
25
27
  # @return [ Boolean ]
26
28
  def update_db_required?
27
29
  if local_db.missing_files?
28
- raise MissingDatabaseFile if parsed_options[:update] == false
30
+ raise Error::MissingDatabaseFile if parsed_options[:update] == false
29
31
 
30
32
  return true
31
33
  end
@@ -62,7 +64,7 @@ module WPScan
62
64
  # Raises errors if the target is hosted on wordpress.com or is not running WordPress
63
65
  # Also check if the homepage_url is still the install url
64
66
  def check_wordpress_state
65
- raise WordPressHostedError if target.wordpress_hosted?
67
+ raise Error::WordPressHosted if target.wordpress_hosted?
66
68
 
67
69
  if Addressable::URI.parse(target.homepage_url).path =~ %r{/wp-admin/install.php$}i
68
70
 
@@ -71,7 +73,7 @@ module WPScan
71
73
  exit(WPScan::ExitCode::VULNERABLE)
72
74
  end
73
75
 
74
- raise NotWordPressError unless target.wordpress?(parsed_options[:detection_mode]) || parsed_options[:force]
76
+ raise Error::NotWordPress unless target.wordpress?(parsed_options[:detection_mode]) || parsed_options[:force]
75
77
  end
76
78
 
77
79
  # Loads the related server module in the target
@@ -95,7 +97,7 @@ module WPScan
95
97
  mod = CMSScanner::Target::Server.const_get(server)
96
98
 
97
99
  target.extend mod
98
- WPScan::WpItem.include mod
100
+ Model::WpItem.include mod
99
101
 
100
102
  server
101
103
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module WPScan
2
4
  module Controller
3
5
  # Controller to ensure that the wp-content and wp-plugins
@@ -16,7 +18,7 @@ module WPScan
16
18
 
17
19
  return if target.content_dir
18
20
 
19
- raise 'Unable to identify the wp-content dir, please supply it with --wp-content-dir'
21
+ raise Error::WpContentDirNotDetected
20
22
  end
21
23
  end
22
24
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative 'enumeration/cli_options'
2
4
  require_relative 'enumeration/enum_methods'
3
5
 
@@ -8,6 +10,10 @@ module WPScan
8
10
  def before_scan
9
11
  DB::DynamicFinders::Plugin.create_versions_finders
10
12
  DB::DynamicFinders::Theme.create_versions_finders
13
+
14
+ # Force the Garbage Collector to run due to the above method being
15
+ # quite heavy in objects allocation
16
+ GC.start
11
17
  end
12
18
 
13
19
  def run
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module WPScan
2
4
  module Controller
3
5
  # Enumeration CLI Options
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module WPScan
2
4
  module Controller
3
5
  # Enumeration Methods
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module WPScan
2
4
  module Controller
3
5
  # Main Theme Controller
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module WPScan
2
4
  module Controller
3
5
  # Password Attack Controller
@@ -52,7 +54,7 @@ module WPScan
52
54
  @attacker ||= attacker_from_cli_options || attacker_from_automatic_detection
53
55
  end
54
56
 
55
- # @return [ WPScan::XMLRPC ]
57
+ # @return [ Model::XMLRPC ]
56
58
  def xmlrpc
57
59
  @xmlrpc ||= target.xmlrpc
58
60
  end
@@ -65,11 +67,11 @@ module WPScan
65
67
  when :wp_login
66
68
  WPScan::Finders::Passwords::WpLogin.new(target)
67
69
  when :xmlrpc
68
- raise XMLRPCNotDetected unless xmlrpc
70
+ raise Error::XMLRPCNotDetected unless xmlrpc
69
71
 
70
72
  WPScan::Finders::Passwords::XMLRPC.new(xmlrpc)
71
73
  when :xmlrpc_multicall
72
- raise XMLRPCNotDetected unless xmlrpc
74
+ raise Error::XMLRPCNotDetected unless xmlrpc
73
75
 
74
76
  WPScan::Finders::Passwords::XMLRPCMulticall.new(xmlrpc)
75
77
  end
@@ -95,7 +97,7 @@ module WPScan
95
97
  return target.users unless parsed_options[:usernames]
96
98
 
97
99
  parsed_options[:usernames].reduce([]) do |acc, elem|
98
- acc << CMSScanner::User.new(elem.chomp)
100
+ acc << Model::User.new(elem.chomp)
99
101
  end
100
102
  end
101
103
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module WPScan
2
4
  module Controller
3
5
  # Wp Version Controller
data/app/finders.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative 'finders/interesting_findings'
2
4
  require_relative 'finders/wp_items'
3
5
  require_relative 'finders/wp_version'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative 'config_backups/known_filenames'
2
4
 
3
5
  module WPScan
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module WPScan
2
4
  module Finders
3
5
  module ConfigBackups
@@ -13,11 +15,10 @@ module WPScan
13
15
  def aggressive(opts = {})
14
16
  found = []
15
17
 
16
- enumerate(potential_urls(opts), opts) do |res|
17
- # Might need to improve that
18
+ enumerate(potential_urls(opts), opts.merge(check_full_response: 200)) do |res|
18
19
  next unless res.body =~ /define/i && res.body !~ /<\s?html/i
19
20
 
20
- found << WPScan::ConfigBackup.new(res.request.url, found_by: DIRECT_ACCESS, confidence: 100)
21
+ found << Model::ConfigBackup.new(res.request.url, found_by: DIRECT_ACCESS, confidence: 100)
21
22
  end
22
23
 
23
24
  found
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative 'db_exports/known_locations'
2
4
 
3
5
  module WPScan
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module WPScan
2
4
  module Finders
3
5
  module DbExports
@@ -6,6 +8,8 @@ module WPScan
6
8
  class KnownLocations < CMSScanner::Finders::Finder
7
9
  include CMSScanner::Finders::Finder::Enumerator
8
10
 
11
+ SQL_PATTERN = /(?:DROP|(?:UN)?LOCK|CREATE) TABLE|INSERT INTO/.freeze
12
+
9
13
  # @param [ Hash ] opts
10
14
  # @option opts [ String ] :list
11
15
  # @option opts [ Boolean ] :show_progression
@@ -14,15 +18,23 @@ module WPScan
14
18
  def aggressive(opts = {})
15
19
  found = []
16
20
 
17
- enumerate(potential_urls(opts), opts) do |res|
18
- next unless res.code == 200 && res.body =~ /INSERT INTO/
21
+ enumerate(potential_urls(opts), opts.merge(check_full_response: 200)) do |res|
22
+ if res.effective_url.end_with?('.zip')
23
+ next unless res.headers['Content-Type'] =~ %r{\Aapplication/zip}i
24
+ else
25
+ next unless res.body =~ SQL_PATTERN
26
+ end
19
27
 
20
- found << WPScan::DbExport.new(res.request.url, found_by: DIRECT_ACCESS, confidence: 100)
28
+ found << Model::DbExport.new(res.request.url, found_by: DIRECT_ACCESS, confidence: 100)
21
29
  end
22
30
 
23
31
  found
24
32
  end
25
33
 
34
+ def full_request_params
35
+ @full_request_params ||= { headers: { 'Range' => 'bytes=0-3000' } }
36
+ end
37
+
26
38
  # @param [ Hash ] opts
27
39
  # @option opts [ String ] :list Mandatory
28
40
  #
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative 'interesting_findings/readme'
2
4
  require_relative 'interesting_findings/wp_cron'
3
5
  require_relative 'interesting_findings/multisite'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module WPScan
2
4
  module Finders
3
5
  module InterestingFindings
@@ -6,13 +8,12 @@ module WPScan
6
8
  # @return [ InterestingFinding ]
7
9
  def aggressive(_opts = {})
8
10
  path = 'wp-content/backup-db/'
9
- url = target.url(path)
10
- res = Browser.get(url)
11
+ res = target.head_and_get(path, [200, 403])
11
12
 
12
13
  return unless [200, 403].include?(res.code) && !target.homepage_or_404?(res)
13
14
 
14
- WPScan::BackupDB.new(
15
- url,
15
+ Model::BackupDB.new(
16
+ target.url(path),
16
17
  confidence: 70,
17
18
  found_by: DIRECT_ACCESS,
18
19
  interesting_entries: target.directory_listing_entries(path),
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module WPScan
2
4
  module Finders
3
5
  module InterestingFindings
@@ -9,7 +11,7 @@ module WPScan
9
11
 
10
12
  return unless target.debug_log?(path)
11
13
 
12
- WPScan::DebugLog.new(
14
+ Model::DebugLog.new(
13
15
  target.url(path),
14
16
  confidence: 100, found_by: DIRECT_ACCESS,
15
17
  references: { url: 'https://codex.wordpress.org/Debugging_in_WordPress' }
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module WPScan
2
4
  module Finders
3
5
  module InterestingFindings
@@ -5,13 +7,12 @@ module WPScan
5
7
  class DuplicatorInstallerLog < CMSScanner::Finders::Finder
6
8
  # @return [ InterestingFinding ]
7
9
  def aggressive(_opts = {})
8
- url = target.url('installer-log.txt')
9
- res = Browser.get(url)
10
+ path = 'installer-log.txt'
10
11
 
11
- return unless res.body =~ /DUPLICATOR INSTALL-LOG/
12
+ return unless target.head_and_get(path).body =~ /DUPLICATOR INSTALL-LOG/
12
13
 
13
- WPScan::DuplicatorInstallerLog.new(
14
- url,
14
+ Model::DuplicatorInstallerLog.new(
15
+ target.url(path),
15
16
  confidence: 100,
16
17
  found_by: DIRECT_ACCESS,
17
18
  references: { url: 'https://www.exploit-db.com/ghdb/3981/' }
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module WPScan
2
4
  module Finders
3
5
  module InterestingFindings
@@ -5,13 +7,13 @@ module WPScan
5
7
  class EmergencyPwdResetScript < CMSScanner::Finders::Finder
6
8
  # @return [ InterestingFinding ]
7
9
  def aggressive(_opts = {})
8
- url = target.url('/emergency.php')
9
- res = Browser.get(url)
10
+ path = 'emergency.php'
11
+ res = target.head_and_get(path)
10
12
 
11
13
  return unless res.code == 200 && !target.homepage_or_404?(res)
12
14
 
13
- WPScan::EmergencyPwdResetScript.new(
14
- url,
15
+ Model::EmergencyPwdResetScript.new(
16
+ target.url(path),
15
17
  confidence: res.body =~ /password/i ? 100 : 40,
16
18
  found_by: DIRECT_ACCESS,
17
19
  references: {
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module WPScan
2
4
  module Finders
3
5
  module InterestingFindings
@@ -10,7 +12,7 @@ module WPScan
10
12
 
11
13
  return if fpd_entries.empty?
12
14
 
13
- WPScan::FullPathDisclosure.new(
15
+ Model::FullPathDisclosure.new(
14
16
  target.url(path),
15
17
  confidence: 100,
16
18
  found_by: DIRECT_ACCESS,
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module WPScan
2
4
  module Finders
3
5
  module InterestingFindings
@@ -12,7 +14,7 @@ module WPScan
12
14
 
13
15
  url = target.url('wp-content/mu-plugins/')
14
16
 
15
- return WPScan::MuPlugins.new(
17
+ return Model::MuPlugins.new(
16
18
  url,
17
19
  confidence: 70,
18
20
  found_by: 'URLs In Homepage (Passive Detection)',
@@ -35,7 +37,7 @@ module WPScan
35
37
 
36
38
  target.mu_plugins = true
37
39
 
38
- WPScan::MuPlugins.new(
40
+ Model::MuPlugins.new(
39
41
  url,
40
42
  confidence: 80,
41
43
  found_by: DIRECT_ACCESS,
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module WPScan
2
4
  module Finders
3
5
  module InterestingFindings
@@ -15,7 +17,7 @@ module WPScan
15
17
 
16
18
  target.multisite = true
17
19
 
18
- WPScan::Multisite.new(
20
+ Model::Multisite.new(
19
21
  url,
20
22
  confidence: 100,
21
23
  found_by: DIRECT_ACCESS,