intrigue-ident 0.46 → 0.47

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/hp.rb CHANGED
@@ -3,7 +3,7 @@ module Ident
3
3
  module Check
4
4
  class Hp < Intrigue::Ident::Check::Base
5
5
 
6
- def generate_checks(uri)
6
+ def generate_checks(url)
7
7
  [
8
8
  {
9
9
  :name => "HP Printer",
@@ -12,7 +12,7 @@ module Check
12
12
  :type => :content_headers,
13
13
  :content => /server: HP-ChaiSOE\/1.0/i,
14
14
  :examples => ["http://69.162.52.20:80"],
15
- :paths => ["#{uri}"]
15
+ :paths => ["#{url}"]
16
16
  }
17
17
  ]
18
18
  end
@@ -3,7 +3,7 @@ module Ident
3
3
  module Check
4
4
  class Jenkins < Intrigue::Ident::Check::Base
5
5
 
6
- def generate_checks(uri)
6
+ def generate_checks(url)
7
7
  [
8
8
  { # might need to be its own, but haven't seen it yet outside jenkins
9
9
  :name => "Hudson",
@@ -12,7 +12,7 @@ module Check
12
12
  :type => :content_headers,
13
13
  :content => /x-hudson/i,
14
14
  :dynamic_version => lambda { |x| x["details"]["headers"].select{|y| y =~ /x-hudson/}.split(":").last },
15
- :paths => ["#{uri}"]
15
+ :paths => ["#{url}"]
16
16
  },
17
17
  {
18
18
  :name => "Jenkins",
@@ -20,7 +20,7 @@ module Check
20
20
  :version => nil,
21
21
  :type => :content_headers,
22
22
  :content => /X-Jenkins-Session/i,
23
- :paths => ["#{uri}"]
23
+ :paths => ["#{url}"]
24
24
  },
25
25
  {
26
26
  :name => "Jenkins",
@@ -29,7 +29,7 @@ module Check
29
29
  :type => :content_headers,
30
30
  :content => /x-jenkins/i,
31
31
  :dynamic_version => lambda { |x| x["details"]["headers"].select{|y| y =~ /x-jenkins/}.split(":").last },
32
- :paths => ["#{uri}"]
32
+ :paths => ["#{url}"]
33
33
  }
34
34
  ]
35
35
  end
data/lib/checks/joomla.rb CHANGED
@@ -3,7 +3,7 @@ module Ident
3
3
  module Check
4
4
  class Joomla < Intrigue::Ident::Check::Base
5
5
 
6
- def generate_checks(uri)
6
+ def generate_checks(url)
7
7
  [
8
8
  {
9
9
  :name => "Joomla!",
@@ -12,7 +12,7 @@ module Check
12
12
  :version => nil,
13
13
  :content => /files_joomla/i,
14
14
  :references => ["https://twitter.com/GreyNoiseIO/status/987547246538391552"],
15
- :paths => ["#{uri}/administrator/manifests/files/joomla.xml"]
15
+ :paths => ["#{url}/administrator/manifests/files/joomla.xml"]
16
16
  }
17
17
  ]
18
18
  end
@@ -3,7 +3,7 @@ module Ident
3
3
  module Check
4
4
  class LimeSurvey < Intrigue::Ident::Check::Base
5
5
 
6
- def generate_checks(uri)
6
+ def generate_checks(url)
7
7
  [
8
8
  {
9
9
  :name => "LimeSurvey",
@@ -11,7 +11,7 @@ module Check
11
11
  :type => :content_body,
12
12
  :version => nil,
13
13
  :content => /Donate to LimeSurvey/,
14
- :paths => ["#{uri}"]
14
+ :paths => ["#{url}"]
15
15
  }
16
16
  ]
17
17
  end
@@ -3,7 +3,7 @@ module Ident
3
3
  module Check
4
4
  class Lithium < Intrigue::Ident::Check::Base
5
5
 
6
- def generate_checks(uri)
6
+ def generate_checks(url)
7
7
  [
8
8
  {
9
9
  :name => "Lithum ",
@@ -11,7 +11,7 @@ module Check
11
11
  :type => :content_cookies,
12
12
  :version => nil,
13
13
  :content => /LithiumVisitor/i,
14
- :paths => ["#{uri}"]
14
+ :paths => ["#{url}"]
15
15
  },
16
16
  {
17
17
  :name => "Lithum",
@@ -19,7 +19,7 @@ module Check
19
19
  :type => :content_cookies,
20
20
  :version => nil,
21
21
  :content => /LiSESSIONID/i,
22
- :paths => ["#{uri}"]
22
+ :paths => ["#{url}"]
23
23
  }
24
24
  ]
25
25
  end
data/lib/checks/lotus.rb CHANGED
@@ -3,7 +3,7 @@ module Ident
3
3
  module Check
4
4
  class Lotus < Intrigue::Ident::Check::Base
5
5
 
6
- def generate_checks(uri)
6
+ def generate_checks(url)
7
7
  [
8
8
  {
9
9
  :name => "Lotus Domino",
@@ -12,7 +12,7 @@ module Check
12
12
  :version => nil,
13
13
  :content => /server: Lotus-Domino/i,
14
14
  :examples => ["https://12.237.144.251:443"],
15
- :paths => ["#{uri}"]
15
+ :paths => ["#{url}"]
16
16
  }
17
17
  ]
18
18
  end
@@ -3,7 +3,7 @@ module Ident
3
3
  module Check
4
4
  class Magento < Intrigue::Ident::Check::Base
5
5
 
6
- def generate_checks(uri)
6
+ def generate_checks(url)
7
7
  [
8
8
  {
9
9
  :name => "Magento",
@@ -11,7 +11,7 @@ module Check
11
11
  :type => :content_body,
12
12
  :version => nil,
13
13
  :content => /Mage.Cookies.path/i,
14
- :paths => ["#{uri}"]
14
+ :paths => ["#{url}"]
15
15
  }
16
16
  ]
17
17
  end
data/lib/checks/mcafee.rb CHANGED
@@ -3,7 +3,7 @@ module Ident
3
3
  module Check
4
4
  class Mcafee < Intrigue::Ident::Check::Base
5
5
 
6
- def generate_checks(uri)
6
+ def generate_checks(url)
7
7
  [
8
8
  {
9
9
  :name => "McAfee EPolicy Orchestrator",
@@ -11,7 +11,7 @@ module Check
11
11
  :type => :content_body,
12
12
  :version => nil,
13
13
  :content => /McAfee Agent Activity Log/i,
14
- :paths => ["#{uri}"]
14
+ :paths => ["#{url}"]
15
15
  }
16
16
  ]
17
17
  end
@@ -3,7 +3,7 @@ module Ident
3
3
  module Check
4
4
  class MediaWiki < Intrigue::Ident::Check::Base
5
5
 
6
- def generate_checks(uri)
6
+ def generate_checks(url)
7
7
  [
8
8
  {
9
9
  :name => "MediaWiki",
@@ -11,7 +11,7 @@ module Check
11
11
  :type => :content_body,
12
12
  :version => nil,
13
13
  :content => /<a href="\/\/www.mediawiki.org\/">Powered by MediaWiki<\/a>/,
14
- :paths => ["#{uri}"]
14
+ :paths => ["#{url}"]
15
15
  }
16
16
  ]
17
17
  end
@@ -24,7 +24,7 @@ module Check
24
24
 
25
25
  =begin
26
26
  all_checks = [{
27
- :uri => "#{uri}",
27
+ :url => "#{url}",
28
28
  :checklist => [
29
29
  {
30
30
  :name => "Yoast Wordpress SEO Plugin", # won't be used if we have
@@ -3,15 +3,59 @@ module Ident
3
3
  module Check
4
4
  class Microsoft < Intrigue::Ident::Check::Base
5
5
 
6
- def generate_checks(uri)
6
+ def generate_checks(url)
7
7
  [
8
+ {
9
+ :name => "Microsoft ASP.NET",
10
+ :description => "Microsoft ASP.NET",
11
+ :version => nil,
12
+ :type => :content_headers,
13
+ :content => /x-powered-by: ASP.NET/,
14
+ :examples => ["http://info.nucor.com:80"],
15
+ :paths => ["#{url}"]
16
+ },
8
17
  {
9
18
  :name => "Microsoft Forefront TMG",
10
19
  :description => "Microsoft Forefront Threat Management Gateway",
11
20
  :version => nil,
12
21
  :type => :content_cookies,
13
22
  :content => /<title>Microsoft Forefront TMG/,
14
- :paths => ["#{uri}"]
23
+ :paths => ["#{url}"]
24
+ },
25
+ {
26
+ :name => "Microsoft Forefront TMG",
27
+ :description => "Microsoft Forefront Threat Management Gateway",
28
+ :version => nil,
29
+ :type => :content_headers,
30
+ :content => /via:\ 1.1\ TMGSRVR/,
31
+ :paths => ["#{url}"]
32
+ },
33
+ {
34
+ :name => "Microsoft IIS 6.0",
35
+ :description => "Microsoft IIS 6.0",
36
+ :version => nil,
37
+ :type => :content_headers,
38
+ :content => /server: Microsoft-IIS\/6.0/,
39
+ :examples => ["http://info.nucor.com:80"],
40
+ :paths => ["#{url}"]
41
+ },
42
+ {
43
+ :name => "Microsoft IIS 7.0",
44
+ :description => "Microsoft IIS 7.0",
45
+ :version => nil,
46
+ :type => :content_headers,
47
+ :content => /server: Microsoft-IIS\/7.0/,
48
+ :examples => ["http://205.145.65.110:80"],
49
+ :paths => ["#{url}"]
50
+ },
51
+ {
52
+ :name => "Microsoft IIS 7.5",
53
+ :description => "Microsoft IIS 7.5",
54
+ :version => nil,
55
+ :type => :content_headers,
56
+ :content => /server: Microsoft-IIS\/7.5/,
57
+ :examples => ["http://168.75.243.138:80"],
58
+ :paths => ["#{url}"]
15
59
  },
16
60
  {
17
61
  :name => "Microsoft IIS 8.0",
@@ -20,7 +64,16 @@ module Check
20
64
  :type => :content_body,
21
65
  :content => /<img src=\"iis-8.png\"/,
22
66
  :examples => ["http://66.162.2.18:80"],
23
- :paths => ["#{uri}"]
67
+ :paths => ["#{url}"]
68
+ },
69
+ {
70
+ :name => "Microsoft IIS 8.0",
71
+ :description => "Microsoft IIS 8.0",
72
+ :version => nil,
73
+ :type => :content_headers,
74
+ :content => /server: Microsoft-IIS\/8.0/,
75
+ :examples => ["http://freightmanager.nucornet.com:80"],
76
+ :paths => ["#{url}"]
24
77
  },
25
78
  {
26
79
  :name => "Microsoft IIS 8.5",
@@ -29,7 +82,29 @@ module Check
29
82
  :type => :content_body,
30
83
  :content => /<img src=\"iis-85.png\"/,
31
84
  :examples => ["http://103.1.221.151:80"],
32
- :paths => ["#{uri}"]
85
+ :paths => ["#{url}"]
86
+ },
87
+ {
88
+ :name => "Microsoft IIS Unauthorized (403)",
89
+ :description => "Microsoft IIS Unauthorized",
90
+ :tags => ["error_page"],
91
+ :version => nil,
92
+ :type => :content_body,
93
+ :hide => true,
94
+ :content => /Error Code: 403 Forbidden. The server denied the specified Uniform Resource Locator \(URL\)/,
95
+ :examples => ["http://199.233.74.45:80"],
96
+ :paths => ["#{url}"]
97
+ },
98
+ {
99
+ :name => "Microsoft IIS Missing Resource (404)",
100
+ :description => "Microsoft IIS Missing Resource (404)",
101
+ :tags => ["error_page"],
102
+ :version => nil,
103
+ :type => :content_body,
104
+ :hide => true,
105
+ :content => /HTTP Error 404. The requested resource is not found./,
106
+ :examples => ["http://66.162.2.74:80"],
107
+ :paths => ["#{url}"]
33
108
  },
34
109
  {
35
110
  :name => "Microsoft Outlook Web Access",
@@ -37,8 +112,8 @@ module Check
37
112
  :version => nil,
38
113
  :type => :content_headers,
39
114
  :content => /x-owa-version/,
40
- :dynamic_version => lambda { |x| x["details"]["headers"].select{|y| y =~ /x-owa-version/}.split(":").last },
41
- :paths => ["#{uri}"]
115
+ :dynamic_version => lambda { |x| x["details"]["headers"].select{|y| y =~ /x-owa-version/}.first.split(":").last },
116
+ :paths => ["#{url}"]
42
117
  },
43
118
  {
44
119
  :name => "Microsoft Outlook Web Access",
@@ -46,8 +121,11 @@ module Check
46
121
  :version => nil,
47
122
  :type => :content_body,
48
123
  :content => /OwaPage\ =\ ASP.auth_logon_aspx/,
49
- :dynamic_version => lambda { |x| x["details"]["hidden_response_data"].match(/href=\"\/owa\/auth\/(.*)\/themes\/resources\/favicon.ico/).captures.first},
50
- :paths => ["#{uri}"]
124
+ :dynamic_version => lambda { |x|
125
+ m = x["details"]["hidden_response_data"].match(/href=\"\/owa\/auth\/(.*)\/themes\/resources\/favicon.ico/)
126
+ return m.captures.first if m
127
+ },
128
+ :paths => ["#{url}"]
51
129
  },
52
130
  {
53
131
  :name => "Microsoft Generic Error - 403",
@@ -57,7 +135,7 @@ module Check
57
135
  :type => :content_body,
58
136
  :hide => true,
59
137
  :content => /403 Forbidden. The server denied the specified Uniform Resource Locator (URL)/,
60
- :paths => ["#{uri}"]
138
+ :paths => ["#{url}"]
61
139
  },
62
140
  {
63
141
  :name => "Microsoft Generic Error - 503",
@@ -67,7 +145,7 @@ module Check
67
145
  :type => :content_body,
68
146
  :hide => true,
69
147
  :content => /HTTP Error 503. The service is unavailable./,
70
- :paths => ["#{uri}"]
148
+ :paths => ["#{url}"]
71
149
  }
72
150
  ]
73
151
  end
data/lib/checks/nagios.rb CHANGED
@@ -3,7 +3,7 @@ module Ident
3
3
  module Check
4
4
  class Nagios < Intrigue::Ident::Check::Base
5
5
 
6
- def generate_checks(uri)
6
+ def generate_checks(url)
7
7
  [
8
8
  {
9
9
  :name => "Nagios",
@@ -11,7 +11,7 @@ module Check
11
11
  :version => nil,
12
12
  :type => :content_headers,
13
13
  :content => /nagios/i,
14
- :paths => ["#{uri}"]
14
+ :paths => ["#{url}"]
15
15
  }
16
16
  ]
17
17
  end
@@ -0,0 +1,24 @@
1
+ module Intrigue
2
+ module Ident
3
+ module Check
4
+ class Nginx < Intrigue::Ident::Check::Base
5
+
6
+ def generate_checks(url)
7
+ [
8
+ {
9
+ :name => "Nginx",
10
+ :description => "Nginx",
11
+ :version => nil,
12
+ :type => :content_headers,
13
+ :content => /server: nginx/i,
14
+ :dynamic_version => lambda { |x| x["details"]["headers"].select{|h| h=~/nginx/}.first.split("/").last },
15
+ :examples => ["https://api.appfire.com:443"],
16
+ :paths => ["#{url}"]
17
+ }
18
+ ]
19
+ end
20
+
21
+ end
22
+ end
23
+ end
24
+ end
data/lib/checks/oracle.rb CHANGED
@@ -3,7 +3,7 @@ module Ident
3
3
  module Check
4
4
  class Oracle < Intrigue::Ident::Check::Base
5
5
 
6
- def generate_checks(uri)
6
+ def generate_checks(url)
7
7
  [
8
8
  {
9
9
  :name => "Oracle Glassfish",
@@ -15,7 +15,7 @@ module Check
15
15
  :hide => true,
16
16
  :dynamic_version => lambda { |x| x["details"]["headers"].join("\n").match(/Sun GlassFish Enterprise Server v([\d\.])/).captures[0] },
17
17
  :examples => ["http://52.4.12.185/"],
18
- :paths => ["#{uri}"]
18
+ :paths => ["#{url}"]
19
19
  },
20
20
  {
21
21
  :name => "Oracle Glassfish",
@@ -27,7 +27,7 @@ module Check
27
27
  :hide => true,
28
28
  :dynamic_version => lambda { |x| x["details"]["headers"].join("\n").match(/GlassFish Server Open Source Edition\s+([\d\.]+)$/).captures[0] },
29
29
  :examples => ["http://52.2.97.57:80"],
30
- :paths => ["#{uri}"]
30
+ :paths => ["#{url}"]
31
31
  }
32
32
  ]
33
33
  end
data/lib/checks/pardot.rb CHANGED
@@ -3,7 +3,7 @@ module Ident
3
3
  module Check
4
4
  class Pardot < Intrigue::Ident::Check::Base
5
5
 
6
- def generate_checks(uri)
6
+ def generate_checks(url)
7
7
  [
8
8
  {
9
9
  :name => "Pardot",
@@ -11,7 +11,7 @@ module Check
11
11
  :version => nil,
12
12
  :type => :content_cookies,
13
13
  :content => /pardot/i,
14
- :paths => ["#{uri}"]
14
+ :paths => ["#{url}"]
15
15
  }
16
16
  ]
17
17
  end
@@ -3,7 +3,7 @@ module Ident
3
3
  module Check
4
4
  class Pfsense < Intrigue::Ident::Check::Base
5
5
 
6
- def generate_checks(uri)
6
+ def generate_checks(url)
7
7
  [
8
8
  {
9
9
  :name => "pfSense Firewall",
@@ -14,7 +14,7 @@ module Check
14
14
  :version => nil,
15
15
  :type => :content_body,
16
16
  :content => /Login to pfSense/,
17
- :paths => ["#{uri}"]
17
+ :paths => ["#{url}"]
18
18
  }
19
19
  ]
20
20
  end