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
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module WPScan
2
4
  module Finders
3
5
  module WpVersion
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module WPScan
2
4
  module Finders
3
5
  module WpVersion
@@ -11,7 +13,7 @@ module WPScan
11
13
  hydra.abort
12
14
  progress_bar.finish
13
15
 
14
- return WPScan::WpVersion.new(
16
+ return Model::WpVersion.new(
15
17
  version_number,
16
18
  found_by: 'Unique Fingerprinting (Aggressive Detection)',
17
19
  confidence: 100,
data/app/models.rb CHANGED
@@ -1,3 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WPScan
4
+ module Model
5
+ include CMSScanner::Model
6
+ end
7
+ end
8
+
1
9
  require_relative 'models/interesting_finding'
2
10
  require_relative 'models/wp_version'
3
11
  require_relative 'models/xml_rpc'
@@ -1,5 +1,9 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module WPScan
2
- # Config Backup
3
- class ConfigBackup < InterestingFinding
4
+ module Model
5
+ # Config Backup
6
+ class ConfigBackup < InterestingFinding
7
+ end
4
8
  end
5
9
  end
@@ -1,5 +1,9 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module WPScan
2
- # DB Export
3
- class DbExport < InterestingFinding
4
+ module Model
5
+ # DB Export
6
+ class DbExport < InterestingFinding
7
+ end
4
8
  end
5
9
  end
@@ -1,48 +1,52 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module WPScan
2
- # Custom class to include the WPScan::References module
3
- class InterestingFinding < CMSScanner::InterestingFinding
4
- include References
5
- end
4
+ module Model
5
+ # Custom class to include the WPScan::References module
6
+ class InterestingFinding < CMSScanner::Model::InterestingFinding
7
+ include References
8
+ end
6
9
 
7
- #
8
- # Empty classes for the #type to be correctly displayed (as taken from the self.class from the parent)
9
- #
10
- class BackupDB < InterestingFinding
11
- end
10
+ #
11
+ # Empty classes for the #type to be correctly displayed (as taken from the self.class from the parent)
12
+ #
13
+ class BackupDB < InterestingFinding
14
+ end
12
15
 
13
- class DebugLog < InterestingFinding
14
- end
16
+ class DebugLog < InterestingFinding
17
+ end
15
18
 
16
- class DuplicatorInstallerLog < InterestingFinding
17
- end
19
+ class DuplicatorInstallerLog < InterestingFinding
20
+ end
18
21
 
19
- class EmergencyPwdResetScript < InterestingFinding
20
- end
22
+ class EmergencyPwdResetScript < InterestingFinding
23
+ end
21
24
 
22
- class FullPathDisclosure < InterestingFinding
23
- end
25
+ class FullPathDisclosure < InterestingFinding
26
+ end
24
27
 
25
- class MuPlugins < InterestingFinding
26
- end
28
+ class MuPlugins < InterestingFinding
29
+ end
27
30
 
28
- class Multisite < InterestingFinding
29
- end
31
+ class Multisite < InterestingFinding
32
+ end
30
33
 
31
- class Readme < InterestingFinding
32
- end
34
+ class Readme < InterestingFinding
35
+ end
33
36
 
34
- class Registration < InterestingFinding
35
- end
37
+ class Registration < InterestingFinding
38
+ end
36
39
 
37
- class TmmDbMigrate < InterestingFinding
38
- end
40
+ class TmmDbMigrate < InterestingFinding
41
+ end
39
42
 
40
- class UploadDirectoryListing < InterestingFinding
41
- end
43
+ class UploadDirectoryListing < InterestingFinding
44
+ end
42
45
 
43
- class UploadSQLDump < InterestingFinding
44
- end
46
+ class UploadSQLDump < InterestingFinding
47
+ end
45
48
 
46
- class WPCron < InterestingFinding
49
+ class WPCron < InterestingFinding
50
+ end
47
51
  end
48
52
  end
data/app/models/media.rb CHANGED
@@ -1,5 +1,9 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module WPScan
2
- # Media
3
- class Media < InterestingFinding
4
+ module Model
5
+ # Media
6
+ class Media < InterestingFinding
7
+ end
4
8
  end
5
9
  end
data/app/models/plugin.rb CHANGED
@@ -1,25 +1,33 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module WPScan
2
- # WordPress Plugin
3
- class Plugin < WpItem
4
- # See WpItem
5
- def initialize(slug, blog, opts = {})
6
- super(slug, blog, opts)
4
+ module Model
5
+ # WordPress Plugin
6
+ class Plugin < WpItem
7
+ # See WpItem
8
+ def initialize(slug, blog, opts = {})
9
+ super(slug, blog, opts)
7
10
 
8
- @uri = Addressable::URI.parse(blog.url("wp-content/plugins/#{slug}/"))
9
- end
11
+ # To be used by #head_and_get
12
+ # If custom wp-content, it will be replaced by blog#url
13
+ @path_from_blog = "wp-content/plugins/#{slug}/"
10
14
 
11
- # @return [ JSON ]
12
- def db_data
13
- DB::Plugin.db_data(slug)
14
- end
15
+ @uri = Addressable::URI.parse(blog.url(path_from_blog))
16
+ end
17
+
18
+ # @return [ JSON ]
19
+ def db_data
20
+ @db_data ||= DB::Plugin.db_data(slug)
21
+ end
15
22
 
16
- # @param [ Hash ] opts
17
- #
18
- # @return [ WPScan::Version, false ]
19
- def version(opts = {})
20
- @version = Finders::PluginVersion::Base.find(self, version_detection_opts.merge(opts)) if @version.nil?
23
+ # @param [ Hash ] opts
24
+ #
25
+ # @return [ Model::Version, false ]
26
+ def version(opts = {})
27
+ @version = Finders::PluginVersion::Base.find(self, version_detection_opts.merge(opts)) if @version.nil?
21
28
 
22
- @version
29
+ @version
30
+ end
23
31
  end
24
32
  end
25
33
  end
data/app/models/theme.rb CHANGED
@@ -1,99 +1,107 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module WPScan
2
- # WordPress Theme
3
- class Theme < WpItem
4
- attr_reader :style_url, :style_name, :style_uri, :author, :author_uri, :template, :description,
5
- :license, :license_uri, :tags, :text_domain
4
+ module Model
5
+ # WordPress Theme
6
+ class Theme < WpItem
7
+ attr_reader :style_url, :style_name, :style_uri, :author, :author_uri, :template, :description,
8
+ :license, :license_uri, :tags, :text_domain
6
9
 
7
- # See WpItem
8
- def initialize(slug, blog, opts = {})
9
- super(slug, blog, opts)
10
+ # See WpItem
11
+ def initialize(slug, blog, opts = {})
12
+ super(slug, blog, opts)
10
13
 
11
- @uri = Addressable::URI.parse(blog.url("wp-content/themes/#{slug}/"))
12
- @style_url = opts[:style_url] || url('style.css')
14
+ # To be used by #head_and_get
15
+ # If custom wp-content, it will be replaced by blog#url
16
+ @path_from_blog = "wp-content/themes/#{slug}/"
13
17
 
14
- parse_style
15
- end
18
+ @uri = Addressable::URI.parse(blog.url(path_from_blog))
19
+ @style_url = opts[:style_url] || url('style.css')
16
20
 
17
- # @return [ JSON ]
18
- def db_data
19
- DB::Theme.db_data(slug)
20
- end
21
+ parse_style
22
+ end
21
23
 
22
- # @param [ Hash ] opts
23
- #
24
- # @return [ WPScan::Version, false ]
25
- def version(opts = {})
26
- @version = Finders::ThemeVersion::Base.find(self, version_detection_opts.merge(opts)) if @version.nil?
24
+ # @return [ JSON ]
25
+ def db_data
26
+ @db_data ||= DB::Theme.db_data(slug)
27
+ end
27
28
 
28
- @version
29
- end
29
+ # @param [ Hash ] opts
30
+ #
31
+ # @return [ Model::Version, false ]
32
+ def version(opts = {})
33
+ @version = Finders::ThemeVersion::Base.find(self, version_detection_opts.merge(opts)) if @version.nil?
30
34
 
31
- # @return [ Theme ]
32
- def parent_theme
33
- return unless template
34
- return unless style_body =~ /^@import\surl\(["']?([^"'\)]+)["']?\);\s*$/i
35
+ @version
36
+ end
35
37
 
36
- opts = detection_opts.merge(
37
- style_url: url(Regexp.last_match[1]),
38
- found_by: 'Parent Themes (Passive Detection)',
39
- confidence: 100
40
- ).merge(version_detection: version_detection_opts)
38
+ # @return [ Theme ]
39
+ def parent_theme
40
+ return unless template
41
+ return unless style_body =~ /^@import\surl\(["']?([^"'\)]+)["']?\);\s*$/i
41
42
 
42
- self.class.new(template, blog, opts)
43
- end
43
+ opts = detection_opts.merge(
44
+ style_url: url(Regexp.last_match[1]),
45
+ found_by: 'Parent Themes (Passive Detection)',
46
+ confidence: 100
47
+ ).merge(version_detection: version_detection_opts)
44
48
 
45
- # @param [ Integer ] depth
46
- #
47
- # @retun [ Array<Theme> ]
48
- def parent_themes(depth = 3)
49
- theme = self
50
- found = []
49
+ self.class.new(template, blog, opts)
50
+ end
51
51
 
52
- (1..depth).each do |_|
53
- parent = theme.parent_theme
52
+ # @param [ Integer ] depth
53
+ #
54
+ # @retun [ Array<Theme> ]
55
+ def parent_themes(depth = 3)
56
+ theme = self
57
+ found = []
54
58
 
55
- break unless parent
59
+ (1..depth).each do |_|
60
+ parent = theme.parent_theme
56
61
 
57
- found << parent
58
- theme = parent
59
- end
62
+ break unless parent
60
63
 
61
- found
62
- end
64
+ found << parent
65
+ theme = parent
66
+ end
63
67
 
64
- def style_body
65
- @style_body ||= Browser.get(style_url).body
66
- end
68
+ found
69
+ end
67
70
 
68
- def parse_style
69
- {
70
- style_name: 'Theme Name',
71
- style_uri: 'Theme URI',
72
- author: 'Author',
73
- author_uri: 'Author URI',
74
- template: 'Template',
75
- description: 'Description',
76
- license: 'License',
77
- license_uri: 'License URI',
78
- tags: 'Tags',
79
- text_domain: 'Text Domain'
80
- }.each do |attribute, tag|
81
- instance_variable_set(:"@#{attribute}", parse_style_tag(style_body, tag))
71
+ def style_body
72
+ @style_body ||= Browser.get(style_url).body
82
73
  end
83
- end
84
74
 
85
- # @param [ String ] bofy
86
- # @param [ String ] tag
87
- #
88
- # @return [ String ]
89
- def parse_style_tag(body, tag)
90
- value = body[/^\s*#{Regexp.escape(tag)}:[\t ]*([^\r\n]+)/i, 1]
75
+ def parse_style
76
+ {
77
+ style_name: 'Theme Name',
78
+ style_uri: 'Theme URI',
79
+ author: 'Author',
80
+ author_uri: 'Author URI',
81
+ template: 'Template',
82
+ description: 'Description',
83
+ license: 'License',
84
+ license_uri: 'License URI',
85
+ tags: 'Tags',
86
+ text_domain: 'Text Domain'
87
+ }.each do |attribute, tag|
88
+ instance_variable_set(:"@#{attribute}", parse_style_tag(style_body, tag))
89
+ end
90
+ end
91
91
 
92
- value && !value.strip.empty? ? value.strip : nil
93
- end
92
+ # @param [ String ] bofy
93
+ # @param [ String ] tag
94
+ #
95
+ # @return [ String ]
96
+ def parse_style_tag(body, tag)
97
+ value = body[/^\s*#{Regexp.escape(tag)}:[\t ]*([^\r\n]+)/i, 1]
98
+
99
+ value && !value.strip.empty? ? value.strip : nil
100
+ end
94
101
 
95
- def ==(other)
96
- super(other) && style_url == other.style_url
102
+ def ==(other)
103
+ super(other) && style_url == other.style_url
104
+ end
97
105
  end
98
106
  end
99
107
  end
@@ -1,71 +1,75 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module WPScan
2
- # Timthumb
3
- class Timthumb < InterestingFinding
4
- include Vulnerable
4
+ module Model
5
+ # Timthumb
6
+ class Timthumb < InterestingFinding
7
+ include Vulnerable
5
8
 
6
- attr_reader :version_detection_opts
9
+ attr_reader :version_detection_opts
7
10
 
8
- # @param [ String ] url
9
- # @param [ Hash ] opts
10
- # @option opts [ Symbol ] :mode The mode to use to detect the version
11
- def initialize(url, opts = {})
12
- super(url, opts)
11
+ # @param [ String ] url
12
+ # @param [ Hash ] opts
13
+ # @option opts [ Symbol ] :mode The mode to use to detect the version
14
+ def initialize(url, opts = {})
15
+ super(url, opts)
13
16
 
14
- @version_detection_opts = opts[:version_detection] || {}
15
- end
17
+ @version_detection_opts = opts[:version_detection] || {}
18
+ end
16
19
 
17
- # @param [ Hash ] opts
18
- #
19
- # @return [ WPScan::Version, false ]
20
- def version(opts = {})
21
- @version = Finders::TimthumbVersion::Base.find(self, version_detection_opts.merge(opts)) if @version.nil?
20
+ # @param [ Hash ] opts
21
+ #
22
+ # @return [ Model::Version, false ]
23
+ def version(opts = {})
24
+ @version = Finders::TimthumbVersion::Base.find(self, version_detection_opts.merge(opts)) if @version.nil?
22
25
 
23
- @version
24
- end
26
+ @version
27
+ end
25
28
 
26
- # @return [ Array<Vulnerability> ]
27
- def vulnerabilities
28
- vulns = []
29
+ # @return [ Array<Vulnerability> ]
30
+ def vulnerabilities
31
+ vulns = []
29
32
 
30
- vulns << rce_webshot_vuln if version == false || version > '1.35' && version < '2.8.14' && webshot_enabled?
31
- vulns << rce_132_vuln if version == false || version < '1.33'
33
+ vulns << rce_webshot_vuln if version == false || version > '1.35' && version < '2.8.14' && webshot_enabled?
34
+ vulns << rce_132_vuln if version == false || version < '1.33'
32
35
 
33
- vulns
34
- end
36
+ vulns
37
+ end
35
38
 
36
- # @return [ Vulnerability ] The RCE in the <= 1.32
37
- def rce_132_vuln
38
- Vulnerability.new(
39
- 'Timthumb <= 1.32 Remote Code Execution',
40
- { exploitdb: ['17602'] },
41
- 'RCE',
42
- '1.33'
43
- )
44
- end
39
+ # @return [ Vulnerability ] The RCE in the <= 1.32
40
+ def rce_132_vuln
41
+ Vulnerability.new(
42
+ 'Timthumb <= 1.32 Remote Code Execution',
43
+ { exploitdb: ['17602'] },
44
+ 'RCE',
45
+ '1.33'
46
+ )
47
+ end
45
48
 
46
- # @return [ Vulnerability ] The RCE due to the WebShot in the > 1.35 (or >= 2.0) and <= 2.8.13
47
- def rce_webshot_vuln
48
- Vulnerability.new(
49
- 'Timthumb <= 2.8.13 WebShot Remote Code Execution',
50
- {
51
- url: ['http://seclists.org/fulldisclosure/2014/Jun/117', 'https://github.com/wpscanteam/wpscan/issues/519'],
52
- cve: '2014-4663'
53
- },
54
- 'RCE',
55
- '2.8.14'
56
- )
57
- end
49
+ # @return [ Vulnerability ] The RCE due to the WebShot in the > 1.35 (or >= 2.0) and <= 2.8.13
50
+ def rce_webshot_vuln
51
+ Vulnerability.new(
52
+ 'Timthumb <= 2.8.13 WebShot Remote Code Execution',
53
+ {
54
+ url: ['http://seclists.org/fulldisclosure/2014/Jun/117', 'https://github.com/wpscanteam/wpscan/issues/519'],
55
+ cve: '2014-4663'
56
+ },
57
+ 'RCE',
58
+ '2.8.14'
59
+ )
60
+ end
58
61
 
59
- # @return [ Boolean ]
60
- def webshot_enabled?
61
- res = Browser.get(url, params: { webshot: 1, src: "http://#{default_allowed_domains.sample}" })
62
+ # @return [ Boolean ]
63
+ def webshot_enabled?
64
+ res = Browser.get(url, params: { webshot: 1, src: "http://#{default_allowed_domains.sample}" })
62
65
 
63
- res.body =~ /WEBSHOT_ENABLED == true/ ? false : true
64
- end
66
+ res.body =~ /WEBSHOT_ENABLED == true/ ? false : true
67
+ end
65
68
 
66
- # @return [ Array<String> ] The default allowed domains (between the 2.0 and 2.8.13)
67
- def default_allowed_domains
68
- %w[flickr.com picasa.com img.youtube.com upload.wikimedia.org]
69
+ # @return [ Array<String> ] The default allowed domains (between the 2.0 and 2.8.13)
70
+ def default_allowed_domains
71
+ %w[flickr.com picasa.com img.youtube.com upload.wikimedia.org]
72
+ end
69
73
  end
70
74
  end
71
75
  end