intrigue-ident 0.48 → 0.49

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.
data/lib/checks/chef.rb CHANGED
@@ -13,7 +13,7 @@ module Check
13
13
  :version => nil,
14
14
  :match_type => :content_body,
15
15
  :match_content => /<title>Chef Server<\/title>/,
16
- :dynamic_version => lambda{|x| x["details"]["hidden_response_data"].scan(/Version\ (.*)\ &mdash;/)[0].first },
16
+ :dynamic_version => lambda{|x| _first_body_capture(/Version\ (.*)\ &mdash;/) },
17
17
  :paths => ["#{url}"]
18
18
  },
19
19
  {
data/lib/checks/cisco.rb CHANGED
@@ -25,8 +25,10 @@ module Check
25
25
  :tags => ["tech:vpn"],
26
26
  :version => nil,
27
27
  :match_type => :content_body,
28
- :match_content => /document.location.replace\(\"\/\+CSCOE\+\/logon.html\"\)/,
29
- :examples => ["https://12.237.144.250:443", "http://12.150.243.178:80"],
28
+ :match_content => /document.location.replace\(\"\/\+CSCOE\+\/logon.html\"\)/,
29
+ :examples => [
30
+ "https://12.237.144.250:443",
31
+ "http://12.150.243.178:80"],
30
32
  :hide => false,
31
33
  :paths => ["#{url}"]
32
34
  },
data/lib/checks/citrix.rb CHANGED
@@ -16,7 +16,20 @@ module Check
16
16
  :match_content => /<title>Netscaler Gateway/,
17
17
  :hide => false,
18
18
  :paths => ["#{url}"]
19
+ },
20
+ {
21
+ :type => "application",
22
+ :vendor => "Citrix",
23
+ :product => "Netscaler Gateway",
24
+ :match_details => "(often) customized logon page - netscaler gateway",
25
+ :tags => ["tech:vpn"],
26
+ :version => nil,
27
+ :match_type => :content_body,
28
+ :match_content => /CTXMSAM_LogonFont/,
29
+ :hide => false,
30
+ :paths => ["#{url}"]
19
31
  }
32
+
20
33
  ]
21
34
  end
22
35
 
@@ -6,7 +6,7 @@ module Check
6
6
  def generate_checks(url)
7
7
  [
8
8
  {
9
- :type => "application",
9
+ :type => "service",
10
10
  :vendor => "Cloudflare",
11
11
  :product =>"CDN",
12
12
  :version => nil,
@@ -16,7 +16,7 @@ module Check
16
16
  :paths => ["#{url}"]
17
17
  },
18
18
  {
19
- :type => "application",
19
+ :type => "service",
20
20
  :vendor => "Cloudflare",
21
21
  :product =>"CDN",
22
22
  :version => nil,
@@ -26,7 +26,7 @@ module Check
26
26
  :paths => ["#{url}"]
27
27
  },
28
28
  {
29
- :type => "application",
29
+ :type => "service",
30
30
  :vendor => "Cloudflare",
31
31
  :product =>"CDN",
32
32
  :tags => ["error_page"],
@@ -38,7 +38,7 @@ module Check
38
38
  :paths => ["#{url}"]
39
39
  },
40
40
  {
41
- :type => "application",
41
+ :type => "service",
42
42
  :vendor => "Cloudflare",
43
43
  :product =>"CDN",
44
44
  :match_details =>"Cloudflare Error",
@@ -50,7 +50,7 @@ module Check
50
50
  :paths => ["#{url}"]
51
51
  },
52
52
  {
53
- :type => "application",
53
+ :type => "service",
54
54
  :vendor => "Cloudflare",
55
55
  :product =>"CDN",
56
56
  :match_details =>"Cloudfront Error - Direct IP Access",
data/lib/checks/drupal.rb CHANGED
@@ -14,11 +14,24 @@ module Check
14
14
  :match_type => :content_body,
15
15
  :match_content => /Drupal/,
16
16
  :dynamic_version => lambda { |x|
17
- version = x["details"]["hidden_response_data"].scan(/^(Drupal.*)[ ,<\.].*$/)[0]
18
- return version.first.gsub("Drupal ","").gsub(",","").chomp if version
17
+ _first_body_capture(x,/^(Drupal.*)[ ,<\.].*$/,["Drupal ",","])
19
18
  },
20
19
  :paths => ["#{url}/CHANGELOG.txt"]
20
+ },
21
+ {
22
+ :type => "application",
23
+ :vendor => "Drupal",
24
+ :product => "Drupal",
25
+ :match_details => "Drupal headers",
26
+ :version => nil,
27
+ :match_type => :content_headers,
28
+ :match_content => /x-drupal-cache:/,
29
+ :dynamic_version => lambda { |x|
30
+ _first_header_capture(x,/x-generator: Drupal\ ([0-9]+)\ \(https:\/\/www.drupal.org\)/i,)
31
+ },
32
+ :paths => ["#{url}"]
21
33
  }
34
+
22
35
  ]
23
36
  end
24
37
 
data/lib/checks/f5.rb CHANGED
@@ -10,10 +10,23 @@ module Check
10
10
  :vendor => "F5",
11
11
  :product =>"BIG-IP APM",
12
12
  :match_details =>"F5 BIG-IP APM",
13
- :tags => ["tech:vpn"],
13
+ :tags => ["tech:load_balancer"],
14
14
  :version => nil,
15
15
  :match_type => :content_cookies,
16
- :match_content => /MRHSession/,
16
+ :match_content => /MRHSession/,
17
+ :hide => false,
18
+ :paths => ["#{url}"]
19
+ },
20
+ {
21
+ :type => "hardware",
22
+ :vendor => "F5",
23
+ :product =>"BIG-IP",
24
+ :match_details =>"F5 BIG-IP Load balancer cookie",
25
+ :tags => ["tech:load_balancer"],
26
+ :version => nil,
27
+ :match_type => :content_cookies,
28
+ :match_content => /BIGipServer/,
29
+ :examples => ["https://reset.oxy.com:443"],
17
30
  :hide => false,
18
31
  :paths => ["#{url}"]
19
32
  }
data/lib/checks/fastly.rb CHANGED
@@ -6,11 +6,11 @@ module Check
6
6
  def generate_checks(url)
7
7
  [
8
8
  {
9
- :type => "application",
9
+ :type => "service",
10
10
  :vendor =>"Fastly",
11
11
  :product =>"Fastly",
12
12
  :match_details =>"",
13
- :version => "",
13
+ :version => nil,
14
14
  :match_type => :content_headers,
15
15
  :match_content => /x-fastly-backend-reqs/i,
16
16
  :paths => ["#{url}"]
@@ -0,0 +1,24 @@
1
+ module Intrigue
2
+ module Ident
3
+ module Check
4
+ class Groovy < Intrigue::Ident::Check::Base
5
+
6
+ def generate_checks(url)
7
+ [
8
+ {
9
+ :type => "application",
10
+ :vendor => "Groovy",
11
+ :product =>"Groovy",
12
+ :match_details =>"Groovy error page",
13
+ :match_type => :content_body,
14
+ :version => nil,
15
+ :match_content => /Error processing GroovyPageView:/i,
16
+ :paths => ["#{url}"]
17
+ }
18
+ ]
19
+ end
20
+
21
+ end
22
+ end
23
+ end
24
+ end
data/lib/checks/heroku.rb CHANGED
@@ -6,7 +6,7 @@ module Check
6
6
  def generate_checks(url)
7
7
  [
8
8
  {
9
- :type => "application",
9
+ :type => "service",
10
10
  :vendor => "Heroku",
11
11
  :product =>"Heroku",
12
12
  :match_details =>"Heroku",
@@ -13,7 +13,7 @@ module Check
13
13
  :version => nil,
14
14
  :match_type => :content_headers,
15
15
  :match_content => /x-hudson/i,
16
- :dynamic_version => lambda { |x| x["details"]["headers"].select{|y| y =~ /x-hudson/}.split(":").last },
16
+ :dynamic_version => lambda { |x| _first_header_capture(x, /^x-hudson:(.*)$/) },
17
17
  :paths => ["#{url}"]
18
18
  },
19
19
  {
@@ -34,7 +34,7 @@ module Check
34
34
  :version => nil,
35
35
  :match_type => :content_headers,
36
36
  :match_content => /x-jenkins/i,
37
- :dynamic_version => lambda { |x| x["details"]["headers"].select{|y| y =~ /x-jenkins/}.split(":").last },
37
+ :dynamic_version => lambda { |x| _first_header_capture(x, /^x-jenkins:(.*)$/) },
38
38
  :paths => ["#{url}"]
39
39
  }
40
40
  ]
@@ -0,0 +1,25 @@
1
+ module Intrigue
2
+ module Ident
3
+ module Check
4
+ class Jobvite < Intrigue::Ident::Check::Base
5
+
6
+ def generate_checks(url)
7
+ [
8
+ {
9
+ :type => "service",
10
+ :vendor =>"Jobvite",
11
+ :product =>"Jobvite",
12
+ :match_details =>"jobvite cookie - unconfirmed!!!!",
13
+ :version => nil,
14
+ :match_type => :content_cookies,
15
+ :match_content => /ADRUM_BTa/i,
16
+ :examples => ["http://202.1.239.165:80"],
17
+ :paths => ["#{url}"]
18
+ }
19
+ ]
20
+ end
21
+
22
+ end
23
+ end
24
+ end
25
+ end
data/lib/checks/lotus.rb CHANGED
@@ -13,7 +13,9 @@ module Check
13
13
  :match_type => :content_headers,
14
14
  :version => nil,
15
15
  :match_content => /server: Lotus-Domino/i,
16
- :examples => ["https://12.237.144.251:443"],
16
+ :examples => [
17
+ "https://12.237.144.251:443"
18
+ ],
17
19
  :paths => ["#{url}"]
18
20
  }
19
21
  ]
@@ -1,40 +1,24 @@
1
1
  module Intrigue
2
2
  module Ident
3
3
  module Check
4
- class MediaWiki < Intrigue::Ident::Check::Base
5
-
6
- def generate_checks(url)
7
- [
8
- {
9
- :type => "application",
10
- :vendor =>"MediaWiki",
11
- :product =>"MediaWiki",
12
- :match_details =>"MediaWiki",
13
- :match_type => :content_body,
14
- :version => nil,
15
- :match_content => /<a href="\/\/www.mediawiki.org\/">Powered by MediaWiki<\/a>/,
16
- :paths => ["#{url}"]
17
- }
18
- ]
19
- end
4
+ class MediaWiki < Intrigue::Ident::Check::Base
20
5
 
6
+ def generate_checks(url)
7
+ [
8
+ {
9
+ :type => "application",
10
+ :vendor =>"MediaWiki",
11
+ :product =>"MediaWiki",
12
+ :match_details =>"MediaWiki",
13
+ :match_type => :content_body,
14
+ :version => nil,
15
+ :match_content => /<a href="\/\/www.mediawiki.org\/">Powered by MediaWiki<\/a>/,
16
+ :paths => ["#{url}"]
17
+ }
18
+ ]
21
19
  end
20
+
22
21
  end
23
- end
24
- end
25
-
26
-
27
- =begin
28
- all_checks = [{
29
- :url => "#{url}",
30
- :checklist => [
31
- {
32
- :product =>"Yoast Wordpress SEO Plugin", # won't be used if we have
33
- :match_details =>"Yoast Wordpress SEO Plugin",
34
- :match_type => "content",
35
- :match_content => /<!-- \/ Yoast WordPress SEO plugin. -->/,
36
- :test_site => "https://ip-50-62-231-56.ip.secureserver.net",
37
- :dynamic_name => lambda{|x| x.scan(/the Yoast WordPress SEO plugin v.* - h/)[0].gsub("the ","").gsub(" - h","") }
38
- }
39
- ]},
40
- =end
22
+ end
23
+ end
24
+ end
@@ -76,7 +76,7 @@ module Check
76
76
  :version => nil,
77
77
  :match_type => :content_headers,
78
78
  :match_content => /x-powered-by: ASP.NET/,
79
- :examples => ["http://info.nucor.com:80"],
79
+ :examples => [],
80
80
  :paths => ["#{url}"]
81
81
  },
82
82
  {
@@ -107,9 +107,7 @@ module Check
107
107
  :match_details =>"server header",
108
108
  :version => nil,
109
109
  :dynamic_version => lambda { |x|
110
- x["details"]["headers"].select{ |y|
111
- y =~ /server: Microsoft-IIS/ }.first.match(
112
- /server: Microsoft-IIS\/(.*)/).captures.first
110
+ _first_header_capture x, /server: Microsoft-IIS\/(.*)/
113
111
  },
114
112
  :match_type => :content_headers,
115
113
  :match_content => /server: Microsoft-IIS\//,
@@ -164,6 +162,42 @@ module Check
164
162
  :examples => ["http://66.162.2.74:80"],
165
163
  :paths => ["#{url}"]
166
164
  },
165
+ {
166
+ :type => "application",
167
+ :vendor => "Microsoft",
168
+ :product =>"IIS",
169
+ :match_details =>"Microsoft IIS Generic Error - 403",
170
+ :tags => ["error_page"],
171
+ :version => nil,
172
+ :match_type => :content_body,
173
+ :hide => true,
174
+ :match_content => /403 Forbidden. The server denied the specified Uniform Resource Locator (URL)/,
175
+ :paths => ["#{url}"]
176
+ },
177
+ {
178
+ :type => "application",
179
+ :vendor => "Microsoft",
180
+ :product =>"IIS",
181
+ :match_details =>"Microsoft Generic Error - 503",
182
+ :tags => ["error_page"],
183
+ :version => nil,
184
+ :match_type => :content_body,
185
+ :hide => true,
186
+ :match_content => /HTTP Error 503. The service is unavailable./,
187
+ :paths => ["#{url}"]
188
+ },
189
+ {
190
+ :type => "service",
191
+ :vendor =>"Microsoft",
192
+ :product =>"Office 365",
193
+ :match_details =>"office 365 fronted by okta",
194
+ :version => nil,
195
+ :match_type => :content_body,
196
+ :match_content => /ok3static.oktacdn.com\/assets\/img\/logos\/office365/i,
197
+ :examples => ["http://outlook.newscorp.com:80"],
198
+ :paths => ["#{url}"]
199
+ },
200
+
167
201
  {
168
202
  :type => "application",
169
203
  :vendor => "Microsoft",
@@ -172,7 +206,7 @@ module Check
172
206
  :version => nil,
173
207
  :match_type => :content_headers,
174
208
  :match_content => /x-owa-version/,
175
- :dynamic_version => lambda { |x| x["details"]["headers"].select{|y| y =~ /x-owa-version/}.first.split(":").last },
209
+ :dynamic_version => lambda { |x| _first_header_capture(/x-owa-version:(.*)/) },
176
210
  :paths => ["#{url}"]
177
211
  },
178
212
  {
@@ -184,35 +218,22 @@ module Check
184
218
  :match_type => :content_body,
185
219
  :match_content => /OwaPage\ =\ ASP.auth_logon_aspx/,
186
220
  :dynamic_version => lambda { |x|
187
- m = x["details"]["hidden_response_data"].match(/href=\"\/owa\/auth\/(.*)\/themes\/resources\/favicon.ico/)
188
- return m.captures.first if m
221
+ _first_body_capture x, /href=\"\/owa\/auth\/(.*)\/themes\/resources\/favicon.ico/
189
222
  },
190
223
  :paths => ["#{url}"]
191
224
  },
192
225
  {
193
226
  :type => "application",
194
227
  :vendor => "Microsoft",
195
- :product =>"IIS",
196
- :match_details =>"Microsoft IIS Generic Error - 403",
197
- :tags => ["error_page"],
228
+ :product =>"Sharepoint",
229
+ :match_details =>"Sharepoint cookie",
198
230
  :version => nil,
199
- :match_type => :content_body,
200
- :hide => true,
201
- :match_content => /403 Forbidden. The server denied the specified Uniform Resource Locator (URL)/,
231
+ :match_type => :content_headers,
232
+ :match_content => /sprequestguid/,
233
+ :dynamic_version => lambda { |x| _first_header_capture(x,/microsoftsharepointteamservices:(.*)/) },
234
+ :examples => ["http://sharepoint.edghelp.realogyfg.com:80"],
202
235
  :paths => ["#{url}"]
203
236
  },
204
- {
205
- :type => "application",
206
- :vendor => "Microsoft",
207
- :product =>"IIS",
208
- :match_details =>"Microsoft Generic Error - 503",
209
- :tags => ["error_page"],
210
- :version => nil,
211
- :match_type => :content_body,
212
- :hide => true,
213
- :match_content => /HTTP Error 503. The service is unavailable./,
214
- :paths => ["#{url}"]
215
- }
216
237
  ]
217
238
  end
218
239
 
@@ -0,0 +1,25 @@
1
+ module Intrigue
2
+ module Ident
3
+ module Check
4
+ class NewRelic < Intrigue::Ident::Check::Base
5
+
6
+ def generate_checks(url)
7
+ [
8
+ {
9
+ :type => "service",
10
+ :vendor => "NewRelic",
11
+ :product =>"NewRelic",
12
+ :references => ["https://discuss.newrelic.com/t/relic-solution-what-is-bam-nr-data-net-new-relic-browser-monitoring/42055"],
13
+ :match_details =>"NewRelic tracking code",
14
+ :version => nil,
15
+ :match_type => :content_body,
16
+ :match_content => /bam.nr-data.net/i,
17
+ :paths => ["#{url}"]
18
+ }
19
+ ]
20
+ end
21
+
22
+ end
23
+ end
24
+ end
25
+ end