intrigue-ident 0.47 → 0.48

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 (52) hide show
  1. checksums.yaml +4 -4
  2. data/lib/checks/adobe.rb +6 -4
  3. data/lib/checks/akamai.rb +6 -4
  4. data/lib/checks/amazon.rb +40 -5
  5. data/lib/checks/apache.rb +24 -0
  6. data/lib/checks/aruba.rb +6 -3
  7. data/lib/checks/atlassian.rb +30 -20
  8. data/lib/checks/{wordpress.rb → automattic.rb} +56 -36
  9. data/lib/checks/chef.rb +12 -8
  10. data/lib/checks/cisco.rb +18 -12
  11. data/lib/checks/citrix.rb +6 -4
  12. data/lib/checks/cloudflare.rb +33 -23
  13. data/lib/checks/cpanel.rb +6 -4
  14. data/lib/checks/django.rb +6 -4
  15. data/lib/checks/drupal.rb +6 -4
  16. data/lib/checks/f5.rb +6 -4
  17. data/lib/checks/fastly.rb +6 -4
  18. data/lib/checks/generic.rb +10 -8
  19. data/lib/checks/gitlab.rb +6 -4
  20. data/lib/checks/google.rb +6 -4
  21. data/lib/checks/grafana.rb +6 -4
  22. data/lib/checks/heroku.rb +27 -0
  23. data/lib/checks/hp.rb +6 -4
  24. data/lib/checks/jenkins.rb +18 -12
  25. data/lib/checks/joomla.rb +6 -4
  26. data/lib/checks/limesuvey.rb +6 -4
  27. data/lib/checks/lithium.rb +12 -8
  28. data/lib/checks/lotus.rb +6 -4
  29. data/lib/checks/magento.rb +6 -4
  30. data/lib/checks/mcafee.rb +6 -4
  31. data/lib/checks/mediawiki.rb +10 -8
  32. data/lib/checks/microsoft.rb +132 -66
  33. data/lib/checks/nagios.rb +6 -4
  34. data/lib/checks/nginx.rb +6 -4
  35. data/lib/checks/oracle.rb +12 -8
  36. data/lib/checks/palo_alto.rb +6 -4
  37. data/lib/checks/pardot.rb +6 -4
  38. data/lib/checks/pfsense.rb +6 -4
  39. data/lib/checks/phpmyadmin.rb +6 -4
  40. data/lib/checks/pivotal.rb +24 -0
  41. data/lib/checks/rabbitmq.rb +12 -8
  42. data/lib/checks/team_city.rb +6 -4
  43. data/lib/checks/telerik.rb +6 -4
  44. data/lib/checks/varnish.rb +6 -4
  45. data/lib/checks/vmware.rb +6 -4
  46. data/lib/checks/wp_engine.rb +7 -4
  47. data/lib/intrigue-ident.rb +23 -11
  48. metadata +5 -6
  49. data/lib/checks/asp_net.rb +0 -64
  50. data/lib/checks/cloudfront.rb +0 -41
  51. data/lib/checks/spring.rb +0 -22
  52. data/lib/checks/tomcat.rb +0 -22
@@ -6,11 +6,13 @@ module Check
6
6
  def generate_checks(url)
7
7
  [
8
8
  {
9
- :name => "Pardot",
10
- :description => "Pardot",
9
+ :type => "application",
10
+ :vendor =>"Pardot",
11
+ :product =>"Pardot",
12
+ :match_details =>"Pardot",
11
13
  :version => nil,
12
- :type => :content_cookies,
13
- :content => /pardot/i,
14
+ :match_type => :content_cookies,
15
+ :match_content => /pardot/i,
14
16
  :paths => ["#{url}"]
15
17
  }
16
18
  ]
@@ -6,14 +6,16 @@ module Check
6
6
  def generate_checks(url)
7
7
  [
8
8
  {
9
- :name => "pfSense Firewall",
10
- :description => "pfSense is an open source firewall/router " +
9
+ :type => "application",
10
+ :vendor => "pfSense",
11
+ :product =>"pfSense",
12
+ :match_details =>"pfSense is an open source firewall/router " +
11
13
  "computer software distribution based on FreeBSD. It is " +
12
14
  "installed on a physical computer or a virtual machine to" +
13
15
  "make a dedicated firewall/router for a network",
14
16
  :version => nil,
15
- :type => :content_body,
16
- :content => /Login to pfSense/,
17
+ :match_type => :content_body,
18
+ :match_content => /Login to pfSense/,
17
19
  :paths => ["#{url}"]
18
20
  }
19
21
  ]
@@ -6,11 +6,13 @@ module Check
6
6
  def generate_checks(url)
7
7
  [
8
8
  {
9
- :name => "PhpMyAdmin",
10
- :description => "PhpMyAdmin",
9
+ :type => "application",
10
+ :vendor => "PhpMyAdmin",
11
+ :product => "PhpMyAdmin",
12
+ :match_details => "PhpMyAdmin",
11
13
  :version => nil,
12
- :type => :content_cookies,
13
- :content => /phpMyAdmin=/i,
14
+ :match_type => :content_cookies,
15
+ :match_content => /phpMyAdmin=/i,
14
16
  :paths => ["#{url}"]
15
17
  }
16
18
  ]
@@ -0,0 +1,24 @@
1
+ module Intrigue
2
+ module Ident
3
+ module Check
4
+ class Pivotal < Intrigue::Ident::Check::Base
5
+
6
+ def generate_checks(url)
7
+ [
8
+ {
9
+ :type => "application",
10
+ :vendor =>"Pivotal",
11
+ :product =>"Spring Framework",
12
+ :match_details =>"Standard Spring MVC error page",
13
+ :match_type => :content_body,
14
+ :version => nil,
15
+ :match_content => /{"timestamp":\d.*,"status":999,"error":"None","message":"No message available"}/,
16
+ :paths => ["#{url}/error.json"]
17
+ }
18
+ ]
19
+ end
20
+
21
+ end
22
+ end
23
+ end
24
+ end
@@ -6,19 +6,23 @@ module Check
6
6
  def generate_checks(url)
7
7
  [
8
8
  {
9
- :name => "RabbitMQ",
10
- :description => "RabbitMQ",
11
- :type => :content_body,
9
+ :type => "application",
10
+ :vendor => "RabbitMQ",
11
+ :product => "RabbitMQ",
12
+ :match_details =>"RabbitMQ",
13
+ :match_type => :content_body,
12
14
  :version => nil,
13
- :content => /RabbitMQ Management/,
15
+ :match_content => /RabbitMQ Management/,
14
16
  :paths => ["#{url}"]
15
17
  },
16
18
  {
17
- :name => "RabbitMQ API",
18
- :description => "RabbitMQ API",
19
- :type => :content_body,
19
+ :type => "application",
20
+ :vendor => "RabbitMQ",
21
+ :product => "RabbitMQ API",
22
+ :match_details => "RabbitMQ API",
23
+ :match_type => :content_body,
20
24
  :version => nil,
21
- :content => /RabbitMQ Management HTTP API/,
25
+ :match_content => /RabbitMQ Management HTTP API/,
22
26
  :paths => ["#{url}/api"]
23
27
  }
24
28
  ]
@@ -6,11 +6,13 @@ module Check
6
6
  def generate_checks(url)
7
7
  [
8
8
  {
9
- :name => "TeamCity Continuous Integration",
10
- :description => "TeamCity Continuous Integration",
9
+ :type => "application",
10
+ :vendor => "TeamCity",
11
+ :product => "TeamCity",
12
+ :match_details => "TeamCity Continuous Integration",
11
13
  :version => nil,
12
- :type => :content_body,
13
- :content => /icons\/teamcity.black.svg/i,
14
+ :match_type => :content_body,
15
+ :match_content => /icons\/teamcity.black.svg/i,
14
16
  :paths => ["#{url}"]
15
17
  }
16
18
  ]
@@ -6,12 +6,14 @@ module Check
6
6
  def generate_checks(url)
7
7
  [
8
8
  {
9
- :name => "Telerik Sitefinity",
10
- :description => "Telerik Sitefinity is an ASP.NET 2.0-based Content Management System (CMS)",
9
+ :type => "application",
10
+ :vendor => "Telerik",
11
+ :product =>"Sitefinity",
12
+ :match_details =>"Telerik Sitefinity is an ASP.NET 2.0-based Content Management System (CMS)",
11
13
  :url => "https://www.sitefinity.com/",
12
14
  :version => nil,
13
- :type => :content_body,
14
- :content => /Telerik.Sitefinity.Resources/,
15
+ :match_type => :content_body,
16
+ :match_content => /Telerik.Sitefinity.Resources/,
15
17
  :dynamic_version => lambda { |x| x["details"]["hidden_response_data"].match(/Version=([\d\.]+),/).captures[0] },
16
18
  :verify_sites => [],
17
19
  :paths => ["#{url}"]
@@ -6,11 +6,13 @@ module Check
6
6
  def generate_checks(url)
7
7
  [
8
8
  {
9
- :name => "Varnish",
10
- :description => "Varnish Proxy",
9
+ :type => "application",
10
+ :vendor =>"Varnish",
11
+ :product =>"Varnish",
12
+ :match_details =>"Varnish Proxy",
11
13
  :version => nil,
12
- :type => :content_headers,
13
- :content => /via: [0-9]\.[0-9] varnish/i,
14
+ :match_type => :content_headers,
15
+ :match_content => /via: [0-9]\.[0-9] varnish/i,
14
16
  :paths => ["#{url}"]
15
17
  }
16
18
  ]
@@ -6,11 +6,13 @@ module Check
6
6
  def generate_checks(url)
7
7
  [
8
8
  {
9
- :name => "VMWare Horizon",
10
- :description => "VMWare Horizon",
9
+ :type => "application",
10
+ :vendor => "VMWare",
11
+ :product =>"Horizon",
12
+ :match_details =>"VMWare Horizon",
11
13
  :version => nil,
12
- :type => :content_body,
13
- :content => /<title>VMware Horizon/,
14
+ :match_type => :content_body,
15
+ :match_content => /<title>VMware Horizon/,
14
16
  :paths => ["#{url}"]
15
17
  }
16
18
  ]
@@ -6,11 +6,14 @@ module Check
6
6
  def generate_checks(url)
7
7
  [
8
8
  {
9
- :name => "WPEngine",
10
- :description => "WPEngine - Access site by IP",
9
+ :type => "application",
10
+ :vendor =>"WPEngine",
11
+ :tags => ["hosting_provider"],
12
+ :product =>"WPEngine",
13
+ :match_details =>"WPEngine - Access site by IP",
11
14
  :version => nil,
12
- :type => :content_body,
13
- :content => /This domain is successfully pointed at WP Engine, but is not configured for an account on our platform./,
15
+ :match_type => :content_body,
16
+ :match_content => /This domain is successfully pointed at WP Engine, but is not configured for an account on our platform./,
14
17
  :paths => ["#{url}"]
15
18
  }
16
19
  ]
@@ -11,7 +11,7 @@ Dir["#{check_folder}/*.rb"].each { |file| require_relative file }
11
11
  module Intrigue
12
12
  module Ident
13
13
 
14
- VERSION=0.47
14
+ VERSION=0.48
15
15
 
16
16
  def generate_requests_and_check(url)
17
17
 
@@ -78,41 +78,53 @@ module Intrigue
78
78
  results.compact
79
79
  end
80
80
 
81
+
81
82
  private
82
83
 
84
+ def _match_to_cpe(m)
85
+ out = "cpe:/#{m[:type]}:#{m[:vendor]}:#{m[:product]}"
86
+ out << ":#{m[:version]}" if m[:version]
87
+ out
88
+ end
89
+
83
90
  def _construct_match_response(check, data)
84
91
  {
92
+ :type => check[:type],
93
+ :vendor => check[:vendor],
94
+ :product => check[:product],
85
95
  :version => (check[:dynamic_version].call(data) if check[:dynamic_version]) || check[:version],
86
- :name => check[:name],
87
96
  :tags => check[:tags],
88
- :match => check[:type],
97
+ :matched_content => check[:match_content],
98
+ :match_type => check[:match_type],
99
+ :match_details => check[:match_details],
89
100
  :hide => check[:hide]
90
101
  }
91
102
  end
92
103
 
93
104
  def _match_uri(check,data)
94
105
 
106
+ #puts "Trying to match #{check[:vendor]} #{check[:product]}: #{data["details"]["cookies"][0..10]}"
107
+
95
108
  # data[:body] => page body
96
109
  # data[:headers] => block of text with headers, one per line
97
110
  # data[:cookies] => set_cookie header
98
111
  # data[:body_md5] => md5 hash of the body
99
112
  # if type "content", do the content check
100
113
 
101
-
102
- if check[:type] == :content_body
114
+ if check[:match_type] == :content_body
103
115
  if data["details"]["hidden_response_data"]
104
- match = _construct_match_response(check,data) if data["details"]["hidden_response_data"] =~ check[:content]
116
+ match = _construct_match_response(check,data) if data["details"]["hidden_response_data"] =~ check[:match_content]
105
117
  end
106
- elsif check[:type] == :content_headers
118
+ elsif check[:match_type] == :content_headers
107
119
  if data["details"]["headers"]
108
- match = _construct_match_response(check,data) if data["details"]["headers"].join("\n") =~ check[:content]
120
+ match = _construct_match_response(check,data) if data["details"]["headers"].join("\n") =~ check[:match_content]
109
121
  end
110
- elsif check[:type] == :content_cookies
122
+ elsif check[:match_type] == :content_cookies
111
123
  # Check only the set-cookie header
112
124
  if data["details"]["cookies"]
113
- match = _construct_match_response(check,data) if data["details"]["cookies"] =~ check[:content]
125
+ match = _construct_match_response(check,data) if data["details"]["cookies"] =~ check[:match_content]
114
126
  end
115
- elsif check[:type] == :checksum_body
127
+ elsif check[:match_type] == :checksum_body
116
128
  if data["details"]["response_data_hash"]
117
129
  match = _construct_match_response(check,data) if Digest::MD5.hexdigest(data["details"]["response_data_hash"]) == check[:checksum]
118
130
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: intrigue-ident
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.47'
4
+ version: '0.48'
5
5
  platform: ruby
6
6
  authors:
7
7
  - jcran
@@ -66,15 +66,15 @@ files:
66
66
  - lib/checks/adobe.rb
67
67
  - lib/checks/akamai.rb
68
68
  - lib/checks/amazon.rb
69
+ - lib/checks/apache.rb
69
70
  - lib/checks/aruba.rb
70
- - lib/checks/asp_net.rb
71
71
  - lib/checks/atlassian.rb
72
+ - lib/checks/automattic.rb
72
73
  - lib/checks/base.rb
73
74
  - lib/checks/chef.rb
74
75
  - lib/checks/cisco.rb
75
76
  - lib/checks/citrix.rb
76
77
  - lib/checks/cloudflare.rb
77
- - lib/checks/cloudfront.rb
78
78
  - lib/checks/cpanel.rb
79
79
  - lib/checks/django.rb
80
80
  - lib/checks/drupal.rb
@@ -84,6 +84,7 @@ files:
84
84
  - lib/checks/gitlab.rb
85
85
  - lib/checks/google.rb
86
86
  - lib/checks/grafana.rb
87
+ - lib/checks/heroku.rb
87
88
  - lib/checks/hp.rb
88
89
  - lib/checks/jenkins.rb
89
90
  - lib/checks/joomla.rb
@@ -101,14 +102,12 @@ files:
101
102
  - lib/checks/pardot.rb
102
103
  - lib/checks/pfsense.rb
103
104
  - lib/checks/phpmyadmin.rb
105
+ - lib/checks/pivotal.rb
104
106
  - lib/checks/rabbitmq.rb
105
- - lib/checks/spring.rb
106
107
  - lib/checks/team_city.rb
107
108
  - lib/checks/telerik.rb
108
- - lib/checks/tomcat.rb
109
109
  - lib/checks/varnish.rb
110
110
  - lib/checks/vmware.rb
111
- - lib/checks/wordpress.rb
112
111
  - lib/checks/wp_engine.rb
113
112
  - lib/intrigue-ident.rb
114
113
  homepage: https://intrigue.io
@@ -1,64 +0,0 @@
1
- module Intrigue
2
- module Ident
3
- module Check
4
- class AspNet < Intrigue::Ident::Check::Base
5
-
6
- def generate_checks(uri)
7
- [
8
- {
9
- :name => "ASP.NET",
10
- :description => "ASP.Net Error Message",
11
- :version => nil,
12
- :tags => ["error_page"],
13
- :type => :content_body,
14
- :content => /^.*ASP.NET is configured.*$/i,
15
- :dynamic_version => lambda{|x| x["details"]["hidden_response_data"].scan(/ASP.NET Version:(.*)$/)[0].first.chomp },
16
- :paths => ["#{uri}"]
17
- },
18
- {
19
- :name => "ASP.NET",
20
- :description => "X-AspNet Header",
21
- :version => nil,
22
- :type => :content_headers,
23
- :content => /^x-aspnet-version:.*$/i,
24
- :dynamic_version => lambda{|x| x["details"]["hidden_response_data"].scan(/ASP.NET Version:(.*)$/i)[0].first.chomp if x["details"]["hidden_response_data"].scan(/ASP.NET Version:(.*)$/i)[0] },
25
- :paths => ["#{uri}"]
26
- },
27
- {
28
- :name => "ASP.NET",
29
- :description => "Asp.Net Default Cookie",
30
- :version => nil,
31
- :type => :content_cookies,
32
- :content => /ASPSESSIONID.*$/i,
33
- :paths => ["#{uri}"]
34
- },
35
- {
36
- :name => "ASP.NET",
37
- :description => "Asp.Net Default Cookie",
38
- :version => nil,
39
- :type => :content_cookies,
40
- :content => /ASP.NET_SessionId.*$/i,
41
- :paths => ["#{uri}"]
42
- },
43
- {
44
- :name => "ASP.NET MVC",
45
- :description => "Asp.Net MVC Header",
46
- :version => nil,
47
- :type => :content_headers,
48
- :content => /x-aspnetmvc-version/i,
49
- :paths => ["#{uri}"]
50
- },
51
- {
52
- :name => "ASP.NET",
53
- :description => "WebResource.axd link in the page",
54
- :version => nil,
55
- :type => :content_body,
56
- :content => /WebResource.axd?d=/i,
57
- :paths => ["#{uri}"]
58
- }
59
- ]
60
- end
61
- end
62
- end
63
- end
64
- end
@@ -1,41 +0,0 @@
1
- module Intrigue
2
- module Ident
3
- module Check
4
- class Cloudfront < Intrigue::Ident::Check::Base
5
-
6
- def generate_checks(url)
7
- [
8
- {
9
- :name => "Cloudfront - Error (Body)",
10
- :description => "Cloudfront - no configured hostname",
11
- :version => "",
12
- :type => :content_body,
13
- :content => /ERROR: The request could not be satisfied/,
14
- :hide => true,
15
- :paths => ["#{url}"]
16
- },
17
- {
18
- :name => "Cloudfront - Error (Headers)",
19
- :description => "Cloudfront - no configured hostname",
20
- :version => "",
21
- :type => :content_headers,
22
- :content => /Error from cloudfront/,
23
- :hide => true,
24
- :paths => ["#{url}"]
25
- },
26
- {
27
- :name => "Cloudfront - 403 (Body)",
28
- :description => "Cloudfront - 403",
29
- :version => "",
30
- :type => :content_body,
31
- :content => /<h1>403 Forbidden<\/h1><\/center>\n<hr><center>cloudflare/,
32
- :hide => true,
33
- :paths => ["#{url}"]
34
- }
35
- ]
36
- end
37
-
38
- end
39
- end
40
- end
41
- end
@@ -1,22 +0,0 @@
1
- module Intrigue
2
- module Ident
3
- module Check
4
- class Spring < Intrigue::Ident::Check::Base
5
-
6
- def generate_checks(url)
7
- [
8
- {
9
- :name => "Spring",
10
- :description => "Standard Spring MVC error page",
11
- :type => :content_body,
12
- :version => nil,
13
- :content => /{"timestamp":\d.*,"status":999,"error":"None","message":"No message available"}/,
14
- :paths => ["#{url}/error.json"]
15
- }
16
- ]
17
- end
18
-
19
- end
20
- end
21
- end
22
- end