Class: Intrigue::Ident::Check::Apache

Inherits:
Base
  • Object
show all
Defined in:
lib/checks/apache.rb

Instance Method Summary collapse

Methods inherited from Base

inherited

Instance Method Details

#generate_checks(url) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# File 'lib/checks/apache.rb', line 6

def generate_checks(url)
  [
    {
      :type => "application",
      :vendor => "Apache",
      :product =>"Ambari",
      :match_details =>"page title",
      :version => nil,
      :match_type => :content_body,
      :match_content =>  /<title>Ambari<\/title>/i,
      :examples => ["http://12.42.205.114:8080"],
      :verify => "aWJtI0ludHJpZ3VlOjpFbnRpdHk6OlVyaSNodHRwOi8vMTIuNDIuMjA1LjExNDo4MDgw",
      :paths => ["#{url}"]
    },
    {
      :type => "application",
      :vendor => "Apache",
      :product =>"Apache",
      :match_details =>"Apache web server - server header - with versions",
      :version => nil,
      :match_type => :content_headers,
      :match_content =>  /server:\ Apache[\s|\/]+[0-9]+/i,
      :dynamic_version => lambda { |x|
        _first_header_capture(x,/[s|S]erver:\s?Apache[\s|\/](.*)$/,["Apache","/","(Ubuntu)"])
      },
      :examples => [
        "http://124.6.226.249:8081"
      ],
      :paths => ["#{url}"]
    },
    {
      :type => "application",
      :vendor => "Apache",
      :product =>"Apache",
      :match_details =>"Apache web server - server header - no version",
      :version => nil,
      :match_type => :content_headers,
      :match_content =>  /server:\ Apache$/i,
      :examples => [
        "http://207.87.195.160:80"
      ],
      :paths => ["#{url}"]
    },
    {
      :type => "application",
      :vendor => "Apache",
      :product =>"Coyote",
      :match_details =>"Apache coyote application server - server header",
      :version => nil,
      :match_type => :content_headers,
      :match_content =>  /server:\ Apache-Coyote/i,
      :dynamic_version => lambda { |x|
        _first_header_capture(x,/server: Apache-Coyote\/(.*)/i)
      },
      :examples => [ "http://15.224.214.203:80" ],
      :paths => ["#{url}"]
    },
    {
      :type => "application",
      :vendor => "Apache",
      :product =>"Sling",
      :references => ["https://sling.apache.org/"],
      :match_details =>"Apache Sling™ is a framework for RESTful web-applications based on an extensible content tree. also note that this may be related to apache experience manager",
      :version => nil,
      :match_type => :content_body,
      :match_content =>  /<address>Apache Sling<\/address>/i,
      :examples => [
        "https://assets.microncpg.com/"
      ],
      :paths => ["#{url}"]
    },
    {
      :type => "application",
      :vendor => "Apache",
      :product => "Tomcat",
      :match_details =>"Tomcat Application Server",
      :match_type => :content_body,
      :version => 6,
      :match_content =>  /<title>Tomcat 6 Welcome Page/,
      :examples => [
        "https://15.139.248.81:443"
      ],
      :paths => ["#{url}"]
    },

    {
      :type => "application",
      :vendor => "Apache",
      :product => "Tomcat",
      :match_details =>"Tomcat Application Server",
      :match_type => :content_body,
      :version => nil,
      :match_content =>  /<title>Apache Tomcat/,
      :dynamic_version => lambda{ |x|
        _first_body_capture(x, /<title>(.*)<\/title>/,["Apache Tomcat/"," - Error report"])
      },
      :examples => [
        "http://15.216.136.207:80",
        "http://15.224.214.203:80"
      ],
      :paths => ["#{url}"]
    }
  ]
end